Hello David Anderson ,
I see you've set up the VTT chapters file correctly. However, browsers don't display chapters automatically, so you'll need to add some JavaScript to create the visible navigation.
Fix your HTML first:
<video controls width="1920" height="1080">
<source src="Recordings/Short sample.mp4" type="video/mp4">
<track kind="chapters" src="MyChaptersVTT.vtt" srclang="en" default>
</video>
JavaScript sample for visible chapter navigation:
const video = document.querySelector('video');
video.addEventListener('loadedmetadata', () => {
const track = video.textTracks[0];
track.cues.forEach(cue => {
const button = document.createElement('button');
button.textContent = cue.text;
button.onclick = () => video.currentTime = cue.startTime;
document.body.appendChild(button);
});
});
This is just sample code to demonstrate the concept. You'll need to add proper error handling and CSS styling for production use. The VTT provides the data, but you must build the entire UI yourself since browsers don't show chapter markers by default.
Hope this helps!