The MediaStream.id
read-only property is a string containing 36 characters denoting a unique identifier (GUID) for the object.
The MediaStream.id
read-only property is a string containing 36 characters denoting a unique identifier (GUID) for the object.
A string.
js
const promise = navigator.mediaDevices.getUserMedia({ audio: true, video: true, }); promise.then((stream) => { console.log(stream.id); });
Specification |
---|
Media Capture and Streams # dom-mediastream-id |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
id |
26 | 12 | 41 | No | 15 | 11 | 4.4 | 26 | 41 | 14 | 11 | 1.5 |
MediaStream
, the interface this property belongs to.
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/id