]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
Added a fix for the youtube bug that is affecting butter
authorDavid Seifried <david.c.seifried@gmail.com>
Thu, 9 Jun 2011 18:31:02 +0000 (14:31 -0400)
committerDavid Seifried <david.c.seifried@gmail.com>
Thu, 9 Jun 2011 18:31:02 +0000 (14:31 -0400)
players/youtube/popcorn.youtube.js [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 4ef1185..b3fbaa5
@@ -463,7 +463,7 @@ var onYouTubePlayerReady;
     },
     
     startTimeUpdater: function() {
-      var state = this.video.getPlayerState(),
+      var state = typeof this.video.getPlayerState != "function"  ? this.readyState : this.video.getPlayerState(),
           self = this,
           seeked = 0;
       
@@ -474,7 +474,7 @@ var onYouTubePlayerReady;
         seeked = 1;
       } else {
         this.previousCurrentTime = this.currentTime;
-        this.currentTime = this.video.getCurrentTime();
+        this.currentTime = typeof this.video.getCurrentTime != "function" ? this.currentTime : this.video.getCurrentTime();
       }
       
       if ( this.volume !== this.previousVolume ) {