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

HLS stopped working after about three hours


Hi there,

I use AWS Elastic Transcoder for for HLS streams. I then host them in a S3 bucket with CloudFront so that I can serve content with signed urls. The index file works fine and I can stream the HLS perfectly.

However, after a period of time (a few hours) the stream will no longer work even though I haven't made any changes subsequently on either AWS CloudFront or the PHP that calls the index file.

I am at my wits end, having tried looking at the CloudFront distribution, I cannot see why my streams initially work but then fail after a few hours.

The error code is "Error Loading Media: File could not be played."

The files stream okay when I call them from the S3 bucket, but fail through CloudFront. I've looked at another CloudFront distribution that serves MP4 (without issues) and cannot see any discrepancies between the two CloudFront distributions.

Please can anyone advise me?

Kind Regards

4 Community Answers

Todd

JW Player Support Agent  
0 rated :

I see you have a Free account with us, so your players will not support HLS playback in all browsers, but I would expect them to work in Safari.

Is it possible that your signed URL changed but the player is still requesting a now-expired one? Do your streams play natively in Safari on Mac outside of our player?

One troubleshooting suggestion I have is to upload your video to your JW Player account dashboard to see if our token signing does anything differently.

j...

User  
0 rated :

Ok, Todd. I will try that thanks for your help.

Kind Regards

j...

User  
0 rated :

I can confirm that the signed urls will not play outside of JW Player. Safari just keeps saying 'Loading'.
If I go to the AWS distribution for the S3 bucket in question and set Restrict Viewer Access to 'No' - then the videos work through JW Player.

I'm sure the issue is with CloudFront but I cannot see where. MP4 files play fine. It seems to be a problem with anything involving a playlist - i.e HLS.

Kind Regards

Todd

JW Player Support Agent  
0 rated :

If the signed URLs do not play natively in Safari, then unfortunately there is nothing our player can do to fix it either.

Do you have a link to a reproduction page? The next step in troubleshooting would probably be to curl each URL from the terminal and see what gets returned.

Are the CORS headers set correctly on the CloudFront side? Please see https://support.jwplayer.com/customer/portal/articles/1403679-crossdomain-file-loading for more details.

This question has received the maximum number of answers.