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
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | Chrome No support ? — 54 | Edge No support 12 — 79 | Firefox Full support 41 | IE No support No | Opera No support ? — 39 | Safari Full support Yes | WebView Android No support ? — 54 | Chrome Android No support ? — 54 | Firefox Android Full support 41 | Opera Android No support ? — 41 | Safari iOS Full support Yes | Samsung Internet Android No support ? — 6.0 |
Legend
- Full support
- Full support
- No support
- No support
See Also
MediaStream, the interface this property belongs to.
