format |
IE |
Firefox |
Opera |
Chrome |
Safari |
Ogg |
No |
3.5+ |
10.5+ |
5.0+ |
No |
MPEG 4 |
9.0+ |
No |
No |
5.0+ |
3.0+ |
WebM |
No |
4.0+ |
10.6+ |
6.0+ |
No |
OGG = Ogg file with Theora video encoding and Vorbis audio encoding
MPEG4 = MPEG 4 file with H + video encoding and AAC audio encoding
WebM = WebM file with VP8 video encoding and Vorbis audio encoding
<Videowidth= " the"Height= "+"Controls= "Controls"> <Sourcesrc= "Movie.ogg"type= "Video/ogg"> <Sourcesrc= "Movie.mp4"type= "Video/mp4">Your Browser does not support the video tag. Or you can add flash to the backup plan.</Video>
Properties |
value |
Description |
AutoPlay |
AutoPlay |
If this property appears, the video plays as soon as it is ready. |
Controls |
Controls |
If this property appears, the control is displayed to the user, such as the play button. |
Height |
Pixels |
Sets the height of the video player. |
Loop |
Loop |
If this property appears, the media file starts playing again when it finishes playing. |
Preload |
Preload |
If this property appears, the video loads when the page loads and prepares to play. If you use "autoplay", the property is ignored. |
Src |
Url |
The URL of the video to play. |
Width |
Pixels |
Sets the width of the video player. |
Method |
Properties |
Events |
Play () |
Currentsrc |
Play |
Pause () |
CurrentTime |
Pause |
Load () |
Videowidth |
Progress |
Canplaytype |
Videoheight |
Error |
|
Duration |
Timeupdate |
|
Ended |
Ended |
|
Error |
Abort |
|
Paused |
Empty |
|
Muted |
Emptied |
|
Seeking |
Waiting |
|
Volume |
Loadedmetadata |
|
Height |
|
|
Width |
|
Audio----------------------------------------------------------------------------------------------------------------------- -----------------------------
|
IE 9 |
Firefox 3.5 |
Opera 10.5 |
Chrome 3.0 |
Safari 3.0 |
Ogg Vorbis |
|
√ |
√ |
√ |
|
MP3 |
√ |
|
|
√ |
√ |
Wav |
|
√ |
√ |
|
√ |
<AudioControls= "Controls"> <Sourcesrc= "Song.ogg"type= "Audio/ogg"> <Sourcesrc= "Song.mp3"type= "Audio/mpeg">Your Browser does not support the audio tag.</Audio>
Properties |
value |
Description |
AutoPlay |
AutoPlay |
If this property appears, the audio plays immediately when it is ready. |
Controls |
Controls |
If this property appears, the control is displayed to the user, such as the play button. |
Loop |
Loop |
If this property appears, the playback starts again each time the audio ends. |
Preload |
Preload |
If this property appears, the audio loads when the page loads and prepares to play. If you use "autoplay", the property is ignored. |
Src |
wr. |
The URL of the audio to play. |
HTML5+CSS3 Learning notes Audio and video