Use Media Capabilities API to check decoding support
Created by: dsilhavy
Is your feature request related to a problem? Please describe.
The decodingInfo
method of the MediaCapabilities API provides detailed information on the decoding capabilities of a device. We should prefer this method over MediaSource.isTypeSupported
if available.
Describe the solution you'd like
Implement a dynamic switch: If MediaCapabilities API and decodingInfo
is available use this method. Use MediaSource.isTypeSupported
as a fallback. Both should be added to Capabilities.js
.
Additional context API: https://w3c.github.io/media-capabilities/#example1