diff options
author | Sam Potts <sam@potts.es> | 2020-01-30 14:23:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 14:23:40 +0000 |
commit | 58f5380694993891892e4e24ba0904434892e538 (patch) | |
tree | 4de3d7b46d33192a43a0b40c3f3a9a5f90f9b071 /src/js/plyr.js | |
parent | 9d512911252cf4835c2b7364cb4ae392cb277a1d (diff) | |
parent | fefcca78052174dce73f8dfe7df5b264edb0653a (diff) | |
download | plyr-58f5380694993891892e4e24ba0904434892e538.tar.lz plyr-58f5380694993891892e4e24ba0904434892e538.tar.xz plyr-58f5380694993891892e4e24ba0904434892e538.zip |
Merge pull request #1662 from sampotts/develop
3.5.7
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r-- | src/js/plyr.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index f30d334a..04f1b873 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -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; } /** |