Skip to content

Commit

Permalink
wait until first current time change
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Jun 15, 2021
1 parent 37f2fc2 commit 78d4eed
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions test/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ QUnit.test('playback', function(assert) {

this.player.play();

this.player.on('ended', () => {
assert.ok(true, 'played back video');
done();
});
const onTimeupdate = () => {
if (this.player.currentTime() > 0) {
this.player.off('timeupdate', onTimeupdate);
assert.ok(true, 'played back video');
done();
}
};

this.player.on('timeupdate', onTimeupdate);
});

0 comments on commit 78d4eed

Please sign in to comment.