зеркало из 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() {
|
function poll() {
|
||||||
|
|
||||||
if ( $pop.media.readyState >= 2 ) {
|
if ( $pop.media.readyState >= 2 ) {
|
||||||
// this should trigger immediately
|
// this should trigger immediately
|
||||||
|
var firstSeekedEvent = function() {
|
||||||
|
|
||||||
// IE9 has weird seek behaviour... this works around it
|
$pop.unlisten( "seeked", firstSeekedEvent );
|
||||||
$pop.listen( "seeked", function() {
|
|
||||||
$pop.unlisten( "seeked" );
|
|
||||||
equal( Math.round( $pop.currentTime() ), 10, "play(n) sets currentTime to 10" );
|
equal( Math.round( $pop.currentTime() ), 10, "play(n) sets currentTime to 10" );
|
||||||
plus();
|
plus();
|
||||||
|
|
||||||
|
$pop.listen( "seeked", secondSeekedEvent );
|
||||||
$pop.pause( 5 );
|
$pop.pause( 5 );
|
||||||
|
},
|
||||||
|
secondSeekedEvent = function() {
|
||||||
|
|
||||||
|
$pop.unlisten( "seeked", secondSeekedEvent );
|
||||||
equal( Math.round( $pop.currentTime() ), 5, "pause(n) sets currentTime to 5" );
|
equal( Math.round( $pop.currentTime() ), 5, "pause(n) sets currentTime to 5" );
|
||||||
plus();
|
plus();
|
||||||
});
|
};
|
||||||
|
|
||||||
|
$pop.listen( "seeked", firstSeekedEvent );
|
||||||
$pop.play( 10 ).pause();
|
$pop.play( 10 ).pause();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
setTimeout( poll, 10 );
|
setTimeout( poll, 10 );
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче