From e0a6977bb52794c484ae2ae0fc70f30affcdf876 Mon Sep 17 00:00:00 2001 From: Scott Downe Date: Thu, 24 May 2012 16:30:45 -0400 Subject: [PATCH] [#1023] removed some console.logs I left from last commit. Removed the youtube seeking hack. No longer update via youtube player seeks, only via butter seeks. --- players/soundcloud/popcorn.soundcloud.js | 4 ++-- players/youtube/popcorn.youtube.js | 17 +---------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/players/soundcloud/popcorn.soundcloud.js b/players/soundcloud/popcorn.soundcloud.js index 46fcb76a..195f4d1f 100644 --- a/players/soundcloud/popcorn.soundcloud.js +++ b/players/soundcloud/popcorn.soundcloud.js @@ -41,9 +41,9 @@ paused = true; playerQueue.add(function() { -console.log( "in paused queue" ); + if ( !realPaused ) { -console.log( widget ); + widget && widget.pause(); } else { playerQueue.next(); diff --git a/players/youtube/popcorn.youtube.js b/players/youtube/popcorn.youtube.js index 188a6bd1..54e86ab1 100755 --- a/players/youtube/popcorn.youtube.js +++ b/players/youtube/popcorn.youtube.js @@ -18,9 +18,7 @@ Popcorn.player( "youtube", { container = document.createElement( "div" ), currentTime = 0, paused = true, - seekTime = 0, firstGo = true, - seeking = false, // state code for volume changed polling lastMuted = false, @@ -54,18 +52,6 @@ Popcorn.player( "youtube", { // this is the only way to get seeking events if ( state === 2 ) { - // silly logic forced on me by the youtube API - // calling youtube.seekTo triggers multiple events - // with the second events getCurrentTime being the old time - if ( seeking && seekTime === currentTime && seekTime !== options.youtubeObject.getCurrentTime() ) { - - seeking = false; - options.youtubeObject.seekTo( currentTime ); - return; - } - - currentTime = options.youtubeObject.getCurrentTime(); - media.dispatchEvent( "timeupdate" ); paused = true; media.dispatchEvent( "pause" ); playerQueue.next(); @@ -221,8 +207,7 @@ Popcorn.player( "youtube", { set: function( val ) { // make sure val is a number - currentTime = seekTime = +val; - seeking = true; + currentTime = +val; if ( options.destroyed ) {