Skip to content

Commit ffab2a3

Browse files
Merge pull request #42 from SimformSolutionsPvtLtd/fix/UNT-T26093_playing_same_audio_doesnt_play
fix(UNT-T26093): playing same audio doesn't play
2 parents 59ee2ac + ea11fab commit ffab2a3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

example/src/App.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,15 @@ const ListItem = React.memo(
107107
scrubColor={Colors.white}
108108
waveColor={Colors.gray}
109109
candleHeightScale={4}
110-
onPlayerStateChange={setPlayerState}
110+
onPlayerStateChange={state => {
111+
setPlayerState(state);
112+
if (
113+
state === PlayerState.stopped &&
114+
currentPlaying === item.path
115+
) {
116+
setCurrentPlaying('');
117+
}
118+
}}
111119
onPanStateChange={onPanStateChange}
112120
onError={error => {
113121
console.log(error, 'we are in example');

0 commit comments

Comments
 (0)