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

JW7: Captions not displayed for playlists


Hi,

When using a playlist containing videos with captions, the caption of the first video is correctly shown, but not for the next videos of the playlist. The caption button is on. If I click twice on it, I can see the caption appearing. But again, when the next video is played, no caption.

It used to work fine in JW6.

Thanks.

Martin

13 Community Answers

Cooper Reid

JW Player Support Agent  
0 rated :

Can you please provide a link so we can troubleshoot your issue?

Regards,
Cooper

videosmc

User  
1 rated :

Hi Cooper,

You can see an example here :

http://videosmc.raidghost.com/index.php?plid=8

Note that I found the following workaround to solve my issue :
Disabling and enabling captions each time a new playlist item is played :


jwplayer("playerSMC").on('playlistItem',function(event){
jwplayer("playerSMC").setCurrentCaptions(0);
jwplayer("playerSMC").setCurrentCaptions(1);
});

Martin

Cooper Reid

JW Player Support Agent  
0 rated :

Hi Martin,

The behavior of the captions is dictated by the ‘default’ parameter – if you set that to true, the captions will appear when playlist items are switched. ie:

jwplayer(“player”).setup({
playlist: [{
‘file’: ‘bunny.mp4’,
‘title’: ‘Bunny’,
‘tracks’: [{
‘file’: ‘vtt/bunny.vtt’,
‘label’: “English”,
‘default’: true
}]
}, {
‘file’: ‘tears.mp4’,
‘title’: ‘Tears’,
‘tracks’: [{
‘file’: ‘vtt/bunny.vtt’,
‘label’: “English”,
‘default’: true
}]
}],
image: ‘bunny.jpg’,
width:‘100%’
});

Kind Regards,
Cooper

videosmc

User  
0 rated :

Hi Cooper,

Thanks for your answer.

The default parameter was already set to true in my example, so I'm a bit confused here.
Do you have an example where it works fine ?

Regards,

Martin

Cooper Reid

JW Player Support Agent  
0 rated :

Hi Martin,

That code I showed above works fine when I put it on a testing page using the JWPlayer version 7.1.0 -

Best Regards,
Cooper

sprecher

User  
0 rated :

I am wondering, if videosmc and me are the only people with that issue.

Because I am facing exactly the same behviour.
Captions work nicely in the first video of the playlist but are not displayed in the second and on.

"default" is set to true and the CC-Button is in fact active. The player should be putting the captions over the video but just as videosmc decribed it, from the second playlist video and on, they are not diplaying even though the button is showing active and the "default" obviously had an impact.
I have to click CC twice (deactivate and activate again) to see the captions.

This is weird. Is it really not a known issue? Just asking, because it behaves like that in any player instance with a playlist.

Since the playlist sidebar has been removed, closed captions are an easy (and pretty much the only way without a lot of effort for a non-coder), to quickly display a short description.

I am using the player mainly to showcase my work as a voice over artist. So i really need that feature to work to quickly descibe, wich voice in the scene is mine.

Would be great if you had another hint for me. If not, I'll check out videosmc's workaround.

But that workaround seems like doig the same thing twice, sind 'default'; 'true' obvoiusly works... just the captions are not showing.

sprecher

User  
0 rated :

Oh, just to demonstrate, you can observe how the player behaves like decribed abouve here:

http://www.peterlehn.de/

Notice how the CC-Button is active when the player switches to the second video. "default": true is obviously set.
The CC-Button is active but the cc is not being diplayed between 2 an 7 seconds into the video.
Pressing the CC-Button twice to deactiate and then activate again finally shows the cc like in the corresponding vtt-file.

sprecher

User  
0 rated :

I now ran into a new really weird problem with closed captions. it is still a playlist problem.

When moving to the next item in the playlist, the player show the content of the VTT file from the previous playlist item. I played around with this a little bit and came to the conclusion, that this only happens, when "default" is set to true. when i disable "default" on all playlist items and toggle the cc's everthing works nicely.
when I set "default" to true on any playlist item and the ones after that one, only the cc's from the vtt file of the first playlist item will be displayed... including all following playlist items... showing the first item's vtt file content.

Not really sure what to do tbh.

srt142

User  
0 rated :

Just started to work with 7 in development. I am having this identical problem. Weird captioning with playlists. First one is fine, second one sometimes plays the first file. Sorry I don't have this up where I can share a link.

Ajvngou

User  
0 rated :

Same problem here with 7.1.4, used code:

<div id="myElement">Loading the player...</div>
<script type="text/javascript">
var playerInstance = jwplayer("myElement");
playerInstance.setup({
playlist: [{
file: "https://youtu.be/W3JZkwHEAx8",
image: "/img/MasterChef-US.jpg",
title: "MC 1x08",
mediaid: "123456",
tracks: [
{file: "/titulky/MC-1x08.srt", default: "true"}
]
},{
file: "https://youtu.be/JaXmxMSD1GQ",
image: "/img/MasterChef-US.jpg",
title: "MC 1x09",
mediaid: "234567",
tracks: [
{file: "/titulky/MC-1x09.srt", default: "false"}
]
}],
width: "100%",
aspectratio: "16:11",
captions: {
color: '#FFF151',
fontSize: 18,
edgeStyle: "raised",
backgroundOpacity: 100
}
});
</script>

Ajvngou

User  
0 rated :

Btw: i must click twice on "CC" button to reload the right captions after finishing first file.

jsteeman

User  
0 rated :

Any answer so far on this bug?
I'm experiencing the same at http://better-regulation.eu/nl/

sprecher

User  
1 rated :

Okay,

I really love JWPlayer and all, but this is really annoying. I can reproduce this on any server, on any url i own. No matter if on a static html site or putting the .js in the head of a contao theme... using the player self hosted or cloud hosted... it doesn't matter the player works fine but closed captions do not. at least not in a playlist. It doesn't even matter if you are setting up the playlist right there in your embed code or in an xml playlist.

It all leads to the same result. Using JWPlayer with a playlist (self hosted version 7.2.4) and assigning each playlist item a vtt-file will result in only the vtt of the first video in the playlist to be shown... on all videos of the playlist. just like the player would use the first vtt for all videos of a plylist or simply ignore the other vtt files.

Cooper, it is great that it works on your test site, but it does not work on any of mine. And I am pretty sure that this is not just failing bcs of me setting up the player incorrectly. And obviously there are other people having the same problem.
My guess is, that the majority of people experiencing this problem just simply will not report ist, but I think you should take those reporting this bug more serioulsy, rather then sayin: "my test page's fine."

I do not intend to use this for subtitles.I just want to show customers in my demos, what voice actor of what role I am. Right at the beginning of the video. Of course I can simply go ahead and open final cut an put in a nice lower third thingie there, but with CCs it would be soooo much easier, especially since those demos are up for just a few weeks until they are replaced and updated.

I really don't mean to be rude an hope you don't take any offense here, but I need to say: At least some reaction or answer to other folks experiencing the same issue would be nice. But nothing in months... ?

This question has received the maximum number of answers.