SimformSolutionsPvtLtd / react-native-audio-waveform

React Native component to show audio waveform with ease in react native application ✨
MIT License
101 stars 9 forks source link

Sending `onCurrentDuration` with no listeners registered #65

Open andrii-yar opened 2 weeks ago

andrii-yar commented 2 weeks ago

Platform: MacOS latest I use IOS simulator with Expo

Infinity log " Sending onCurrentDuration with no listeners registered", it starts logging it even if I commented out all the library code how can I turn it off?

image
PhilippPriller commented 1 week ago

Same happens to me on my iPhone 15 if I unmount the component while an audio is being played. It seems like there is some sort of issue with the cleanup of the callbacks.

image

For now I've been able to avoid this issue by stopping the audio manually when the component gets unmounted.

 useEffect(() => {
    const stop = ref.current?.stopPlayer
    return () => {
      stop?.().catch(console.error)
    }
  }, [])