diff options
author | Sam Potts <sam@selz.com> | 2016-01-11 08:49:53 +1100 |
---|---|---|
committer | Sam Potts <sam@selz.com> | 2016-01-11 08:49:53 +1100 |
commit | 533af96c4f99da01f5157e02859d667dac92519f (patch) | |
tree | b0745e0a4f3354a5f2acf277b830e75b455707a8 | |
parent | 1371c1341fcc95d52394dc3f69900ae5041a5701 (diff) | |
parent | be8b4d2735b7b0d63b0d68a0cccab5c48e250783 (diff) | |
download | plyr-533af96c4f99da01f5157e02859d667dac92519f.tar.lz plyr-533af96c4f99da01f5157e02859d667dac92519f.tar.xz plyr-533af96c4f99da01f5157e02859d667dac92519f.zip |
Merge pull request #134 from gurupras/gurupras-develop
Fixed embedded Plyr not updating plyr.media.paused
-rw-r--r-- | src/js/plyr.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index ed328202..44f17290 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -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(); |