Skip to content

Commit 11d9220

Browse files
committed
fixes #24
1 parent 7b3b933 commit 11d9220

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/library/core.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ export class PlayerCore {
756756
// if there is a sound currently being played
757757
if (currentSound !== null && currentSound.state === PlayerSound.SOUND_STATE_PLAYING) {
758758

759-
const nextSound = this._getSoundFromQueue({ whichSound: PlayerCore.PLAY_SOUND_NEXT, updateIndex: true });
759+
const nextSound = this._getSoundFromQueue({ whichSound: PlayerCore.PLAY_SOUND_NEXT, updateIndex: false });
760760

761761
if (currentSound.onEnded !== null) {
762762

@@ -831,6 +831,8 @@ export class PlayerCore {
831831
// AND the currentIndex is null
832832
// we set it to first sound in queue
833833
soundIndex = 0
834+
835+
// else we use currentIndex (so the current sound)
834836
if (this._currentIndex !== null) {
835837
soundIndex = this._currentIndex
836838
}

0 commit comments

Comments
 (0)