aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/plyr.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 77582dd7..2b296181 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -680,6 +680,8 @@ class Plyr {
set quality(input) {
const config = this.config.quality;
const options = this.options.quality;
+ const duration = this.duration;
+ const isPlaying = this.playing;
if (!options.length) {
return;
@@ -703,6 +705,14 @@ class Plyr {
// Set quality
this.media.quality = quality;
+
+ // seek to duration before changing quality
+ this.seek = duration;
+
+ // continue
+ if (isPlaying) {
+ this.play();
+ }
}
/**