I have two problems. As soon as I put the track tag within my video element the video's default controller shows up. I have custom controls so it's quite the problem.
Second. I can't find a way to toggle closed caption on an off.
HTML:
<video id="trailers" poster="images/poster/poster.jpg">
<source src="media/vLast.mp4" type="video/mp4">
<source src="media/vLast.webm" type="video/webm">
<track id="mytrack" label="English Subtitles" src="subtitles.vtt" srclang="en" default />
</video>
<button id="cc">CC</button>
JS:
var cc = document.getElementById('cc');
function cc(){
var video= document.getElementById('media');
var track1 = video.textTracks[0];
var mytrack = document.getElementById('mytrack');
var track2 = mytrack.track;
console.log(track1);
console.log(track2);
}
cc.addEventListener('click',cc,false);