MediaStream: id property
The MediaStream.id
read-only property is a
string containing 36 characters denoting a unique identifier (GUID)
for the object.
Value
A string.
Examples
js
const promise = navigator.mediaDevices.getUserMedia({
audio: true,
video: true,
});
promise.then((stream) => {
console.log(stream.id);
});
Specifications
Specification |
---|
Media Capture and Streams # dom-mediastream-id |
Browser compatibility
BCD tables only load in the browser
See also
MediaStream
, the interface this property belongs to.