[#766] Fix the change of speed when quality changes

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
pull/789/head
Gaëtan Rizio 2018-07-08 13:08:35 +02:00 committed by Chocobozzz
parent 81858b84d3
commit 8244e18719
1 changed files with 2 additions and 0 deletions

View 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)