Save playback speed rate, and restore when playing a video again

This commit is contained in:
José Olívio M. Pedrosa 2021-10-30 18:25:06 -03:00
parent 55e09b6466
commit 5ffe4aac8f
No known key found for this signature in database
GPG key ID: 9F894BED87ABBEC8
3 changed files with 13 additions and 0 deletions

View file

@ -3602,6 +3602,9 @@ class PlaybackManager {
setPlaybackRate(value, player = this._currentPlayer) {
if (player && player.setPlaybackRate) {
player.setPlaybackRate(value);
// Save the new playback rate in the browser session, to restore when playing a new video.
sessionStorage.setItem('playbackRateSpeed', value);
}
}