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

[whatwg] Scripted <video> query proposal; Query supported formats for media elements

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 14 Oct 2008 12:47:43 +1300
Message-ID: <11e306600810131647p78d50571n21f36df8c5bd4a70@mail.gmail.com>
On Tue, Oct 14, 2008 at 12:10 PM, Ian Hickson <ian at hixie.ch> wrote:

> Try to play all the videos you have available, and catch errors:
>
>  <video id=a>
>   <source src="video.mp4" type="video/mp4; codecs=&quot;avc1.42E01E,
> mp4a.40.2&quot;">
>   <source src="video.3gp" type="video/3gpp; codecs=&quot;mp4v.20.8,
> samr&quot;">
>   <source src="video.ogv" type="video/ogg; codecs=&quot;theora,
> vorbis&quot;">
>   <source src="video.mkv" type="video/x-matroska; codecs=&quot;theora,
> vorbis&quot;">
>  </video>
>  <script>
>   document.getElementById('a').load();
>   if (document.getElementById('a').currentSrc == "") {
>     // failed to find a video that would play
>     // do whatever fallback you want to do here
>     ...
>   }
>  </script>
>
> This will reliably work, because load() blocks until a decision about
> which video to play is made.
>
> We may have to change this (e.g. to allow UAs to asynchronously fetch and
> try each video)


We definitely have to change that! Having load() synchronous would be a
disaster.

Rob
--
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20081014/6535bc03/attachment.htm>
Received on Monday, 13 October 2008 16:47:43 UTC

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