Hello, I am kunaal a fullstack developer.I have a youtube channel "Modern Web" where I teach to make awesome web UI/ UX. Don't forget to checkout my youtube channel
Hello, I am kunaal a fullstack developer.I have a youtube channel "Modern Web" where I teach to make awesome web UI/ UX. Don't forget to checkout my youtube channel
Why not listen for
timeupdate
event on the audio element instead of usingsetInterval
.Yes for end of song seems like a better way. Especially long songs, more deviation
I would also suggest tracking the play/pause state against a variable instead of relying on css classes to determine the current state.
Yup! We can use
music.paused
as a condition instead of checking for play class both will work☺️Well I didn't knew about that. Thanks for telling this event☺️
It's best to consult the doc for stuff like that