This course has been updated! We now recommend you take the Complete Intro to Web Development, v3 course.

Check out a free preview of the full Introduction to HTML5 and CSS3 course:
The "HTML5 Audio & Video" Lesson is part of the full, Introduction to HTML5 and CSS3 course featured in this preview video. Here's what you'd learn in this lesson:

The HTML5 AUDIO element attributes are SRC, AUTOBUFFER, AUTOPLAY, LOOP, CONTROLS. Only certain browsers support certain audio file formats – therefore, add multiple source files to act as “back-ups” to accommodate any browser. Q&A: Will a browser be tripped up by multiple playable formats? Nope, it’ll pick the first one it can play. Is there a specific order for formats? Nope. The old way of requesting source code to include a video on your webpage is obsolete with HTML5 video sourcing directs you to the video. Required HTML5 VIDEO element attributes are WIDTH, HEIGHT, IMO, POSTER, VIDEO, AUTOPLAY, LOOP and CONTROL if you like to share! HTML5 supports CODECs: Ogg (Vorbis) without worrying about patents, H.264 and WebM (wrapper for VP8 and Ogg audio streams). As with audio, only certain browsers support certain video formats – using tools like http://firefogg.org/. Christopher heartily endorses using the open-source VLC video player http://www.videolan.org/vlc/ that can play/convert almost anything. HTML5 VIDEO resources: Mark Pilgrim’s tutorial http://diveintohtml5.info/video.html HTML5’s VIDEO element is part of the DOM and can therefore be manipulated to create custom video players without using Flash.

Get Unlimited Access Now