您正位於 MDN Web Docs 的可編輯版本

以 MDN Web Docs 使用者身分檢視: https://developer.mozilla.org/zh-TW/docs/Web/API/MediaCapabilities

MediaCapabilities

我們的志工尚未將本文翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!
您也可以閱讀本文的 English (US) 版本。

The MediaCapabilities interface of the Media Capabilities 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 property of the Navigator interface.

Methods

MediaCapabilities.encodingInfo()
When passed a valid media configuration, it returns a promise with information as to whether the media type is supported, and whether encoding such media would be smooth and power efficient.
MediaCapabilities.decodingInfo()
When passed a valid media configuration, it returns a promise with information as to whether the media type is supported, and whether decoding such media would be smooth and power efficient.

Specifications

Specification Status Comment
Media Capabilities
The definition of 'MediaCapabilities' in that specification.
Draft Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
MediaCapabilities
Experimental
Chrome Full support 66Edge Full support ≤79Firefox Full support 63IE No support NoOpera Full support 55Safari ? WebView Android Full support 66Chrome Android Full support 66Firefox Android Full support 63Opera Android Full support 48Safari iOS ? Samsung Internet Android Full support 9.0
decodingInfo
Experimental
Chrome Full support 66Edge Full support ≤79Firefox Full support 63IE No support NoOpera Full support 55Safari ? WebView Android Full support 66Chrome Android Full support 66Firefox Android Full support 63Opera Android Full support 48Safari iOS ? Samsung Internet Android Full support 9.0
encodingInfo
Experimental
Chrome Full support 67
Disabled
Full support 67
Disabled
Disabled From version 67: this feature is behind the chrome://flags/#enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in Chrome, visit chrome://flags.
Edge Full support ≤79
Disabled
Full support ≤79
Disabled
Disabled From version ≤79: this feature is behind the chrome://flags/#enable-experimental-web-platform-features preference (needs to be set to enabled).
Firefox Full support 63IE No support NoOpera ? Safari ? WebView Android No support NoChrome Android Full support 67
Disabled
Full support 67
Disabled
Disabled From version 67: this feature is behind the chrome://flags/#enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in Chrome, visit chrome://flags.
Firefox Android Full support 63Opera Android ? Safari iOS ? Samsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
User must explicitly enable this feature.
User must explicitly enable this feature.

See also

文件標籤與貢獻者

此頁面的貢獻者: mdnwebdocs-bot, ExE-Boss, chrisdavidmills, estelle
最近更新: mdnwebdocs-bot,