Skip to content

Commit

Permalink
Fix: add timeupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Dec 31, 2023
1 parent 9f97c9b commit 18e8d1e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ function useWavesurferState(wavesurfer: WaveSurfer | null): {
setIsPlaying(false)
}),

wavesurfer.on('timeupdate', () => {
setCurrentTime(wavesurfer.getCurrentTime())
}),

wavesurfer.on('destroy', () => {
setIsReady(false)
setIsPlaying(false)
Expand Down

0 comments on commit 18e8d1e

Please sign in to comment.