]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#423] fixed copy and paste error :P
authorScottDowne <sdowne@learn.senecac.on.ca>
Tue, 27 Sep 2011 18:19:23 +0000 (14:19 -0400)
committerScottDowne <sdowne@learn.senecac.on.ca>
Tue, 27 Sep 2011 18:19:23 +0000 (14:19 -0400)
players/youtube/popcorn.youtube.js

index 09b08b6349e8b52ae6caa0d3bf2e326f7b34b872..d6f4b6812290fe9597d44828f32f965cba62e7c1 100755 (executable)
@@ -98,6 +98,23 @@ Popcorn.player( "youtube", {
         };
 
         Popcorn.player.defineProperty( media, "currentTime", {
+          set: function( val ) {
+
+            // make sure val is a number
+            currentTime = seekTime = +val;
+            seeking = true;
+            media.dispatchEvent( "seeked" );
+            media.dispatchEvent( "timeupdate" );
+            youtubeObject.seekTo( currentTime );
+            return currentTime;
+          },
+          get: function() {
+
+            return currentTime;
+          }
+        });
+
+        Popcorn.player.defineProperty( media, "muted", {
           set: function( val ) {
 
             if ( youtubeObject.isMuted() !== val ) {
@@ -115,23 +132,6 @@ Popcorn.player( "youtube", {
 
             return youtubeObject.isMuted();
           },
-          get: function() {
-
-            return currentTime;
-          }
-        });
-
-        Popcorn.player.defineProperty( media, "muted", {
-          set: function( val ) {
-
-            // make sure val is a number
-            currentTime = seekTime = +val;
-            seeking = true;
-            media.dispatchEvent( "seeked" );
-            media.dispatchEvent( "timeupdate" );
-            youtubeObject.seekTo( currentTime );
-            return currentTime;
-          },
           get: function() {
 
             return youtubeObject.isMuted();