Saturday, 15 September 2012

html - Embed code Brightcove media api -



html - Embed code Brightcove media api -

i trying find out way access publishing code of video on media api through brightcove, 1 can on there cloud studio player 1 below.

<!-- start of brightcove player --> <div style="display:none"> </div> <!-- utilize of code snippet, agree brightcove publisher t , c found @ https://accounts.brightcove.com/en/terms-and-conditions/. --> <script language="javascript" type="text/javascript" src="http://admin.brightcove.com/js/brightcoveexperiences.js"></script> <object id="myexperience" class="brightcoveexperience"> <param name="bgcolor" value="#ffffff" /> <param name="width" value="960" /> <param name="height" value="445" /> <param name="playerid" value="2164048951001" /> <param name="playerkey" value="aq~~,aaabzjdwv4k~,nrw5-yjoyhvzyipodobx62cnfzvsm1ri" /> <param name="isvid" value="true" /> <param name="isui" value="true" /> <param name="dynamicstreaming" value="true" /> </object> <!-- script tag cause brightcove players defined above created line read browser. if wish have player instantiated after rest of html processed , page load complete, remove line. --> <script type="text/javascript">brightcove.createexperiences();</script>

i create alternative in video metadata section of api, have suggestions start. thanks.

i'm not sure can gather publishing code of asset via bc api isn't necessary. can utilize variables replace items of snippet may alter - playerid , playerkey , videoplayer value (which indicate player utilize , video insert) potentially width , height settings.

let's looking dynamically swap out video (assuming utilize same player), this:

function get_player($video_id){ $player = '<script language="javascript" type="text/javascript" src="http://admin.brightcove.com/js/brightcoveexperiences.js"></script> <object id="myexperience" class="brightcoveexperience"> <param name="bgcolor" value="#ffffff" /> <param name="width" value="960" /> <param name="height" value="445" /> <param name="playerid" value="2164048951001" /> <param name="playerkey" value="aq~~,aaabzjdwv4k~,nrw5-yjoyhvzyipodobx62cnfzvsm1ri" /> <param name="isvid" value="true" /> <param name="isui" value="true" /> <param name="dynamicstreaming" value="true" /> <param name="@videoplayer" value="'.$video_id.'" /> </object><script type="text/javascript">brightcove.createexperiences();</script>'; homecoming $player; }

and phone call function using id of video want display in player. same applied swapping out players , sizes.

echo get_player('my_video_id');

the @videoplayer param tells player video load. documentation may help.

api html publish brightcove

No comments:

Post a Comment