DEV Community

Esteban Fiddeou
Esteban Fiddeou

Posted on

How do I make button that plays a random audio?

I am currently building my own website, to document all the stuff I do, mainly my music.

I am making it in Google Sites, which makes it significantly easier.
However! I am trying to make a custom button that plays a random audio from a collection of music demos in my google drive.

Button

The button itself was easy to construct (and it looks very neat!), but I have NO IDEA how to make it play a random audio from a g. drive folder.

Top comments (1)

Collapse
 
benjioe profile image
Benjioe • Edited

You can try to use code from github.com/jialinzou/stream-music-...

You can also upload your songs on soundcloud for example. Then click on "share" button image share button > Embed and add the displayed code (<iframe ...) in your HTML.

image displayed code