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

JW Player 6 Captions-2 not displaying


My .srt captions file is not displaying in the new jw6 player. Looking at the network trafic I can see that it isn't being called. Not sure what's up. here is the code I'm using which is pretty much lifted from the instructions. I don't see the CC button either.

<div id='my-video'></div>
<script type='text/javascript'>
jwplayer('my-video').setup({
file: 'privacy.mp4',
image: 'privacy.png',
skin: 'skins/stormtrooper.xml',
plugins: {
'captions-2': {
file: 'privacy.srt'
}
},
dock: 'false',
width: '480',
height: '270'
});
</script>

thanks,
Eric

20 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

In JW6, loading captions is different.

http://www.longtailvideo.com/support/jw-player/28845/adding-video-captions

JW Player

User  
0 rated :

That page helped and I've made changes to add the playlist object. I can see that my SRT file is loading in Chrome. The CC button displays in both the HTM L5 and Flash players...

However my captions do not show after selecting English from the tooltip. Here's the code...

<div id='my-video'></div>
<script type='text/javascript'>
jwplayer('my-video').setup({
skin: 'skins/stormtrooper.xml',
playlist: [{
captions: [
{ file: "privacy.srt", label: "English" }
],
file: "privacy.mp4",
image: "privacy.png"
}],
width: '480',
height: '270'
});
</script>

JW Player

User  
0 rated :

Argh! there was also a problem with my SRT file!

my bad.

Ethan Feldman

JW Player Support Agent  
0 rated :

Can I see where this is running?

Ethan Feldman

JW Player Support Agent  
0 rated :

Ah, no worries, glad you got it :)

JW Player

User  
0 rated :

Wish I knew what the problem you had was, as I am experiencing a similar bug. CC button shows, languages show, once you click a language you can see the console XHR loading without error, but no captions display

JW Player

User  
0 rated :

actually works in flash mode, but not in html5 mode. hmm

JW Player

User  
0 rated :

AHA! Found the pesky bugger bug. Hey Ethan - you might wanna adjust the html5 captions display div to compensate for playlists.

I found my caption div hiding under the playlist - when I remove playlist from the setup - the captions appear where they should be.

Man that took waaaaaaaaay too long to figure out :(

don't ask me for a link ;) you give it a try, you'll find that I'm right.

JW Player

User  
0 rated :

Also, now that I have the subtitle positioning accounting for the playlist positioned to bottom, i found that the captions are off center.

After some calculations i've discovered that it is subtracting my playlist size from the overall width before it does the math to center the caption.

Seeing this now makes me believe the overall bug is that you've forgotten bottom positioned playlist logic in your calculations.

Ethan Feldman

JW Player Support Agent  
0 rated :

@Grey – Glad you got things working, do you have a link?

JW Player

User  
0 rated :

I'm having the same problem as Grey with captions. CC button shows, languages show, once you click a language you can see the console XHR loading without error, but no captions display. What do you mean Grey by removing playlist from the setup? Please anybody give a solution writing the correct code to mend the bug!!

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have a link?

JW Player

User  
0 rated :

I can't give you a link because my page is not published yet. This is the code:

<script type="text/javascript">
jwplayer("video_player1").setup({
height: 360,
playlist: [{
captions: [
{file: "../videos/subtitle.srt", label: "English" }
],
image: "../videos/images/spanish_people.jpg",
file: "../videos/spanish_people.mp4"
}],
width: 640
});
</script>

Ethan Feldman

JW Player Support Agent  
0 rated :

That code looks fine. I am going to need to see a link in order to properly debug.

JW Player

User  
0 rated :

That's all fine now. I published the webpage and when it's online everything works. Thanks anyway!! :)

Ethan Feldman

JW Player Support Agent  
0 rated :

Np! :)

JW Player

User  
0 rated :

How do I get the video to start directly with a subtitle ?

Ethan Feldman

JW Player Support Agent  
0 rated :

In JW6 it is not possible to do that, yet.

JW Player

User  
0 rated :

ok thank you

Ethan Feldman

JW Player Support Agent  
0 rated :

Np

This question has received the maximum number of answers.