Monday, February 6, 2012

Video and Audio with HTML 5

Yesterday i tried Video and Audio tags in HTML 5 , sharing some quick notes.
How It Works
To show a video in HTML5, this is all you need:


The control attribute adds video controls, like play, pause, and volume.
Video Formats and Browser Support

Browser
MP4
WebM
Ogg
Internet Explorer 9
YES
NO
NO
Firefox 4.0
NO
YES
YES
Google Chrome 6
YES
YES
YES
Apple Safari 5
YES
NO
NO
Opera 10.6
NO
YES
YES

MP4 = MPEG 4 files with H264 video codec and AAC audio codec
WebM = WebM files with VP8 video codec and Vorbis audio codec
Ogg = Ogg files with Theora video codec and Vorbis audio codec


To play an audio file in HTML5, this is all you need:




Audio Formats and Browser Support
Currently, there are 3 supported file formats for the

Browser
MP3
Wav
Ogg
Internet Explorer 9
YES
NO
NO
Firefox 4.0
NO
YES
YES
Google Chrome 6
YES
YES
YES
Apple Safari 5
YES
YES
NO
Opera 10.6
NO
YES
YES

No comments:

Post a Comment