MediaStream.id
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2017.
MediaStream.id
只读属性,一个包含 36 个字符的 DOMString
,用来作为这个对象的唯一标识符 (GUID) 。
语法
js
var id = mediaStream.id;
示例
js
var p = navigator.mediaDevices.getUserMedia({ audio: true, video: true });
p.then(function(stream) {
console.log(stream.id);
};)
规范
Specification |
---|
Media Capture and Streams # dom-mediastream-id |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
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.
相关链接
MediaStream
,包含该属性的接口。