Skip to content

Commit b397be7

Browse files
committed
fix: keep one paused player to fix stopAllplayer breaking other paused
1 parent e42ecf3 commit b397be7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

example/src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ const RenderListItem = React.memo(
104104

105105
// Start player when it is a different one!
106106
if (currentPlayingRef?.current?.playerKey !== ref?.current?.playerKey) {
107+
// Because of a bug with the stopAllPlayer, cannot have multiple payers in paused state
108+
await currentPlayingRef?.current?.stopPlayer();
107109
await startNewPlayer();
108110
}
109111
}

0 commit comments

Comments
 (0)