SoundCloud-AS3-API: Small Update and new URL

This is just a quick note that I’ve uploaded some minor changes to the SoundCloud-AS3-API on github. I finally added a method to retrieve a signed URLRequest for any API resource. This comes in handy when you want to access the stream of a private track. Here’s a simple example:

</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var urlRequest:URLRequest = scClient.getSignedURLRequest(myTrack.stream_url);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var sound:Sound = new Sound(urlRequest);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">sound.play();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">

var urlRequest:URLRequest = scClient.getSignedURLRequest(somePrivateTrack.stream_url);

var sound:Sound = new Sound(urlRequest);

sound.play();

I also fixed an issue with GET parameters not being added. Thanks to Jesse for pointing this out  - check out his SoundCloud App for Android built with the AS3-API!

I’m trying to add support for SoundCloud’s new OAuth 2.0 API  in the next release. I’m not sure if this will bring any benefits but the guys at SoundCloud are asking every week for it ;) However, they will continue to support the “old” API.

Note that the project now has a new URL because I changed my github username to “dorianroy”: http://github.com/dorianroy/Soundcloud-AS3-API.

This entry was posted in Uncategorized. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

4 Comments

  1. Barry
    Posted October 19, 2011 at 06:04 | Permalink

    Hi Dorian,
    Do you have an example of how to call the “resolve” API with this library? I haven’t been able to get it to work. I’ve tried several patterns, but can’t get it to work. I am currently manually using the resolve API in the API console to resolve tracks from their URL. If you have got this working, I would very much appreciate some guidance.

    This wrapper has really helped me. Thanks very much for putting it out there.

  2. Barry
    Posted October 25, 2011 at 18:21 | Permalink

    Hi Dorian,
    Just wanted to let you know that I have been able to execute the resolve API call by building the full URL request from a string.

    urlRequest.url = http://api.soundcloud.com/resolve?url=http://soundcloud.com/TRACKURL&client_id=CONSUMER_KEY

    I wasn’t able to get it working if the oauthParams where included.

  3. Nico
    Posted January 26, 2012 at 18:43 | Permalink

    Hi Dorian,

    Thx for all your work, it’s awesome!

    I’m a Flash Developer and I read your tuto about how to build an SoundCloud Flash based app but I did not find how to simply load the player to read an artist track like Foo Fighters or an entire playlist.

    I tried to load the SoundCloud player with a loader but I have a security error…

    Can you help me? Please send me a link. I’m sure it’s very simple.

    Thx a lot.

  4. Posted May 3, 2012 at 03:14 | Permalink

    We were at school together http://ejicurigij.de.tl underground angels bbs Wow those tits, i love those tits! A little saggy? WTF. Those are beautiful and naturals! Fuck hard silicone balloons.

One Trackback

  1. [...] This post was mentioned on Twitter by Dorian Roy, dasflash. dasflash said: SoundCloud-AS3-API: Small Update and new URL http://bit.ly/93qjFW #flash #flex [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>