Skip to content

Commit 45e02fa

Browse files
committed
Fix seeking after playback ended
Closes #282
1 parent 2fe3da7 commit 45e02fa

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ class EndedState extends State {
168168
await this.play();
169169
}
170170

171-
seek(where) {
172-
if (this.driver.seek(where) === true) {
171+
async seek(where) {
172+
if (await this.driver.seek(where) === true) {
173173
this.core._setState('idle');
174174
return true;
175175
}

src/driver/recording.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ function recording(
348348

349349
if (isPlaying) {
350350
await resume();
351+
} else if (events[nextEventIndex] === undefined) {
352+
onEnd();
351353
}
352354

353355
return true;

0 commit comments

Comments
 (0)