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 AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome No support ? — 54Edge Full support 12Firefox Full support 41IE ? Opera No support ? — 39Safari ? WebView Android No support ? — 54Chrome Android No support ? — 54Edge Mobile Full support YesFirefox Android Full support 41Opera Android No support ? — 39Safari iOS ? Samsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See Also

Document Tags and Contributors

Contributors to this page: fscholz, libbymc, teoli
Last updated by: fscholz,