This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
We should expose an API for detecting which image/audio/video formats the UA supports to Web Workers. This is going to be especially important for ServiceWorkers who will want to decide which resources to download based on capabilities of the UA. So for example the SW will want to pre-cache a large video or image file, but it wants to get it using a format that the UA supports. Bug 24387 comment 2 has a more detailed description why this is needed from within a Web Worker and why exposing an API just in Window contexts isn't enough.
Seems reasonable. Is the "canPlayType()" function sufficient for video? Would that plus "canShowType()" or something work? Should we just have a single "isTypeSupported()" function that returns the union of those?