HTML and CSS Reference
In-Depth Information
loop When inished, the media ile should be replayed.
controls Displays a set of controls to let the user control the playing of
the medium.
he autoplay , preload , loop , and controls attributes are Boolean. As a gen-
eral rule, if autoplay is speciied, the controls attribute should also be provided
so that the user can turn of the player.
Additionally, the video element supports width and height attributes to set
the size of the playing area in pixels. If no height or width is supplied for a
video element, the browser should create a player that displays the video in a
300-by-150-pixel area.
he video element's optional poster attribute provides the URL of an
image ile that the browser can display while video data is loading or before
a movie is played. his can be a frame of the video or a title screen. Example
2.24 shows how to construct a video element with a fallback to use an Adobe
Flash plugin if the browser does not support HTML5 video. he Flash code is
incomplete. Only the framework is shown to give you an idea of how it might
be coded.
Example 2.24: using the HTML5 video element with a Flash fallback
<!DOCTYPE html>
<title>Example 2.24</title>
<video src="author.mp4" width="600" height="300"
poster="author.jpg" controls>
<!-- Use a Flash player if no HTML5 video -->
Search WWH ::

Custom Search