MediaCapabilities
接口在
媒体能力 API
provides information about the decoding abilities of the device, system and browser. The API can be used to query the browser about the decoding abilities of the device based on codecs, profile, resolution, and bitrates. The information can be used to serve optimal media streams to the user and determine if playback should be smooth and power efficient.
The information is accessed through the
mediaCapabilities
特性为
Navigator
接口。
MediaCapabilities.encodingInfo()
MediaCapabilities.decodingInfo()
| 规范 | 状态 | 注释 |
|---|---|---|
|
Media Capabilities
The definition of 'MediaCapabilities' in that specification. |
草案 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
MediaCapabilities
|
Chrome 66 | Edge ≤79 | Firefox 63 | IE ? | Opera 55 | Safari ? | WebView Android 66 | Chrome Android 66 | Firefox Android 63 | Opera Android 48 | Safari iOS ? | Samsung Internet Android 9.0 |
decodingInfo
|
Chrome 66 | Edge ≤79 | Firefox 63 | IE ? | Opera 55 | Safari ? | WebView Android 66 | Chrome Android 66 | Firefox Android 63 | Opera Android 48 | Safari iOS ? | Samsung Internet Android 9.0 |
encodingInfo
|
Chrome
67
Disabled
|
Edge
≤79
Disabled
|
Firefox 63 | IE ? | Opera ? | Safari ? | WebView Android No |
Chrome Android
67
Disabled
|
Firefox Android 63 | Opera Android ? | Safari iOS ? | Samsung Internet Android No |
完整支持
不支持
兼容性未知
实验。期望将来行为有所改变。
用户必须明确启用此特征。
Navigator
interface
MediaCapabilities