[#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; paused = true;
playerQueue.add(function() { playerQueue.add(function() {
console.log( "in paused queue" );
if ( !realPaused ) { if ( !realPaused ) {
console.log( widget );
widget && widget.pause(); widget && widget.pause();
} else { } else {
playerQueue.next(); playerQueue.next();

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

@ -18,9 +18,7 @@ Popcorn.player( "youtube", {
container = document.createElement( "div" ), container = document.createElement( "div" ),
currentTime = 0, currentTime = 0,
paused = true, paused = true,
seekTime = 0,
firstGo = true, firstGo = true,
seeking = false,
// state code for volume changed polling // state code for volume changed polling
lastMuted = false, lastMuted = false,
@ -54,18 +52,6 @@ Popcorn.player( "youtube", {
// this is the only way to get seeking events // this is the only way to get seeking events
if ( state === 2 ) { 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; paused = true;
media.dispatchEvent( "pause" ); media.dispatchEvent( "pause" );
playerQueue.next(); playerQueue.next();
@ -221,8 +207,7 @@ Popcorn.player( "youtube", {
set: function( val ) { set: function( val ) {
// make sure val is a number // make sure val is a number
currentTime = seekTime = +val; currentTime = +val;
seeking = true;
if ( options.destroyed ) { if ( options.destroyed ) {