madzadev / audio-player

🎵 Music player with custom controls, playlist, filters, and search.
https://audioplayer.madza.dev
344 stars 49 forks source link

Is there a way to get the current timestamp of the audio that's being played? #16

Closed Babatunde13 closed 2 weeks ago

Babatunde13 commented 1 month ago

So In my use case, I'm passing I can pass one or more track, but if the track passed is one, is there a way for me to get the current time stamp of the audio in millisecond?

madzadev commented 2 weeks ago

Hi there, thanks for using the audio player! The time is handled in seconds in the Time.jsx component. If you want to get in ms you could customize it in App.jsx via audio.currentTime and log it to the console, for example.