Docsity

HTML5 Audio and Video - Web Programming - Lecture Slides, Slides of Computer Programming

Partial preview of the text

Download HTML5 Audio and Video - Web Programming - Lecture Slides and more Slides Computer Programming in PDF only on Docsity!

HTML5 Audio and Video

History

 Playing audio and video used to be something

of a novelty

 You would embed a control (with the **** element) into your page to use Flash, Quicktime, Windows Media, … to play the thing

 HTML5 supplies simple audio / video support

through the and tags

 Both work similarly

The element

 the element plays an audio file

 Use the src attribute to reference the audio file to play  Use the controls attribute to include playback controls  The preload attribute preloads the audio file before playing  Values metadata, none, auto

The Element

 Works much like the element

 The poster attribute displays an image while

the video is loading