MediaCapabilities - Web APIs 编辑
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
BCD tables only load in the browser
See also
- HTMLMediaElement's method canPlayType()
- MediaSource's method isTypeSupported()
Navigator
interface
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论