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

How to catch Captions Error loading file


Dear JW support team,

I want reload player when captions load failed.

In console debug on browser, player showed message: CAPTIONS(Error loading file)

How to catch captions Error loading file event?

Thanks for support!

3 Community Answers

Alex

JW Player Support Agent  
0 rated :

Hi there,

I do not believe the .on(“error”) API event fires when the captions don’t load as the event is usually just for the content. However, if you can give me a link to your reproduction page that shows that error, I can see if there’s anything I can find out in terms of being able to act on that error.

Thank you.

Vega Player

User  
0 rated :

Dear Alex, JW support team,

here is my test with load 404 captions url

http://125.212.242.100/captions/test.html

How to catch captions Error loading file event?

Alex

JW Player Support Agent  
0 rated :

Since the error is that the captions file cannot be found (404), which is an error fired by the browser, rather than the player loading the captions then having an issue rendering them, there would be no such API event that would track this.

If you don’t mind me asking, what would you be wanting to do if the captions fire an error anyway? Your particular issue could just be resolved by making sure 88258.srt is located in the same directory as your page.

Thank you.

This question has received the maximum number of answers.