The MediaStream.id()
read-only property is a DOMString
containing 36 characters denoting a unique identifier (GUID) for the object.
var id = mediaStream.id;
var p = navigator.mediaDevices.getUserMedia({ audio: true, video: true }); p.then(function(stream) { console.log(stream.id); };)
Specification | Status | Comment |
---|---|---|
Media Capture and Streams The definition of 'MediaStream.id' in that specification. | Candidate Recommendation | Initial definition. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | ? — 54 | 12 | 41 | ? | ? — 39 | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | ? — 54 | ? — 54 | Yes | 41 | ? — 39 | ? | Yes |
MediaStream
, the interface this property belongs to.
© 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/MediaStream/id