MediaStream: id property
The id
read-only property of the MediaStream
interface 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
Browser compatibility
See also
MediaStream
, the interface this property belongs to.