SoundCloud Energy App 2.0

I’ve made some updates to the SoundCloud Energy Web App (that’s the actual app to the right; if you’re using Safari or Google Chrome you can press the “play” button to stream music right here).

From the original somewhat primitive version I’ve made the following updates:

  • In the original app I wrongly assumed you could treat multiple source elements for an HTML5 audio element as a “playlist.” This isn’t the intended use of multiple sources – it is intended to allow for multiple formats for a single track. To allow for a “playlist”-like functionality of multiple tracks I’ve loaded the SoundCloud tracks into a JavaScript array and written some simply JavaScript code to loop through them.
  • I got rid of the default HTML5 audio controls and replaced them with JavaScript-bound “play” and “pause” graphical buttons.
  • I removed the wordy explanation of what this actually is and replaced it with a Pachube-generated graph of the last 24 hours of energy interchange.

The updated code is in the github repository for your enjoyment.