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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.