straydogstudio / film_roll

A lightweight jQuery carousel that centers one item at a time on the page.
MIT License
207 stars 60 forks source link

Load failure in iOS 8 #24

Closed allanemerson closed 10 years ago

allanemerson commented 10 years ago

Filmroll is failing to load in iOS 8 until the window is scrolled, possibly something to do with the resizing event. Here's a video: https://www.dropbox.com/s/3sw8z18mqytn08s/filmroll-ios8.mov?dl=0

straydogstudio commented 10 years ago

Thanks @emmerse. I'll take a look.

straydogstudio commented 10 years ago

@emmerse So far I've not been able to reproduce this. Do you have that particular page posted somewhere where I can see it?

allanemerson commented 10 years ago

Sure thing: http://loandsons.electricpulp.com/the-og

straydogstudio commented 10 years ago

@emmerse It isn't strictly related to iOS8 and FilmRoll, as other pages are working fine.

It appears you have something that fails to load in a timely manner. Based on my debugging with the timeline, it is your vimeo player that is timing out. In my last check Safari tried for 1.5 minutes and quit. The full url is:

http://player.vimeo.com/video/51782073?api=1&player_id=vimeo-og&title=0&byline=0&portrait=0

That can be seen with desktop or mobile debugging tools. Desktop browsers are firing the load event anyway; they are apparently picking up that the vimeo file isn't coming soon enough and they go ahead.

The mobile browsers aren't. Because of that, the window.load event is never fired, so the final configuration for FilmRoll never completes, the resizing event isn't fired, and your loading div isn't ever hidden. It is curious that Safari shows it is no longer loading even though it still is. The iOS Chrome browser never stops the loading indication (and it has the same problem.)

You may want to delay loading of the vimeo resources until after page load for mobile devices. It is below the fold anyway. Or, of course, they may have a better solution for you.

I'm going to close this as it is pretty clear it isn't FilmRoll. Let me know if you need more ideas.

straydogstudio commented 10 years ago

@emmerse I should mention, it looks like the problem is inside the vimeo iframe content. The basic iframe content shows up, but the browser still says it isn't loading right (even though you can play the video.)

straydogstudio commented 10 years ago

@emmerse Last comment. If you look at the source for the vimeo player link, it doesn't have closing body or html tags. Something on their end must be hanging.

allanemerson commented 10 years ago

Ah, thanks for finding the actual culprit. So strange that this only pops up with vimeo on iOS 8 though.

straydogstudio commented 10 years ago

@emmerse Based on what I found, the source of the problem is on desktop too. The desktop browsers just handle it better. Chrome appears to cancel loading it until everything is finished, then it tries again.

You should be able to get a fix out of vimeo on this. It really looks like something is wrong on their end.

Hope it works out!