0
我正在嘗試使用JavaScript API來嵌入使用視頻ID的視頻。 經過幾次探索之後,我發現了這樣做的方法,我想確定這是否是正確的使用方式,或者是否有我失蹤的任何東西?使用JavaScript API嵌入的Brightcove視頻
此代碼工作正常,但需要知道我是否以錯誤的方式進行操作。
<script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"></script>
<object class="BrightcoveExperience">
<param name="bgcolor" value="#FFFFFF" />
<param name="width" value="480" />
<param name="height" value="270" />
<param name="playerID" value="4942277584001" />
<param name="playerKey" value="AQ~~,AAAEfriyQEE~,ZL37ulQzt-toqcwK_Cwr35Bl9P3znlYu" />
<param name="isVid" value="true" />
<param name="isUI" value="true" />
<param name="dynamicStreaming" value="true" />
<param name="@videoPlayer" value="5072209967002" />
</object>
<!-- This script tag will cause the Brightcove Players defined above it to be created as soon
as the line is read by the browser. If you wish to have the player instantiated only after
the rest of the HTML is processed and the page load is complete, remove the line.-->
<script type="text/javascript">brightcove.createExperiences();</script>
<script type="text/JavaScript">
var player,
APIModules,
videoPlayer;
function onTemplateLoad(experienceID){
player = brightcove.api.getExperience(experienceID);
APIModules = brightcove.api.modules.APIModules;
}
function onTemplateReady(evt){
videoPlayer = player.getModule(APIModules.VIDEO_PLAYER);
videoPlayer.play();
}
</script>
<!-- End of Brightcove Player -->