aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/js/plyr.js15
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();