Restore paused state after seek

This commit is contained in:
Sam Potts
2018-04-11 21:52:31 +10:00
parent ee79c46145
commit 5ed3ff9084
11 changed files with 37 additions and 11 deletions

11
dist/plyr.js vendored
View File

@ -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) {

2
dist/plyr.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10763,7 +10763,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
@ -10771,6 +10775,11 @@ var youtube = {
// Seek after events sent
instance.seekTo(time);
// Restore pause state
if (paused) {
player.pause();
}
}
});
@ -11562,7 +11571,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) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long