Embedded SoundCloud player


#1

Any experience on embedding a SoundCloud player in Composer so that it can be played in the app? I tried SoundCloud’s simple Share > Embed code, for example:

<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/users/131928031&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe>

It shows the player, can even scroll tracks, but can’t play them. On top there’s just a button to “Play on SoundCloud / Listen in browser”.

I was wondering if SoundCloud’s JavaScript widget might do the trick. I tried copying the quick start HTML code, but that results in a blank page on the app and I don’t know how to debug.


#2

To debug, you need to either use an Android device (which lets you use Chrome web inspector directly, provided your phone is in debug mode) – see instructions at http://docs.appgyver.com/tooling/cli/debugging/debugging-on-android/

For iOS, you need to create a debug scanner, which is a bit trickier (http://docs.appgyver.com/tooling/cli/debugging/debugging-on-ios/). We’re in the process of updating these docs to be Composer-specific (now they’re for Steroids/Supersonic) – I’ll have to

I checked the console log myself with the example widget, and it looks like it’s loading the HTML5 widget fine, but the streams are returning a request timeout (e.g. https://api.soundcloud.com/i1/tracks/265469040/streams?format=json&client_id=a3e059563d7fd3372b49b37f00a00bcf&app_version=1470821529 – which again works fine when opened by the browser), not sure why… Our wrapper should be whitelisting all URLs, so it shouldn’t be that. I’d talk with SoundCloud support about this, and if possible, verify that the embed iframe is working with a vanilla PhoneGap app you build with Xcode/Android Studio.

The JavaScript widget on the other hand seems to use a Flash player, which is unsupported on iOS.