aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2020-02-09 21:53:24 +0000
committerGitHub <noreply@github.com>2020-02-09 21:53:24 +0000
commit8c44425665e4f1cd4fb3fa8593e960d5a518147b (patch)
tree7d7d3eb58ab402a204b5a81c3daead4fd695ade6 /src/js/plyr.js
parentb2ac730572ad81aa9755e8b7852c53ceba0e8e9f (diff)
parent93e3f8946a0bcbca27912658d82930e4a5deb2b8 (diff)
downloadplyr-8c44425665e4f1cd4fb3fa8593e960d5a518147b.tar.lz
plyr-8c44425665e4f1cd4fb3fa8593e960d5a518147b.tar.xz
plyr-8c44425665e4f1cd4fb3fa8593e960d5a518147b.zip
Merge pull request #1679 from sampotts/develop
3.5.7
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index f30d334a..8dc2b388 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -1,6 +1,6 @@
// ==========================================================================
// Plyr
-// plyr.js v3.5.6
+// plyr.js v3.5.7-beta.0
// https://github.com/sampotts/plyr
// License: The MIT License (MIT)
// ==========================================================================
@@ -368,10 +368,10 @@ class Plyr {
*/
pause() {
if (!this.playing || !is.function(this.media.pause)) {
- return;
+ return null;
}
- this.media.pause();
+ return this.media.pause();
}
/**
@@ -411,10 +411,10 @@ class Plyr {
const toggle = is.boolean(input) ? input : !this.playing;
if (toggle) {
- this.play();
- } else {
- this.pause();
+ return this.play();
}
+
+ return this.pause();
}
/**
@@ -441,7 +441,7 @@ class Plyr {
* @param {Number} seekTime - how far to rewind in seconds. Defaults to the config.seekTime
*/
rewind(seekTime) {
- this.currentTime = this.currentTime - (is.number(seekTime) ? seekTime : this.config.seekTime);
+ this.currentTime -= is.number(seekTime) ? seekTime : this.config.seekTime;
}
/**
@@ -449,7 +449,7 @@ class Plyr {
* @param {Number} seekTime - how far to fast forward in seconds. Defaults to the config.seekTime
*/
forward(seekTime) {
- this.currentTime = this.currentTime + (is.number(seekTime) ? seekTime : this.config.seekTime);
+ this.currentTime += is.number(seekTime) ? seekTime : this.config.seekTime;
}
/**