music player in the browser
Just a rough idea I wrote up today. I didn't want to add songs to my playlist and in a moment of inspiration I dropped the song in the browser, then I thought about making a playlist in the browser and that's how this little snippet came to be.
Code available here
Online version
Tested in Chrome 22, I really tryed to make it work in FF but for some weird reason the drag and drop didn't want to work properly or the audio tag would disappeared when the song was dropped.
Features
- Drag and drop area to add songs
- Autoplays when you add the first song
- Songs added afterwards get queued in a list
- Clicking on any of the songs in the list will play that song
Audio API
I'm thinking of rewriting it using the Audio API to have access to things like song length also crossfade would be very nice. Currently when a song finishes nothing happens. Really curious of feedback :)
Written by Andrei Oprea
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Related Tags
#javascript
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#