[whatwg] Scripted querying of <video> capabilities

Robert O'Callahan robert at ocallahan.org
Mon Oct 13 16:56:55 PDT 2008


On Tue, Oct 14, 2008 at 12:13 PM, Maciej Stachowiak <mjs at apple.com> wrote:

> While the underlying media frameworks can't necessarily answer, "if I give
> you a file with this MIME type, can you play it?", they can at least give a
> yes/no/maybe answer, which can still be quite helpful, since the UA will
> know it does not need to check some media streams at all.
>

I agree. If the API lets us answer "maybe", there is not much need or
temptation to lie, and we can still return information that could be useful
to scripts.


>
>  Also, should we make .load() asynchronous as far as selecting a media file
>> goes? Right now, a media file has to be instantaneously and synchronously
>> selected, so the UA can't try each one in turn.
>>
>
> I believe the original design intent was to make selection completely
> static and not not based on a fallback-like approach of trying each in turn.
> Let's assume IE implements <video> at some point but does not support Ogg or
> MPEG-4 out of the box. Then an author wishing to provide 3 media streams
> could still likely get the job done, since browsers could likely determine
> whether or not particular basic content types are supported. It might be
> hard to get more complex cases right though.
>

IMHO load() should be asynchronous and should try each in turn. That would
dramatically increase the power of fallback and doesn't seem to cost too
much. Chris Double points out that there are edge cases where some streams
in a container are supported, but others aren't; for example a framework
might support only Ogg Vorbis but not Theora, and you try to play a
Vorbis+Theora file, and you get no error from the framework, but you might
have preferred to fall back. However, if the author provided the right MIME
information, the UA could know that there is supposed to be video, and
detect that there isn't any video coming out, and fall back.

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/ee0743d4/attachment.htm>


More information about the whatwg mailing list