My Music Playlist
Hi! Sooo…I made my first project on glitch, a music playlist!(FINALLY)!
I will be styling it with CSS soon, but this is how it works!
Thanks to @code-alt and @aboutDavid and everyone who showed me how to upload music to glitch!
I am going to add this project to my website, so i hope you all like it! (And I hope you enjoy my website, too. Tell me if you do)

I appreciate all feedback, including negative feedback, on this project.


it looks great! maybe u could make it only play one song at a time so you don’t have to reload to listen to a different song


Nice songs and

that should be 14. House of Memories (by Panic! At the Disco)


oh, lol, i’ll fix that.

what do you mean?

He means we wants to change songs without refreshing. When you try to change songs, you okay both songs at once. This is an example on how to fix that issue:

<script>window.player = new Audio();</script>
<button onclick="window.player.src = 'url/to/file.mp3';">Click to play song 1</button>
<button onclick="window.player.src = 'url/to/file.mp3';">Click to play song 2</button>
<button onclick="window.player.src = 'url/to/file.mp3';">Click to play song 3</button>
1 Like

oh, ok, thanks. @Remiix I’ll work on that when I get a chance.

1 Like

You should read about DRY, it means Don’t Repeat Yourself

you have a lot of repeated code, so it can get hard to maintain


actually that doesn’t seem to work. it makes the song not work at all. or maybe i’m doing something wrong?

Add that script tag to the top of the page.

<script>window.player = new Audio();</script>

That’s the part you forgot.

1 Like

i put that, but it still doesn’t work…

Ah, ok, I see the problem. Change to My bad.


some of the songs won’t work, but i don’t see anything wrong with the code. how do i make code show up in a post so that you can see what I’m talking about?

add three backticks at the start of the code (```) and three at the end (```)

ok, so this is how it looks:
<li>Ah, It's a Wonderful Cat Life (by Kagamine Len and GUMI) <button onclick="window.player.src = ''s%20a%20Wonderful%20Cat%20Life%E3%80%8D%E3%80%90Len%20x%20GUMI%E3%80%91%5BENG%20SUB%5D.mp3?v=1606788799649';">Click me to Listen!</button></li><br><br>

Can you upload the song without that ’

1 Like

Lol, my friend just showed me how to fix that 15 minutes ago. but thanks for your help. you’re just supposed to put a backwards slash before the apostrophe.

1 Like