Skip to content

Commit

Permalink
fix: keep one paused player to fix stopAllplayer breaking other paused
Browse files Browse the repository at this point in the history
  • Loading branch information
dprevost-LMI committed Nov 18, 2024
1 parent e42ecf3 commit b397be7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ const RenderListItem = React.memo(

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

0 comments on commit b397be7

Please sign in to comment.