5. JavaScript API and Custom Controls

HTML5 audio and video provide a lot of functionality out of the box, but it doesn’t stop there. HTML5 also provides a wonderfully easy-to-use Media JavaScript API that you can use to extend that basic functionality in other ways.

You’ve all seen the default controls that browsers add to your video or audio content, and some are pretty ugly. Well, an excellent use of the JavaScript API is to roll out your own multimedia controls. You can style them however you like using CSS, and then hook them up via the API to control your video and audio.

This chapter describes the attributes, methods, and events of the JavaScript API and then shows you how to put together your own control set and connect it to make it ...

Get HTML5 Multimedia: Develop and Design now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.