]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/peertube-videojs-plugin.ts
Fix resume video after peertube embed link click
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-videojs-plugin.ts
index 1e68100d1ddd325ba89f2b2516aff556c062a804..d9ded7a7ed0979eb9084e0362849b61967f3cd04 100644 (file)
@@ -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