Skip to content

Instantly share code, notes, and snippets.

Created April 27, 2011 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/945361 to your computer and use it in GitHub Desktop.
Save anonymous/945361 to your computer and use it in GitHub Desktop.
var player;
var rdioListener = {
ready: function() {
console.log('player ready');
player = document.getElementById("CTplayer");
player.rdio_play('a254895')
},
playStateChanged: function(state) {
console.log('changed:', state);
}
};
var flashvars = {
playbackToken: "GAlNi78J_____zlyYWs5ZG02N2pkaHlhcWsyOWJtYjkyN2xvY2FsaG9zdEbwl7EHvbylWSWFWYMZwfc",
domain: encodeURIComponent('http://'+document.location.host),
listener: 'rdioListener'
};
var params = {
'allowScriptAccess': 'always'
};
function main() {
swfobject.embedSWF("http://www.rdio.com/api/swf/", "CTplayer", "1", "1", "9.0.0","", flashvars, params);
}
window.onload = main;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment