aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/html5.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/html5.js')
-rw-r--r--src/js/html5.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/js/html5.js b/src/js/html5.js
index 1173bcbe..d1e82489 100644
--- a/src/js/html5.js
+++ b/src/js/html5.js
@@ -65,6 +65,10 @@ const html5 = {
return source && Number(source.getAttribute('size'));
},
set(input) {
+ if (player.quality === input) {
+ return;
+ }
+
// If we're using an an external handler...
if (player.config.quality.forced && is.function(player.config.quality.onChange)) {
player.config.quality.onChange(input);
@@ -80,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');
@@ -89,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