[whatwg] Query supported formats for media elements
Maik Merten
maikmerten at googlemail.com
Tue Sep 2 11:05:38 PDT 2008
Hello,
I'm trying to find out how to determine if a given media format is
supported by a media-element implementation. The motivation is to
replace e.g. <video> elements with fitting fallbacks (video playback
applet, third party plugins like VLC etc.) if the user's client doesn't
support a fitting format. This should happen immediately after (or even
during) page load.
All I currently see is the "error" attribute for media elements, which
has a code for decoding errors (MEDIA_ERR_DECODE). This seems like a
fitting way to signal missing support for a given media format.
However, it's unclear when this flag can be reliably read. Will an error
only be signalled after playback was initiated? How long may it take
until the implementation finds out it's dealing with an unsupported format?
If the media source is given using <source> tags with the "type"
attribute set: Can one expect that media elements immediately have the
error flag set if none of the <source> tags specify a supported type?
Should the source-element perhaps have a flag indicating if the
referenced media is in a supported format (and perhaps a flag to dermine
if this source element has been picked)?
Should there perhaps be a way to directly way to query for supported
formats?
Thanks,
Maik
More information about the whatwg
mailing list