Reputation: 31
I need to get the current time of playback of an audio. I've been using the react-wavesurfer package to play the audio and I can see that wavesurfer.js has a method to get the current time of the playback but I can't seem to figure out how to do it with react.
Upvotes: 1
Views: 1204
Reputation: 31024
Seems like they have onPosChange
event in their DOCS
Is basically called on audioprocess and seek events and consolidates the received time formats into the same type of argument object as the onAudioprocess callback (time in seconds, not as a relative value):
{ wavesurfer: wavesurferInstance, originalArgs:
[playBackPositionInSecs]
}
It seems like it's the same as the "none-react" audioprocess
event:
Upvotes: 1