W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2009

[whatwg] HTML 5 video tag questions

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 11 Jul 2009 00:44:39 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0907110041510.23663@hixie.dreamhostps.com>
On Sun, 14 Jun 2009 jjcogliati-whatwg at yahoo.com wrote:
> 
> I read section 4.8.7 The video element and I have some questions:
>
> 1.  What happens if the user agent supports the video tag but does not 
> support the particular video codec that the video file has?  Should it 
> display the fallback content in that case, and if so, can a video tag be 
> put inside another video tag?

You can use the <source> element for fallback. If none of the available 
videos are supported, the video element just sits there doing nothing, 
and an 'error' event fires in the script.

The fallback contents are not shown if the element is supported; they are 
only intended for other browsers that don't support <video> at all.


> 2.  What is the recommended way for website authors to determine what 
> video and audio codecs and containers are supported by a user agent?

The canPlayType() method.


On Sun, 14 Jun 2009, Jonas Sicking wrote:
> 
> Hmm.. is that good? What if you want to use an <object> (to use flash or 
> java) or a <img> as fallback?

Then you do it with script.

The design is based around the assumption that we will eventually find a 
common codec so that fallback won't ever be needed in supporting UAs.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 10 July 2009 17:44:39 UTC

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