The Musicshake API has been discontinued. API calls, new developer keys and the demo widgets are no longer available. This documentation is kept for reference.
rtmp
Get the MP3 URL for RTMP song streaming for Flash.
Parameters
- api_key - developer key
- song_id - the song ID obtained from the songlist method
- callback (optional) - Callback function name for a JSONP request.
Request Example
https://developers.musicshake.com/api/rtmp?api_key=YOUR_API_KEY&song_id=661
Response Example
{"url":"http:\/\/s208ox97i0l791.cloudfront.net\/audioswap\/490\/948\/8d0cb38f-7e9d-43a0-b47a-06be793f8d34.mp3"}
ActionScript Example
import com.adobe.serialization.json.JSON;
import flash.net.URLLoader;
import flash.events.Event;
import flash.events.IOErrorEvent;
private function loadCategories():void
{
var requestURL:String = "http://developers-staging.musicshake.com/api/rtmp?api_key=YOUR_API_KEY&song_id=661";
var ul:URLLoader = new URLLoader();
ul.addEventListener(IOErrorEvent.IO_ERROR, onURLLoaderError);
ul.addEventListener(Event.COMPLETE, onURLLoaderComplete);
try {
ul.load(new URLRequest(requestURL));
} catch (error:SecurityError) {
}
}
private function onURLLoaderError(error:Error):void
{
}
private function onURLLoaderComplete(event:Event):void
{
trace(o.url);
}
