Update plyr.js

This commit is contained in:
Mohamed Elbahja 2018-10-13 13:23:42 +01:00 committed by GitHub
parent a2a82a96a6
commit 06db3f702d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -680,8 +680,7 @@ class Plyr {
set quality(input) {
const config = this.config.quality;
const options = this.options.quality;
const duration = this.duration;
const isPlaying = this.playing;
const { duration, playing } = this;
if (!options.length) {
return;
@ -706,11 +705,11 @@ class Plyr {
// Set quality
this.media.quality = quality;
// seek to duration before changing quality
// Seek to duration before changing quality
this.seek = duration;
// continue
if (isPlaying) {
// Continue
if (playing) {
this.play();
}
}