Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Closed Caption with VTT or SRT not working


Hi,
I am trying to add a simple closed caption with VTT or SRT files. The player loads and the video plays just fine and also shows CC button enabled but my VTT file is not read and the CC text are not displaying.

What am I missing?

here is my code:

<head>
<title></title>
<script src="/jwplayer/jwplayer.js"></script>
<script>jwplayer.key = "XXXXXXXXXXXXi1RXlWpLd8NXXXX==";</script>
</head>
<body>
<div id="myElement">Loading the player...</div>
<script type="text/javascript">
jwplayer('myElement').setup({
primary: 'flash',
playlist: [{
sources: [{
file: 'samplevideo.mp4',
}],
title: "Sample Movie Trailer",
tracks: [{
file: "engilishcaption.srt",
label: "English",
kind: "captions",
"default": true
},
{
file: "frenchcaption.vtt",
kind: "captions",
label: "French"
}]
}]

});

jwplayer('myElement').setCurrentCaptions(1);
</script>
</body>
</html>

1 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Please provide a link.

This question has received the maximum number of answers.