зеркало из https://github.com/mozilla/popcorn-js.git
Fix failing Core test for FX 3.6 [#773]
This commit is contained in:
Коммит
9d7396ce15
|
@ -867,27 +867,30 @@ test( "play(n)/pause(n) as shorthand to currentTime(n).play()/pause()", function
|
|||
}
|
||||
}
|
||||
|
||||
stop( 1000 );
|
||||
stop( 10000 );
|
||||
|
||||
function poll() {
|
||||
|
||||
if ( $pop.media.readyState >= 2 ) {
|
||||
// this should trigger immediately
|
||||
var firstSeekedEvent = function() {
|
||||
|
||||
// IE9 has weird seek behaviour... this works around it
|
||||
$pop.listen( "seeked", function() {
|
||||
$pop.unlisten( "seeked" );
|
||||
$pop.unlisten( "seeked", firstSeekedEvent );
|
||||
equal( Math.round( $pop.currentTime() ), 10, "play(n) sets currentTime to 10" );
|
||||
plus();
|
||||
|
||||
$pop.listen( "seeked", secondSeekedEvent );
|
||||
$pop.pause( 5 );
|
||||
},
|
||||
secondSeekedEvent = function() {
|
||||
|
||||
$pop.unlisten( "seeked", secondSeekedEvent );
|
||||
equal( Math.round( $pop.currentTime() ), 5, "pause(n) sets currentTime to 5" );
|
||||
plus();
|
||||
});
|
||||
};
|
||||
|
||||
$pop.listen( "seeked", firstSeekedEvent );
|
||||
$pop.play( 10 ).pause();
|
||||
|
||||
} else {
|
||||
setTimeout( poll, 10 );
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче