aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamed Elbahja <8259014+melbahja@users.noreply.github.com>2018-10-13 13:23:42 +0100
committerGitHub <noreply@github.com>2018-10-13 13:23:42 +0100
commit06db3f702d21ec440d53451ce8cb115f036ddec4 (patch)
treeab049c58780f277cfc73d27ce7547623f21212bd
parenta2a82a96a6ab51ed42597dbb9479c4fedeaad927 (diff)
downloadplyr-06db3f702d21ec440d53451ce8cb115f036ddec4.tar.lz
plyr-06db3f702d21ec440d53451ce8cb115f036ddec4.tar.xz
plyr-06db3f702d21ec440d53451ce8cb115f036ddec4.zip
Update plyr.js
-rw-r--r--src/js/plyr.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 2b296181..5a9a1bd3 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -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();
}
}