From 1fad099d72584ae54701603729339a3cd1cf0d52 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 24 May 2018 09:05:58 +0200 Subject: Fix protractor with Safari --- client/src/assets/player/peertube-videojs-plugin.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'client/src/assets') diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index 1e68100d1..d9ded7a7e 100644 --- a/client/src/assets/player/peertube-videojs-plugin.ts +++ b/client/src/assets/player/peertube-videojs-plugin.ts @@ -270,6 +270,7 @@ class PeerTubePlugin extends Plugin { private tryToPlay (done?: Function) { if (!done) done = function () { /* empty */ } + const playPromise = this.player.play() if (playPromise !== undefined) { return playPromise.then(done) @@ -355,9 +356,6 @@ class PeerTubePlugin extends Plugin { // Proxy first play const oldPlay = this.player.play.bind(this.player) this.player.play = () => { - // Avoid issue new play policy on mobiles - if (isMobile()) oldPlay() - this.player.addClass('vjs-has-big-play-button-clicked') this.player.play = oldPlay -- cgit v1.2.3