Seek causing iPad to not play video
We've been using JWPlayer for the past 12-18 months for viewing of local government meeting videos, with very good results. Today I had a request to provide unique URLs so users could share videos and have the player start at a specific position. I hadn't done much programming to the API yet, but I put something together thanks to the documentation:
//Add #t=300 to begin playing at 5 minutes (300 seconds) in
var offset = window.location.hash.substr(3);
var position = jwplayer().getPosition();
window.location.hash = '#t=' + position;
When a user pauses the video, a hash is added to the URL based on the number of seconds of the position. The user then emails that full URL. The received clicks on the link, and the video plays starting at that location. Dandy.
However, on an iPad (iOS 7.1), the video refuses to play if the hash is present. I see the JWPlayer "spinner" and nothing further.
If I remove the above onReady function, or remove the hash, the video plays fine.
Temporarily I've worked around this by checking the HTTP_USER_AGENT and only including the onReady function for non-iOS browsers. Users will play the videos, but they'll always start at the beginning. The pause-to-add-hash function works fine on iOS.
Any idea what's going on, and is there a way to make this work on iOS?
Here are two links for review. First, the page that fails on iOS (but plays fine on other tested browsers):
and the page that plays (but plays at the video start):
The only difference between the files is the presence of the onReady function in the failing page.
If you'd like to test with additional videos, our main index is here:
which leads to the streamNew.php file with suitable parameters.
If you'd like to get the video directly, should that be an issue or question, it's at: