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

Chrome, HTML5 and cross domain MP4 not working


Has anyone come across an issue where Chrome will not load an MP4 cross domain in HTML5 mode? I just see the animated 'loading' graphic and the video never loads.

Here's what I've tried:
1. Move video to same domain and it plays fine in Chrome.
2. Force Flash mode and it plays fine in Chrome (I have a crossdomain.xml file setup).
3. Tested other browsers in HTML5 mode (Safari and Firefox 28) and they play fine.
4. Added an "Access-Control-Allow-Origin" header for the MP4 which didn't make a difference and didn't seem to be needed by Safari or Firefox.

Am I missing something? I don't really want to force Flash mode unless absolutely necessary.

Thanks,

Guy

7 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Where are you running this?

JW Player

User  
0 rated :

You can see the problem here:
http://test.maynoothbns.ie/2012.html

The same page moved to the same domain as the video works:
http://projects.maynoothbns.ie/video/2012.html

JW Player

User  
0 rated :

@Guy

I don't think it's a cross domain issue - neither link works for me.

It's more likely related to this kind of thing: http://powered-by-haiku.co.uk/?p=1

If you remove the *autoplay* attribute from the *video* tag and include *preload="none"* instead, I think you'll see better results.

James

JW Player

User  
0 rated :

@James

Thanks James. Your blog has some great info.

What I found in Chrome with the links I have above is that if you load the first one (which fails to play) and then load the second without a shift-refresh then the second will fail too. I'm guessing this is because both pages are loading the same MP4 file and it is getting cached.

Anyway, I tried your suggestion and it works:

http://test.maynoothbns.ie/2012a.html

So now the test... url has preload="none" and no autoplay and plays just fine. The projects... url is unchanged and does work (assuming a shift-refresh). The only difference is the video is loaded from the same domain.

I wonder if Chrome's preload="auto" behaves differently when working cross domain or whether there is something in the timing of the creation of my video element followed by the JS that replaces it with the JW Player. Your blog makes for interesting reading on what happens to the original video element BTW.

So I can use this info to get the behavior I need as the page that needs to load cross domain does not need autoplay. I'm pleased it is not actually a cross domain security issue as the conflicting browser behaviors made me doubt it could be.

Thanks again.

Guy

Ethan Feldman

JW Player Support Agent  
0 rated :

http://test.maynoothbns.ie/2012.html works for me in Chrome? I have to click play though.

JW Player

User  
0 rated :

Thanks Ethan.

So your test experience vs. mine vs. the preload="none" solution would lend weight to the idea that Chrome is doing something to the video element (that I convert into a JW Player) that other browsers don't and/or that is timing related (or maybe related to the version of Chrome?).

The domain part of it would just seem to affect the timing of that rather than cause the issue in the first place.

Ethan Feldman

JW Player Support Agent  
0 rated :

Np. Yes, it might be. I would check with a <video> tag to see the behavior in Chrome.

This question has received the maximum number of answers.