[whatwg] Javascript API to query supported codecs for <video> and <audio>

j at oil21.org j at oil21.org
Wed Jun 18 04:10:37 PDT 2008


On Wed, 2008-06-18 at 17:38 +0700, Philip Jägenstedt wrote:
> Implementation-wise it might be less than trivial to return an
> exhaustive list of all supported mime-types if the underlying framework
> doesn't use the concept of mime-types, but can say when given a few
> bytes of the file whether it supports it or not. Allowing JavaScript to
> second-guess this seems like a potential source of incompatibility.
> Isn't it sufficient to look for MEDIA_ERR_DECODE and add fallback
> content when that happens?
i imagined something that would use the type string used in <source>
so i can do:
 canDecode('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')
or
 canDecode('video/ogg; codecs="theora, vorbis"')

while waiting for MEDIA_ERR_DECODE might be an option,
it sounds to me that that would involve a network connection being made,
the video being buffered and after that the media engine failing, this
takes to long to make a presentation decision based on it.

j




More information about the whatwg mailing list