...
Metadata Tracks are used to convey any additional information (such as base64 encoded images, JSON, additional text or any additional text-based file format) the developer needs to include in the page based on time indexes. A web app can listen for cue events, extract the text of each cue as it fires, parse the data and then use the results to make DOM changes (or perform other JavaScript or CSS tasks) synchronised with media playback.
Code Block | ||
---|---|---|
| ||
WEBVTT - Example metadata track containing JSON payload multiCell 00:01:15.200 --> 00:02:18.800 { "title": "Multi-celled organisms", "description": "Multi-celled organisms have different types of cells that perform specialised functions. Most life that can be seen with the naked eye is multi-cellular. These organisms are though to have evolved around 1 billion years ago with plants, animals and fungi having independent evolutionary paths.", "src": "multiCell.jpg", "href": "http://en.wikipedia.org/wiki/Multicellular" } insects 00:02:18.800 --> 00:03:01.600 { "title": "Insects", "description": "Insects are the most diverse group of animals on the planet with estimates for the total number of current species range from two million to 50 million. The first insects appeared around 400 million years ago, identifiable by a hard exoskeleton, three-part body, six legs, compound eyes and antennae.", "src": "insects.jpg", "href": "http://en.wikipedia.org/wiki/Insects" } |
...