Here's what I have...
<video id="video" controls="controls" preload="metadata" poster="/video/promotional/transparent.png">
<source src="/video/promotional/promotional.mp4" type="video/mp4" />
<source src="/video/promotional/promotional.webm" type="video/webm" />
<source src="/video/promotional/promotional.ogv" type="video/ogg" />
<track src="/video/promotional/promotional.vtt" label="English Captions" kind="subtitles" srclang="en-us" />
</video>
<script type="text/javascript">
$(document).ready(function() {
var video = document.querySelector('#video');
var.track = video.textTracks[0];
track.mode = 'hidden';
});
</script>
I was hoping this would turn off closed caption by default, but it doesn't seem to be the case. Any ideas?
Your answer was very close (I assume
var.track =
was a typo - fixing that works in Chrome and Safari on OSX and IE on PC for me). For re-use I like to split the textTracks out into a variable, but that's personal preference: