aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-24 09:05:58 +0200
committerChocobozzz <me@florianbigard.com>2018-05-24 09:16:15 +0200
commit1fad099d72584ae54701603729339a3cd1cf0d52 (patch)
treec44624c292015f4ad0aa7b3a73931110ae17919e /client/src/assets/player
parent073279d5ea024e607f1d0d48f0f153ff04069d74 (diff)
downloadPeerTube-1fad099d72584ae54701603729339a3cd1cf0d52.tar.gz
PeerTube-1fad099d72584ae54701603729339a3cd1cf0d52.tar.zst
PeerTube-1fad099d72584ae54701603729339a3cd1cf0d52.zip
Fix protractor with Safari
Diffstat (limited to 'client/src/assets/player')
-rw-r--r--client/src/assets/player/peertube-videojs-plugin.ts4
1 files changed, 1 insertions, 3 deletions
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 {
270 270
271 private tryToPlay (done?: Function) { 271 private tryToPlay (done?: Function) {
272 if (!done) done = function () { /* empty */ } 272 if (!done) done = function () { /* empty */ }
273
273 const playPromise = this.player.play() 274 const playPromise = this.player.play()
274 if (playPromise !== undefined) { 275 if (playPromise !== undefined) {
275 return playPromise.then(done) 276 return playPromise.then(done)
@@ -355,9 +356,6 @@ class PeerTubePlugin extends Plugin {
355 // Proxy first play 356 // Proxy first play
356 const oldPlay = this.player.play.bind(this.player) 357 const oldPlay = this.player.play.bind(this.player)
357 this.player.play = () => { 358 this.player.play = () => {
358 // Avoid issue new play policy on mobiles
359 if (isMobile()) oldPlay()
360
361 this.player.addClass('vjs-has-big-play-button-clicked') 359 this.player.addClass('vjs-has-big-play-button-clicked')
362 this.player.play = oldPlay 360 this.player.play = oldPlay
363 361