We moved this page to our Documentation Portal. You can find the latest updates here. |
Question
How can I Integrate HTML5 player using CALLBACK URL?
Answer
In the instruction page, we provide callback URL via both JSON and JSONP approach. The callback URL would return appropriate streaming URLs to be played by different OS/devices: web, iPhone, Android, etc.
You can integrate the JSONP by using the following method:
<script>
function MyCallBack(urls) {
// load the flash / html5 player with one of the urls
}
</script>
<script src="http://video.worldcdn.net/[resource id]/[stream name or filename].jsonp?callback=MyCallBack " />
Outcome:
The outcome of the callback URL looks like the following, however, do not use them as a playing URL in your player as they are the result after CDN redirection, that means visitors from different location will get different result using the callback URL. Always use the callback URL in your script:
MyCallBack({ “rtmp”: “rtmp://324658483.e.384856423.r.worldcdn.net/384856423/mystream”, “rtmpe”: “rtmp://324658483.e.384856423.r.worldcdn.net/384856423/mystream”, “apple”: “http://324658483.e.384856423.r.worldcdn.net/384856423/mystream/playlist.m3u8”, “adobe”: “http://324658483.e.384856423.r.worldcdn.net/384856423/mystream/manifest.f4m”, “rtsp”: “rtsp://324658483.e.384856423.r.worldcdn.net/384856423/mystream”, “silverlight”: “http://324658483.e.384856423.r.worldcdn.net/384856423/mystream/Manifest” });