I am building a rails application that lets users upload and listen to songs. It would be nice to build a player for these files that is capable of the following:
Requirements
- It shows sound waves (static) based on the song’s melody
- It has a play/pause button
- The progress bar is draggable to fast forward and rewind
- It fires events in the background asynchronously for tracking purposes, like play count, listener’s geo data, listener retention (average user attention span) – all this functionality will be in the back end, it just needs to be triggered
- It needs to be embedded on other websites
All in all, it is pretty much like the soundcloud player with some extra features.
Questions
- Which technology would you use for this? Flash? Javascript? Something else?
- Is there a ruby gem for this?
- Are there (customizable) tools out there already that more or less meet these requirements?
For compatibility purposes, you’d really need to use both. Not all devices support Flash, and not all browsers support the Javascript features needed for audio output.
No. Most of the functionality you’re describing would exist on the client side, not on the server.
Many of them, yes. See jPlayer, for instance.