I currently have a jQuery plugin I am working with that is setup to use songs / tracks like this:
//Using an audio object
var a = new Audio();
a.src = 'somesong.mp3';
customPlayer.load( a );
It also supports these options:
//Using an audio element on the page
customPlayer.load( document.getElementsByTagName('audio')[0] );
//Using a config object and you only have one encoding
customPlayer.load({ src: 'somesong.mp3' });
//Using a config object, and you have an ogg and mp3 version
customPlayer.load({ src: 'somesong', codecs: [ 'ogg', 'mp3' ]});
I am trying to figure a way to use it with a Spotify track!... Any thoughts / suggestions would be appreciated.