Skip to content

Commit aa20eba

Browse files
authored
Merge pull request sampotts#1211 from melbahja/develop
duration after changing video quality
2 parents 779e45c + 06db3f7 commit aa20eba

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/js/plyr.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,7 @@ class Plyr {
683683
set quality(input) {
684684
const config = this.config.quality;
685685
const options = this.options.quality;
686+
const { duration, playing } = this;
686687

687688
if (!options.length) {
688689
return;
@@ -706,6 +707,14 @@ class Plyr {
706707

707708
// Set quality
708709
this.media.quality = quality;
710+
711+
// Seek to duration before changing quality
712+
this.seek = duration;
713+
714+
// Continue
715+
if (playing) {
716+
this.play();
717+
}
709718
}
710719

711720
/**

0 commit comments

Comments
 (0)