Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
It’s great that HTML5 video comes with its own controls, but at times they don’t meet the needs of your application. Learn how to use the HTML5 video APIs to create your own controls in JavaScript.
It’s fantastic to have built-in controls in every video element.
However, in some cases the default controllers just don’t meet your needs.
For those cases, the HTML5 <video> tag provides a rich set of APIs
that you can control through JavaScript. These APIs are flexible enough to
allow you to build an entirely new set of controls for your video. Let’s
look at some of the more relevant controls.
Before building out the JavaScript code, let’s start with some basic
markup. We’ll have a video element and
a list of buttons below it: