Skip to content

Commit

Permalink
Audio: Ensure progress is reset in onEnded(). (#29930)
Browse files Browse the repository at this point in the history
* fix: reset progress onEnded Audio with stop method

* fix: Prevent warning by resetting progress when stopping audio without playback control
  • Loading branch information
Jian-Nam authored Nov 21, 2024
1 parent 8ce69e0 commit dce25de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/audio/Audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ class Audio extends Object3D {
onEnded() {

this.isPlaying = false;
this._progress = 0;

}

Expand Down

0 comments on commit dce25de

Please sign in to comment.