The read-only property MediaStreamTrack.label
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.
var name = track.label;
Specification | Status | Comment |
---|---|---|
Media Capture and Streams The definition of 'MediaStreamTrack.label' in that specification. | Candidate Recommendation | Initial specification. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | Yes | 12 | Yes | No | Yes | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | Yes | ? | Yes | ? | Yes |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/label