HTML and CSS Reference
In-Depth Information
Listing I.9. <video> element with multiple <track> elements
Next, you'll need buttons to hang the functionality from. Just as you did in chapter 8 , add
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
<button> Captions </button>
<button> Subtitles </button>
<button> Descriptions </button>
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.
Search WWH ::

Custom Search