Skip to content

Commit

Permalink
fix(ai-sources): listen button does not chnage after complete audio
Browse files Browse the repository at this point in the history
  • Loading branch information
saithsab877 committed Sep 23, 2024
1 parent da49083 commit 686a992
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ export const Default = () => {
audioElement.removeEventListener('ended', onAudioPlaybackComplete)
}
}
}, [setCurrentPlayingAudio])
}, [setCurrentPlayingAudio, isPlaying])

useEffect(() => {
setIsPlaying(false)
}, [selectedNode])

const togglePlay = () => {
if (currentPlayingAudio?.current && currentPlayingAudio.current !== audioRef.current) {
Expand Down

0 comments on commit 686a992

Please sign in to comment.