Merge pull request #134 from gurupras/gurupras-develop

Fixed embedded Plyr not updating plyr.media.paused
This commit is contained in:
Sam Potts 2016-01-11 08:49:53 +11:00
commit 533af96c4f

View File

@ -952,9 +952,18 @@
var instance = event.target;
// Create a faux HTML5 API using the YouTube API
player.media.play = function() { instance.playVideo(); };
player.media.pause = function() { instance.pauseVideo(); };
player.media.stop = function() { instance.stopVideo(); };
player.media.play = function() {
instance.playVideo();
player.media.paused = false;
};
player.media.pause = function() {
instance.pauseVideo();
player.media.paused = true;
};
player.media.stop = function() {
instance.stopVideo();
player.media.paused = true
};
player.media.duration = instance.getDuration();
player.media.paused = true;
player.media.currentTime = instance.getCurrentTime();