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

Randy

JW Player Support Agent  
0 rated :

Hello,

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

Thank you

joao.rocha

User  
0 rated :

playlist.m3u8 content sample:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=500,CODECS="avc1.77.40, mp4a.40.2",RESOLUTION=16x9
chunks.m3u8?req=2015-4-9PT13H00M0.000S_PT1H0M0.0S&outputid=bb4ba022-2ed4-45dd-9eb0-fb038871488b&audio=0&token=5dc476a3-dd45-4367-bc36-824b49287e57


chunks.m3u8 content sample:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:4,
2015-04-09PT13H00M00.000S_PT04.000S_0.ts?outputid=bb4ba022-2ed4-45dd-9eb0-fb038871488b&audio=0&token=5dc476a3-dd45-4367-bc36-824b49287e57
#EXTINF:4,
2015-04-09PT13H00M04.000S_PT04.000S_1.ts?outputid=bb4ba022-2ed4-45dd-9eb0-fb038871488b&audio=0&token=5dc476a3-dd45-4367-bc36-824b49287e57
#EXTINF:4,
2015-04-09PT13H00M08.000S_PT04.000S_2.ts?outputid=bb4ba022-2ed4-45dd-9eb0-fb038871488b&audio=0&token=5dc476a3-dd45-4367-bc36-824b49287e57
#EXTINF:4,
2015-04-09PT13H00M12.000S_PT04.000S_3.ts?outputid=bb4ba022-2ed4-45dd-9eb0-fb038871488b&audio=0&token=5dc476a3-dd45-4367-bc36-824b49287e57
#EXTINF:4,
2015-04-09PT13H00M16.000S_PT04.000S_4.ts?outputid=bb4ba022-2ed4-45dd-9eb0-fb038871488b&audio=0&token=5dc476a3-dd45-4367-bc36-824b49287e57
#EXTINF:4,
....

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.

thanks.

Randy

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:

jwplayer().onError(function(){
console.log(“There was an Error Randy”);
});

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

http://support.jwplayer.com/customer/portal/articles/1442607-example-a-custom-error-message

Randy

This question has received the maximum number of answers.