HTML5 <video> Element
The <video> element is used to contain a video player for a video media resource.
<video> Attributes
- HTML5 GLOBAL ATTRIBUTES
- src - a URI giving the location of the video.
- poster - a URI giving the location of an image to display while no video data is available.
- preload - this attribute can be used by web authors to set whether the video file is preloaded by the browser and can have one of these values:
- none - indicates to the browser that video file does not need downloading automatically due to not being needed or to save bandwidth.
- metadata - indicates the browser can download the information about the video track such as duration, title etc.
- auto - indicates the browser can download the entire track plus metadata as it will be needed.
- "" - an empty string - the same as auto.
- empty - ie.
<video preload>- the same effect as auto.
- autoplay - the video starts playing automatically if this attribute is present and plays to the end:
- autoplay -
<video autoplay="autoplay"> - "" - an empty string. ie.
<video autoplay=""> - empty - ie.
<video autoplay>
- autoplay -
- muted - used to give the default audio state of the video, can have the following values:
- muted - the audio is muted -
<video muted="muted"> - "" - an empty string. ie.
<video muted=""> - empty - ie.
<video muted>
- muted - the audio is muted -
- mediagroup - used to link multiple media elements together - a string.
- loop - same as repeat - the video plays on a loop starting again when it reaches the end. Can have the following values:
- loop -
<video loop="loop"> - "" - an empty string. ie.
<video loop=""> - empty - ie.
<video loop>
- loop -
- controls - when set this instructs the browser to supply playback controls - indicates that the designer hasn't
included any scripted controls. Can be set as follows:
- controls -
<video controls="controls"> - "" - an empty string. ie.
<video controls=""> - empty - ie.
<video controls>
- controls -
- width - the width of the
<video>element given in CSS pixels. - height - the height of the
<video>element given in CSS pixels.
