MediaStream.id

The MediaStream.id() read-only property is a DOMString containing 36 characters denoting a unique identifier (GUID) for the object.

Syntax

var id = mediaStream.id;

Example

var p = navigator.mediaDevices.getUserMedia({ audio: true, video: true });

p.then(function(stream) {
   console.log(stream.id);
})

Specifications

Specification Status Comment
Media Capture and Streams
The definition of 'MediaStream.id' in that specification.
Candidate Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
idChrome No support ?Ā ā€” 54Edge No support 12Ā ā€” 79Firefox Full support 41IE No support NoOpera No support ?Ā ā€” 39Safari Full support YesWebView Android No support ?Ā ā€” 54Chrome Android No support ?Ā ā€” 54Firefox Android Full support 41Opera Android No support ?Ā ā€” 41Safari iOS Full support YesSamsung Internet Android No support ?Ā ā€” 6.0

Legend

Full support Ā 
Full support
No support Ā 
No support

See Also