MediaStreamTrack: label プロパティ

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2017.

labelMediaStreamTrack インターフェイスの読み取り専用のプロパティであり、トラックのソースを識別するためにユーザーエージェントによって割り当てられたラベルを含む文字列を返します。例えば "internal microphone" などです。

この文字列は空になることもあり、ソースが接続されていないと空になります。 トラックのソースとの関連付けが解除されても、このラベルは変更されません。

構文

js
const label = track.label

仕様書

Specification
Media Capture and Streams
# dom-mediastreamtrack-label

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
label

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報