Browse Source

fix cursor not advancing after pausing then playing (#22)

fixes #22

fix by conde2, similar to line 786 (in handlePlaybackEvent)
sschmid 4 năm trước cách đây
mục cha
commit
ba5f9725d4
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/Playback/PlaybackManager.ts

+ 1 - 1
src/Playback/PlaybackManager.ts

@@ -333,7 +333,7 @@ export class PlaybackManager implements IPlaybackParametersListener {
     }
 
     public async play(): Promise<void> {
-        if (this.cursorIterator !== undefined && this.cursorIterator.EndReached) {
+        if (this.cursorIterator !== undefined && this.cursorIterator.EndReached && this.currentTimestamp.gte(this.cursorIterator.CurrentEnrolledTimestamp)) {
             console.log("End reached, resetting");
             this.reset();
         }