MediaStreamTrack.label

The MediaStreamTrack.label read-only property returns a DOMString containing a user agent-assigned label that identifies the track source, as in "internal microphone".

The string may be left empty and is empty as long as no source has been connected. When the track is deassociated from its source, the label is not changed.

Syntax

const label = track.label

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
label
Yes
12
Yes
No
Yes
11
Yes
Yes
Yes
Yes
11
Yes

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/label