HTML5 TUTORIALS - HTML5 Audio & Video
HTML5 Audio & Video
ADVERTISEMENTS
|
ADVERTISEMENTS
|
ADVERTISEMENTS
Video Attribute Specification:
Attribute | Description |
---|---|
autoplay | This boolean attribute if specified, the video will automatically begin to play back as soon as it can do so without stopping to finish loading the data. |
autobuffer | This boolean attribute if specified, the video will automatically begin buffering even if it's not set to automatically play. |
controls | If this attribute is present, it will allow the user to control video playback, including volume, seeking, and pause/resume playback. |
height | This attribut specifies the height of the video's display area, in CSS pixels. |
loop | This boolean attribute if specified, will allow video automatically seek back to the start after reaching at the end. |
preload | This attribute specifies that the video will be loaded at page load, and ready to run. Ignored if autoplay is present. |
poster | This is a URL of an image to show until the user plays or seeks. |
src | The URL of the video to embed. This is optional; you may instead use the <source> element within the video block to specify the video to embed |
width | This attribut specifies the width of the video's display area, in CSS pixels. |
|
|
Audio Attribute Specification:
Attribute | Description |
---|---|
autoplay | This boolean attribute if specified, the audio will automatically begin to play back as soon as it can do so without stopping to finish loading the data. |
autobuffer | This boolean attribute if specified, the audio will automatically begin buffering even if it's not set to automatically play. |
controls | If this attribute is present, it will allow the user to control audio playback, including volume, seeking, and pause/resume playback. |
loop | This boolean attribute if specified, will allow audio automatically seek back to the start after reaching at the end. |
preload | This attribute specifies that the audio will be loaded at page load, and ready to run. Ignored if autoplay is present. |
src | The URL of the audio to embed. This is optional; you may instead use the <source> element within the video block to specify the video to embed |
Event | Description |
---|---|
abort | This event is generated when playback is aborted. |
canplay | This event is generated when enough data is available that the media can be played. |
ended | This event is generated when playback completes. |
error | This event is generated when an error occurs. |
loadeddata | This event is generated when the first frame of the media has finished loading. |
loadstart | This event is generated when loading of the media begins. |
pause | This event is generated when playback is paused. |
play | This event is generated when playback starts or resumes. |
progress | This event is generated periodically to inform the progress of the downloading the media. |
ratechange | This event is generated when the playback speed changes. |
seeked | This event is generated when a seek operation completes. |
seeking | This event is generated when a seek operation begins. |
suspend | This event is generated when loading of the media is suspended. |
volumechange | This event is generated when the audio volume changes. |
waiting | This event is generated when the requested operation (such as playback) is delayed pending the completion of another operation (such as a seek). |
|
|