Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
ipad: fixes for iOS 8 (#266)
Browse files Browse the repository at this point in the history
- remove href attribute from Flash container; if the container is an
  anchor, clicking on the wrapping anchor opens the link otherwise
- do not try to auto play live videos, the player is stuck on the first
  image otherwise - still transitions well to a live stream in a
  playlist
  • Loading branch information
phloxic committed Oct 7, 2014
1 parent cb84fb2 commit 37a6e01
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions js-plugins/ipad/flowplayer.ipad.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,22 @@ $f.addPlugin("ipad", function(options) {
$f.fireEvent(self.id(), 'onBegin', activeIndex);

log("calling video.load()");
video.load();
if (! clip.live ) // iOS 8 chokes otherwise
video.load();
}

// auto
if ( autoPlay ) {
log("calling video.play()");
video.play();
if ( clip.live ) {
// timeout required for iOS 8, live stream not recognized,
// only the current m3u8 segment list duration
setTimeout(function () {
video.play();
}, 1);
} else {
video.play();
}
}
}

Expand Down Expand Up @@ -902,6 +911,10 @@ $f.addPlugin("ipad", function(options) {
while(root.firstChild)
root.removeChild(root.firstChild);

// do not follow video link - crucial for iOS 8
if (root.hasAttribute("href"))
root.removeAttribute("href");

var container = document.createElement('div');
var api = document.createElement('video');
container.appendChild(api);
Expand Down

0 comments on commit 37a6e01

Please sign in to comment.