[#1060] Made sure we reset the seeking flag after a seek

This commit is contained in:
David Seifried 2012-05-14 12:30:58 -04:00
Родитель b7a817db05
Коммит 82e761e599
1 изменённых файлов: 9 добавлений и 1 удалений

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

@ -50,9 +50,11 @@
vimeo_player_loaded.seek[ vimeoContainer.id ] = function( time ) { vimeo_player_loaded.seek[ vimeoContainer.id ] = function( time ) {
if( time.seconds !== currentTime ) { if( time.seconds !== currentTime ) {
seeking = true;
currentTime = time.seconds; currentTime = time.seconds;
media.dispatchEvent( "seeked" ); media.dispatchEvent( "seeked" );
media.dispatchEvent( "timeupdate" ); media.dispatchEvent( "timeupdate" );
seeking = false;
} }
}; };
@ -129,6 +131,12 @@
vimeoObject.api_play(); vimeoObject.api_play();
}; };
Popcorn.player.defineProperty( media, "seeking", {
get: function() {
return seeking;
}
});
media.pause = function() { media.pause = function() {
if ( !media.paused ) { if ( !media.paused ) {
@ -148,8 +156,8 @@
} }
currentTime = seekTime = +val; currentTime = seekTime = +val;
seeking = true;
seeking = true;
media.dispatchEvent( "seeked" ); media.dispatchEvent( "seeked" );
media.dispatchEvent( "timeupdate" ); media.dispatchEvent( "timeupdate" );
vimeoObject.api_seekTo( currentTime ); vimeoObject.api_seekTo( currentTime );