HTML and CSS Reference
In-Depth Information
Listing I.9.
<video>
element with multiple
<track>
elements
a
<menu>
to the page under the
<video>
element that looks like the following code.
Listing I.10. A
<menu>
for choosing the text track
<menu>
<button>
Captions
</button>
<button>
Subtitles
</button>
<button>
Descriptions
</button>
</menu>
Finally, you need code that makes actions happen when the buttons are clicked. You can
reuse the menu-handling function from
chapter 8
with appropriate changes to reflect the
new functions. The code is shown in the next listing.