This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24411 - Expose supported media formats API to Web Workers
Summary: Expose supported media formats API to Web Workers
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
Depends on:
Reported: 2014-01-27 19:22 UTC by Jonas Sicking (Not reading bugmail)
Modified: 2014-01-30 17:28 UTC (History)
2 users (show)

See Also:


Description Jonas Sicking (Not reading bugmail) 2014-01-27 19:22:01 UTC
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.
Comment 1 Ian 'Hixie' Hickson 2014-01-30 17:28:35 UTC
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?