Skip to content

Commit ea11fab

Browse files
fix(UNT-T26093): playing same audio doesn't play
1 parent 59ee2ac commit ea11fab

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)