Media Capture and Streams
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
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.
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
