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

HLS and SRT/WebVTT captions?


Hi,

Were experiencing that JWPlayer doesn't load external captions with the track -element when playing HLS. Is this a known bug or is there something were missing?

We've played SRT captions succesfully over RTMP but now that we are streaming with HLS captions doesn't seem to work in flash mode.

5 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have a link?

santeri.lindgren

User  
0 rated :

Sorry our players are behind a paywall but i'll paste some code here:

jwplayer("jwplayer").setup({
abouttext: "About Striim.in",
aboutlink: "http://www.striim.in",
skin: "/sites/all/modules/custom/striimin_video_formatter/jw-skins/striimin_basic.xml",
flashplayer: "/sites/all/modules/custom/striimin_video_formatter/jw/jwplayer.flash.swf",
html5player: "/sites/all/modules/custom/striimin_video_formatter/jw/jwplayer.html5.js",
image: "/main_img.png",
file: "/MASTER_ENG_striiminlogolla-striimin.mov-playlist.m3u8",
width: "100%",
aspectratio: "16:9",
primary: "flash",
androidhls: "true",
ga: {}, // enable google analytics
captions: {
color: "#FFFFFF",
fontSize: 22,
fontOpacity: 100,
backgroundOpacity: 0,
edgeStyle: "uniform"
},
tracks: [{
file: "/seuraavaan_mutkaan_sub_de_v4.srt",
kind: "captions",
label: "German"
},{
file: "/seuraavaan_mutkaan_sub_eng_v2.srt",
kind: "captions",
label: "English"
},{
file: "/seuraavaan_mutkaan_sub_es_v4.srt",
kind: "captions",
label: "Spanish"
},{
file: "/seuraavaan_mutkaan_sub_fin_v2.srt",
kind: "captions",
label: "Finnish"
},{
file: "/seuraavaan_mutkaan_sub_fr_v3.srt",
kind: "captions",
label: "French"
},{
file: "/seuraavaan_mutkaan_sub_hu_v3.srt",
kind: "captions",
label: "Hungarian"
},{
file: "/seuraavaan_mutkaan_sub_it_v3.srt",
kind: "captions",
label: "Italian"
}]
});

santeri.lindgren

User  
0 rated :

I removed all the servers. Oh yeah, we use cloudfront and s3 on all.

the subs and the movie file are both in the same server, there shouldn't be no cross site loading problems.

And when i look into the network tab i don't see my browser trying to load the captions.

santeri.lindgren

User  
0 rated :

Ok, i found the problem.

We were loading the playlist file using http and subtitles using https ... moving both to use the same protocol worked ... :D

Ethan Feldman

JW Player Support Agent  
0 rated :

Great :)

This question has received the maximum number of answers.