Hello, Today we'll see, how we can easily create a music player using HTML, CSS and JS only. No other library. Our music player has modern looking ...
For further actions, you may consider blocking this person and/or reporting abuse
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
Well I didn't knew about that. Thanks for telling this event☺️
It's best to consult the doc for stuff like that
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☺️Hi, I am new to HTML/CSS and am creating this project, however the "play" button is in the top left hand side of the container and not the centre, despite me checking the code multiple times I can not figure out why, and my code is exactly the same as yours, any suggestions would be appreciated!
The problem: cdn.discordapp.com/attachments/904...
Code: cdn.discordapp.com/attachments/904...
The pre and nxt buttons don't even show up exactly how your's shows up. For me they are just very narrow white lines. Where did you get those images from?
I created those arrows while designing the music player in figma. But you can use font awesome or you can download arrow image from google
Oh ok coo, I gotta check out figma. I actually went to Google and looked through the images but then I stopped and thought to myself that images from there won't work for the button. Also if you don't mind answering how do you memorize sush very long lines of code across different languages? It reminds me of really long math problems. It just seems like so much to memorize especially all the different numbers for the sizes of the various elements.
No programming is not about memorizing things. I don't memorize any line. Its just practice which made everything easy for us. If you are talking about how I record my tutorial in that case I use a second screen which show me what to code. So there is no memorizing 😅
I want to ask, to make a list of songs like rytmp3 is it also possible to make it like the way above?