-
Notifications
You must be signed in to change notification settings - Fork 35
Android Chrome: engine switch in playlists does not work #50
Comments
@nnarhinen - probably need some help with this. |
Something like this is needed in core to avoid the core error, and delegate the problem to the engine in charge: diff --git a/lib/ext/mobile.js b/lib/ext/mobile.js
index 67af91f..c1ab91c 100644
--- a/lib/ext/mobile.js
+++ b/lib/ext/mobile.js
@@ -108,10 +108,12 @@ if (flowplayer.support.touch || isIeMobile) {
if (isAndroid || isSilk) player.bind("ready", function() {
var video = common.find('video.fp-engine', root)[0];
- bean.one(video, 'canplay', function() {
- video.play();
- });
- video.play();
+ if (player.engine.engineName === 'html5') {
+ bean.one(video, 'canplay', function() {
+ video.play();
+ });
+ video.play();
+ }
player.bind("progress.dur", function() { But indeed it literally only delegates the problem, because the hlsjs engine deals with a freshly created video tag, and is not allowed to call |
I'll try to address this in FP 7.0. Something to re-use the HTML tag for touch devices. |
Yes. Let's hope registering the engine events doesn't have a similar effect. |
@nnarhinen - this is still an issue. |
https://developers.google.com/web/updates/2016/03/play-returns-promise At least until #50 is solved this is useful, e.g., for http://demos.flowplayer.org/api/live-check.html
This way it plays at least WebM and MP4 VOD - no HLS support at all because MediaSource extension not present. Furthermore we are using video.play() instead of api.resume() in all these initial nudge scenarios. This decreases the chances of missing user interaction errors, see flowplayer/flowplayer-hlsjs#50 (comment) In the same vein prefer video.load() over video.play() to trigger the canplay hack.
This way it plays at least WebM and MP4 VOD - no HLS support at all because MediaSource extension not present. Furthermore we are using video.play() instead of api.resume() in all these initial nudge scenarios. This decreases the chances of missing user interaction errors, see flowplayer/flowplayer-hlsjs#50 (comment) In the same vein prefer video.load() over video.play() to trigger the canplay hack.
EDIT: a switch from html5 engine to the hlsjs engine hangs up the player.
EDIT: only a problem with Android Chrome because, contrary to Android Firefox, it needs this nudge with autoplay: https://github.com/flowplayer/flowplayer-hlsjs/blob/master/flowplayer.hlsjs.js#L855-L867 - @nnarhinen
Among other things the additional play() call on Android comes probably to early.
Note that clicking on prev/next or a playlist item works (user interaction).
The text was updated successfully, but these errors were encountered: