Skip to content

Commit

Permalink
test for issue rwaldron#35 and its fix at issue rwaldron#36
Browse files Browse the repository at this point in the history
  • Loading branch information
tammo0 committed May 16, 2012
1 parent f1bb28c commit 11cef4c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/sequence.unit.js
Expand Up @@ -756,3 +756,35 @@ asyncTest("pause() and play()", 3, function() {
});


asyncTest("play() after sequence ended", 2, function() {

var seq = Popcorn.sequence( "video-sequence-b", remoteMediaList ),
hasRun = false,
endet = 0;

seq.on( "loadedmetadata", function() {

seq.on( "pause", function() {
if (seq.currentTime() >= seq.duration()) {

if (!seq.playing) {
endet = 1;
}

seq.play();

seq.cue(2, function() {

start();
equal( endet, 1, "Sequence ended" );
equal( seq.active, 0, "Sequence cycle started from beginning" );
hasRun = true;
seq.remove();
})
}
})
seq.play();
});
});


0 comments on commit 11cef4c

Please sign in to comment.