Skip to content
This repository was archived by the owner on Jul 11, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions js-plugins/ipad/flowplayer.ipad.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* ipad.js The Flowplayer iOS fallback.
*
* Copyright 2010-2013 Flowplayer Oy
* Copyright 2010-2014 Flowplayer Oy
* By Thomas Dubois <thomas@flowplayer.org>
*
* Released under the MIT License:
Expand Down 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 All @@ -925,7 +938,6 @@ $f.addPlugin("ipad", function(options) {
api.style.cursor = 'pointer';
api.style.webkitUserDrag = 'none';

api.type="video/mp4";
// if ( hasBuiltinControls )
// api.controls="controls";

Expand Down