aboutsummaryrefslogtreecommitdiffstats
path: root/dist/plyr.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2018-04-11 21:52:31 +1000
committerSam Potts <sam@potts.es>2018-04-11 21:52:31 +1000
commit5ed3ff9084c5be598d1d2711a88ff9871580ff33 (patch)
tree700f6f26c8434a8d1cb3e1d6be1663a44ff4523b /dist/plyr.js
parentee79c46145578c77fbf37c93389a3c7e7a950b0c (diff)
downloadplyr-5ed3ff9084c5be598d1d2711a88ff9871580ff33.tar.lz
plyr-5ed3ff9084c5be598d1d2711a88ff9871580ff33.tar.xz
plyr-5ed3ff9084c5be598d1d2711a88ff9871580ff33.zip
Restore paused state after seek
Diffstat (limited to 'dist/plyr.js')
-rw-r--r--dist/plyr.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/dist/plyr.js b/dist/plyr.js
index b84b32e3..3a09e668 100644
--- a/dist/plyr.js
+++ b/dist/plyr.js
@@ -5729,7 +5729,11 @@ var youtube = {
return Number(instance.getCurrentTime());
},
set: function set(time) {
+ // Vimeo will automatically play on seek
+ var paused = player.media.paused;
+
// Set seeking flag
+
player.media.seeking = true;
// Trigger seeking
@@ -5737,6 +5741,11 @@ var youtube = {
// Seek after events sent
instance.seekTo(time);
+
+ // Restore pause state
+ if (paused) {
+ player.pause();
+ }
}
});
@@ -6528,7 +6537,7 @@ var Plyr = function () {
}
// Set config
- this.config = utils.extend({}, defaults, options, function () {
+ this.config = utils.extend({}, defaults, options || {}, function () {
try {
return JSON.parse(_this.media.getAttribute('data-plyr-config'));
} catch (e) {