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

OnError event handler not firing on 404 and 500 errors with chunk requests

Hi all.

We're using jwplayer for streaming m3u8 playlist with our own streaming server.
Our streaming server has sequential 1hour files of the recordings it should stream.
We're testing a scenario where we have, for instance, one only hour file - let's say from 13hrs to 14hrs (not the previous nor the subsequent file) and we're playing back, as an example, from 13hr to 14h.30m.

Now, our streaming server, in this scenario, will provide us with a chunk list for the whole playback period requested, even if there are no chunks available from 14h to 14h30m.

We can see 500 and 404 errors being thrown by the streaming server in the browser console as soon as jwplayer requests chunks that do not exist, but jwplayer does not fire onerror when this happens.

Shouldn't jwplayer fire this onerror event when it's requesting chunks and receives a 404 not found or a 500 internal server error?

Is there any way we can capture these failures?

Our aim is to display a message "no media available" in these scenarios, but since the onerror event is not firing, we're unable to capture these events at all and, as so, jwplayer just continues playback for another 30 secs (it's requesting chunks 30 secs ahead of playback actual position) and then it just remains with the last frame received still (and errors keep on going in the browser console with no events fired on jwplayer).

Can you help us on this issue please?

3 Community Answers


JW Player Support Agent  
0 rated :


Can you possibly provide a sample link to your manifest file or embed?

Thank you


0 rated :

playlist.m3u8 content sample:


chunks.m3u8 content sample:


please keep in mind that, as I referred in my first question, "our streaming server, in this scenario, will provide us with a chunk list for the whole playback period requested, even if there are no chunks available from 14h to 14h30m."

We cannot provide a link or embed an example because this is not for a public domain application.



JW Player Support Agent  
0 rated :

Hello Joao,

if the player receives an error you should be able to console.log the error with the following as an example:

console.log(“There was an Error Randy”);

You could potentially try the onSetupError as well to see if that works for you.


This question has received the maximum number of answers.