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

Caption is not coming


I am using jw player 7.8 version . The problem is when i play it on local server caption is coming but when i play it on production server caption not coming . I am passing json formatted playlist, video and vtt is accessing from aws s3. But when i use 6.12 version vtt prolem does not come but playlist functionality is not in 6.12. I switch to 7.12 but this version has also same issue. And my production server already allow origin. In dev tool's network's tab vtt files is loaded but not set in videos' strack cue length shows 0.

6 Community Answers

Rehan Ali Rizvi

Best Answer 

Hello george,

Yes same issue is coming in latest version.

Actually this is not issue at your side, i fixed this from my server side script.

But i think it is not bad idea to trim vtt before applying any regex.

View in conversation

George

JW Player Support Agent  
1 rated :

For me to reproduce this issue reliably I will need the following information:

Browser name and version:
Operating System name and version:
Device make and model:
Provide step by step instructions on how to reproduce the issue on your page:
A test page replicating the issue as described in the document below:
https://support.jwplayer.com/customer/portal/articles/2186238-troubleshooting-%E2%80%94-creating-a-test-page

The test page must not contain any additional code or CSS, it must only contain the player and concrete steps to reproduce with expected and actual behavior.

Rehan Ali Rizvi

User  
1 rated :

Thanks George for your reply. I think i got the problem, may be the problem is vtt file loading. I am passing json formatted playlist and inside it i am passing my server script path which get vtt from s3. May be player start before getting vtt file from server , there by caption not shows. Is there any way to check vtt is loaded and after vtt loaded on video track i start jw palyer.

George

JW Player Support Agent  
0 rated :

Request the VTT before calling setup

Rehan Ali Rizvi

User  
0 rated :

Hello George,

After spending lots of hours finally i got the problem, problem was not with the loading time of vtt. Actually there is one bug in jw player library version 7.8. After debugging my code i unminified jw player library, in library you are adding script vttparser.js for parsing vtt file but in that script you are using regular expression for checking "WEBVTT" at first but in my vtt file there is blank line at first so your code break there thereby vtt was not coming.

I trim vtt file before parsing now problem is not coming. I think yo should also trim vtt before parsing in library.

Screenshot of issue in vttparser : https://www.screencast.com/t/mWx3CIb6Zq
Screenshot of solution : https://www.screencast.com/t/eo7XAuLkN

Thanks & Regards.

George

JW Player Support Agent  
1 rated :

Is the same issue present in the latest player?

In general I’d expect the VTT file to not have a space before the WEBVTT declaration.

Rehan Ali Rizvi

Best Answer  User  
1 rated :

Hello george,

Yes same issue is coming in latest version.

Actually this is not issue at your side, i fixed this from my server side script.

But i think it is not bad idea to trim vtt before applying any regex.

This question has received the maximum number of answers.