[#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.

This commit is contained in:
Scott Downe 2012-05-24 16:30:45 -04:00
Родитель 3af0f4bcac
Коммит e0a6977bb5
2 изменённых файлов: 3 добавлений и 18 удалений

Просмотреть файл

@ -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();

Просмотреть файл

@ -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 ) {