I tried to use this snippet from the Soundcloud API:
<script src="http://connect.soundcloud.com/sdk.js">
<script>
SC.initialize({
client_id: 'YOUR_CLIENT_ID'
});
# stream track id 293
SC.stream("/tracks/293", function(sound){
sound.play();
});
</script>
It works in any browsers aside from Safari mobile, both on iPhone and iPad, where the music stream does not play at all.
What am I doing wrong? (I replaced track id and client id with my own details)
Thanks
In mobile safari the play has the restriction that audio playback has to be triggered by a user action. So you’ll have to add some sort of button or link which when clicked will call the sound.play() function.