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

If no hls / m3ub available (accessDenied) play mp4 fallback

Is there a way that I can have my fallback mp4 play when the hls stream url throws an error like this:

<Message>Access Denied</Message>

Not sure if it matters, but this file is in an Amazon s3 bucket

5 Community Answers


0 rated :

Why not just fix the problem rather than going to fallback?
Your problem is permissions or CORS or crossdomain.xml not setup
I can help if you show me your page and your crossdomain file and cors settings


JW Player Support Agent  
1 rated :

Hi, there.

You can set up multiple sources for our player by following the steps on our Configuring Multiple Sources support article. The player will try to play the first source, then if it cannot play that file, it will move on to the second.

However, Mark is right. Your issue is most likely CORS related, meaning that the S3 bucket your video is on is not allowing your domain access to it. You can resolve this by checking out our Crossdomain File Loading support article.

Please let me know if you need any more help or have any other questions.

Thank you!


0 rated :

I will look into the crossdomain file loading, but how come my fallback playback format isn't being used when the first video isn't accessible? This is only happening on iPhone and Android devices, and also on the new Microsoft Edge browser. Here is my setup:

'width': '100%',
'sources': [{
file: '' // hls as default playback format
file: ' ' // fallback format
'rtmp': {
'bufferlength': '30'
"aspectratio": "16:9",
"image": "",
'autostart': 'true',
'primary': 'html5',
'modes': [
{ type: 'html5' },
{ type: 'flash', src: '' }



0 rated :

Fallback is for videos that the browser recognises are not supported, for example, HLS on Firefox where there is no flash player installed. It does not fallback when a file is specified that receives a 404 response.


JW Player Support Agent  
0 rated :

Correct – if a file gives the player an actual error, such as a CORS-related error, or its not found, then the player will not fallback.

In your case, I’m actually receiving CORS-related errors on both your HLS and MP4 sources in Chrome for OS X. Also, it is not suggested to mix HTTP and HTTPS sources, as they may cause issues in some browsers.


This question has received the maximum number of answers.