4 ms·
The media capabilities API is basically useless. You have to query each format you support individually (with very specific details like resolution and bitrates
by moron4hire 4y ago
The media capabilities API is basically useless. You have to query each format you support individually (with very specific details like resolution and bitrates, so you'll have to have all that data stored in a database that gets queried before attempting playback) and it's response is usually "everything is supported, nothing is smooth or power efficient".
EDIT: Forgot to mention, you need to know what the exact content type is for your media, both container and codec. With video, you also need to check the audio at the same time. And there isn't any documentation on the exact format that it's expecting.
It's a gigantic mess. You can't just give it a media stream and ask it "can you play this". It's often easier to just attempt to play the media and wait to see if it errors (which it can still do after even a few frames of playback succeed).