[theora] <video src="*.ogg">
Gregory Maxwell
gmaxwell at gmail.com
Thu Jan 14 13:50:36 PST 2010
On Thu, Jan 14, 2010 at 3:07 PM, Michael A. Peters <mpeters at mac.com> wrote:
> I'm all for open standards, but I don't live in Utopia.
> As I stated in an off list e-mail to another, there is a serious problem
> in the html5 spec in that browsers who do not handle one of the
> presented source types may (and do) choose to do nothing instead of
> rendering the fallback content.
> That means using Java as a fallback is
> only going to work with browsers that do not support html5 media at all,
> hence the need to use closed formats in addition to Theora in order to
> get your content usable by the widest variety of users who really don't
> care about switching their browser or installing some plugin just to
> watch our content.
This is completely untrue.
The proscribed way of handling the fallback was explained in detail on
WHATWG, but I'll repeat it here in short or those who missed the
discussion:
You use <video> with your ogg/theora file like normal.
On page load you have a JS hook that creates a empty <video/> object.
It then asks the video object if it can play Ogg/Theora+Vobis using
the canPlayType("video/ogg;codecs=\"theora,vorbis\"") method. If it
can, the script stops.
If it can't play the file, then it detects which method(s) will work
and replaces all the video tags in the page with a working method.
Optionally, it can nag the user to get current.
HTML fallback of the tag based on the content can't work because the
tag's src can be changed on the fly, and you end up with ugly race
conditions with fallback execution. The browser vendors seemed to be
unanimous about not implementing this, fortunately the JS based
fallback is completely suitable and will even work or clients with JS
disabled[1] if they have native support.
[1] Er. Except disabling javascript in firefox currently breaks the
built in video controls!
More information about the theora
mailing list