2
votes

I have this testing area here: http://codepen.io/sheriffderek/pen/RPbpQZ

Besides needing a bunch of js refactoring, now that I've been playing with the API, I'm happy with what is going on.

It works great in CodePen on my laptop, but on my phone, it is silent.

It's not auto play. Just a click event.

I've tried in debug mode --- and a few other CodePen options... in case it's an origin thing... any ideas? The code is just basic stuff, so I think it's something else.

SC.stream("/tracks/293", function(sound){
  sound.play();
});
1

1 Answers

1
votes

I had a really similar problem with the custom player that I was developing. I would work perfectly on desktop, but on mobile it wouldn't play on the first click. It would play however when I paused it and then pressed play again.

I was trying to run the debugMode so I could see what the difference was between desktop and mobile. I couldn't get the debugMode to work, without linking to the soundmanager JS as well. As soon as I added it the player worked perfectly on mobile too.

Not sure what the root issue was, but it seems that you need to load the soundmanager JS along with the SoundCloud SDK and to get all of the functionality. Doesn't really get to the bottom of it, but I hope it helps.