I have a video player with a track for captions:
<video ... >
<track src="/file.vtt" default kind="captions" srcLang="en" label="English" />
</video>
It loads and works great when the page loads, but I want to give users the ability to toggle/turn captions on and off with a custom button. I don't want to use the native video controls.
I tried:
btnClick(){
//get track ref
track.mode = "hidden"
}
Using javascript, but it's not doing anything.
How can I control the captions/track with javascript?