[#766] Fix the change of speed when quality changes
authorGaëtan Rizio <gaetan+git@rizio.fr>
Sun, 8 Jul 2018 11:08:35 +0000 (13:08 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 9 Jul 2018 12:27:12 +0000 (14:27 +0200)
When changing the `playbackRate` of the video then changing the quality,
the `playbackRate` returned to its initial value (1).

The reason behind it is that the callback was not called when change
of the quality was done if there was no error.

This commit does the following:

* Ensure the callback (`done`) is called after changing the quality

client/src/assets/player/peertube-videojs-plugin.ts

index 32cc4cd8f1cd0cbb7fc8408983760f9aa5c12a6d..936fb25774b05bf0032258a8d29b291f18eaa8f6 100644 (file)
@@ -240,6 +240,8 @@ class PeerTubePlugin extends Plugin {
 
             if (options.seek) this.seek(options.seek)
             if (options.forcePlay === false && paused === true) this.player.pause()
+
+            return done(err)
           })
         })
       }, options.delay || 0)