MediaStream.id

The MediaStream.id read-only property 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(function(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