Page 1 of 1

[CDS API] MEDIA url and FlowPlayer

PostPosted: Mon Aug 05, 2013 11:30 pm
by kissskoool
Hi,

Could someone show me how to make Flowplayer read a video from the MEDIA URL given by the CDS API ?

Thanks !

Re: [CDS API] MEDIA url and FlowPlayer

PostPosted: Tue Aug 06, 2013 12:13 am
by zip
Look at MediaBrowser source javascript.

Re: [CDS API] MEDIA url and FlowPlayer

PostPosted: Tue Aug 06, 2013 3:00 pm
by kissskoool
Thanks !

I did not think to take a look to the media browser source code.

After some searchs, and if someone has the same question, it's very simple.

You just have to give flowplayer the contentUrl with the authToken :

  Code:
function playit(video_url)
{
   //get the flowplayer instance in the page
        var flowapi = flowplayer();
        //set the clip in the player
   flowapi.setClip(video_url);
        //play it
   flowapi.play();
}