2
0
Эх сурвалжийг харах

Fix pausing on UNSTARTED for FileTrack

Thomas Dy 3 жил өмнө
parent
commit
ee22981ab1
1 өөрчлөгдсөн 5 нэмэгдсэн , 1 устгасан
  1. 5 1
      src/audio.ts

+ 5 - 1
src/audio.ts

@@ -162,7 +162,11 @@ export class FileTrack extends Track {
   }
 
   pause(): void {
-    if (this.state === PlayState.PAUSED || this.state === PlayState.STOPPED)
+    if (
+      this.state === PlayState.UNSTARTED ||
+      this.state === PlayState.PAUSED ||
+      this.state === PlayState.STOPPED
+    )
       return;
     this.resumeTime = this.manager.getTime() - this.playStartTime;
     if (this.source) {