HTML and CSS Reference
In-Depth Information
Created by Daniel Carpenter on
<time pubdate="2012-03-15">March 15<sup>th</sup> 2012</time>
</p>
</header>
</article>
<video />
The <video /> element can be used to embed video within a page. I cover this
in the section ''Embedding Video with HTML5'' later in this chapter.
The <video /> element provides an alternative to using Flash to embed video
within an HTML document. It also has several JavaScript APIs to control the
playback of the video.
The video being played will automatically enter full screen in Android Browser on
versions lower than Android 4 Ice Cream Sandwich, but will remain in place in
Android 4 and above.
Table 3-3 shows the attributes available for the <video /> element.
Table 3-3. HTML5 Video Attributes
Attribute
Value
Description
src
Used to specify a single video file instead of using
the <source /> tags.
preload
none | metadata |
auto
Used to specify whether to preload the video file.
It's advisable to set this to either none or
metadata. This will prevent the browser from
downloading the entire video file without the user's
knowledge.
autoplay autoplay
Used to tell the browser to automatically play the
video file. If you do not want the video to play
automatically, do not add this element.
loop loop
Used to specify whether the video should
continuously loop. This attribute will not accept a
number. If you would like your audio to loop for a
specific number of times, you can do this using the
JavaScript video API.
 
Search WWH ::




Custom Search