Thursday, 15 September 2011

javascript - How to play song using SoundCloud API -



javascript - How to play song using SoundCloud API -

i trying create music player works soundcloud. have buttons play, next, prev. , made functions like:

function playit(){ sc.stream("/tracks/293", function(sound){ sound.play(); }); }

so plays song when button player:

<button onclick="playit()">play</button>

but not work. idea? here demo

1º - set js files in head. utilize "external resources" on jsfiddle.

2º - set var sound = [...] before sc.steam.

is that.

demo: http://jsfiddle.net/don/zcn7g/3/

javascript jquery api soundcloud

No comments:

Post a Comment