.cadnomori
Navigation
Want this music player? Go here.

A lily-of-the-valley growing and budding.


.music player

This is a tutorial for a simple and small music player on your website, made possible through Javascript. You can see it in action in my sidebar to the left.

This player only plays one track and has no volume control, but can be paused. You must have Javascript enabled for it to work. It is meant to be stylized however you like, and blend in with your website's own design, at least compared to the media player your browser defaults to.

Here is the HTML code for this player:



And, here is the JavaScript (.js) code:



You need both codes in order for this player to work! I keep the .js as a separate file in my directory. If you do not have a paid Neocities account, you may upload your audio file to a service like Catbox or other file storage platform.

Thank you to the Mozilla tutorials for helping me write this player.