diff --git a/src/audio-player-composable/audio-player-composable.tsx b/src/audio-player-composable/audio-player-composable.tsx index 519de5a62..544bef7a8 100644 --- a/src/audio-player-composable/audio-player-composable.tsx +++ b/src/audio-player-composable/audio-player-composable.tsx @@ -77,12 +77,14 @@ export const AudioPlayerComposable = ({ // On render onTimeUpdate will be fired and initialTime will be set as a value for currentTime state. // I can't set this one to the setCurrentTime state directly as the audioElement time // will still be 0, currentTime will be overridden to 0 and the audio will start from 0 - if (audioRef && audioRef.current && duration) { + + if (audioRef && audioRef.current) { audioRef.current.currentTime = initialTime; } + setCurrentTime(0); setDisplayDuration(0); - }, [src, initialTime, duration]); + }, [src, initialTime]); const { audioEvents,