diff options
author | Sam Potts <sam@potts.es> | 2020-02-08 22:19:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-08 22:19:44 +0000 |
commit | 976eebc2a20726c687c0e5a42bd63e5b804fba53 (patch) | |
tree | c4ff4a3056d4f3a5ae7ae9a0e19c2327305861b8 /src/js/html5.js | |
parent | f00c2793667d546e1cf3f1b6c90bc80dfa0915f7 (diff) | |
parent | f755a3c4012f24cd6025a0d268f4228958752093 (diff) | |
download | plyr-976eebc2a20726c687c0e5a42bd63e5b804fba53.tar.lz plyr-976eebc2a20726c687c0e5a42bd63e5b804fba53.tar.xz plyr-976eebc2a20726c687c0e5a42bd63e5b804fba53.zip |
Merge pull request #1672 from ydylla/improve-quality-change
Improve/fix quality change state restoring
Diffstat (limited to 'src/js/html5.js')
-rw-r--r-- | src/js/html5.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/js/html5.js b/src/js/html5.js index 0f76f453..d1e82489 100644 --- a/src/js/html5.js +++ b/src/js/html5.js @@ -84,7 +84,7 @@ const html5 = { } // Get current state - const { currentTime, paused, preload, readyState } = player.media; + const { currentTime, paused, preload, readyState, playbackRate } = player.media; // Set new source player.media.src = source.getAttribute('src'); @@ -93,10 +93,8 @@ const html5 = { if (preload !== 'none' || readyState) { // Restore time player.once('loadedmetadata', () => { - if (player.currentTime === 0) { - return; - } + player.speed = playbackRate; player.currentTime = currentTime; // Resume playing |