W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2008

[whatwg] Query supported formats for media elements

From: Maik Merten <maikmerten@googlemail.com>
Date: Tue, 02 Sep 2008 20:05:38 +0200
Message-ID: <48BD8072.8020403@googlemail.com>
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
Received on Tuesday, 2 September 2008 11:05:38 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:05 UTC