我正在尝试让 Brightcove 嵌入式视频播放器在 IE8 中工作。它目前适用于所有其他浏览器> IE8。
我从这个 Brightcove 示例中检索到此代码:http: //files.brightcove.com/BCL_MediaAPI_example.html
<!DOCTYPE html>
<html>
<head>
<title>Media API Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Javascript Media API wrapper from opensource.brightcove.com -->
<script type="text/javascript" src="http://files.brightcove.com/bc-mapi.js"></script>
</head>
<body>
<h1>Media API Sample</h1>
<!-- Start of Brightcove 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="480" />
<param name="height" value="270" />
<param name="playerID" value="921267190001" />
<param name="playerKey" value="AQ~~,AAAA1oy1bvE~,ALl2ezBj3WG3MLvDx9F9zkV06cNK00ey" />
<param name="isVid" value="true" />
<param name="isUI" value="true" />
<param name="dynamicStreaming" value="true" />
<!-- params for Universal Player API -->
<param name="includeAPI" value="true" />
<param name="templateReadyHandler" value="BCL.onTemplateReady" />
</object>
<script type="text/javascript">brightcove.createExperiences();</script>
<!-- End of Brightcove Player -->
<fieldset>
<legend>Videos</legend>
<div id="results"></div>
</fieldset><br>
<!-- This is the script to modify for the exercise -->
<script type="text/javascript">
// BCL Media API search maker -- adapted from JS-MAPI on opensource.brightcove.com
// namespace to keep all the "global" vars together
var BCL = {};
// placeholder - params for API call
BCL.params = {};
// Media API read token
BCMAPI.token = "WDGO_XdKqXVJRVGtrNuGLxCYDNoR-SvA5yUqX2eE6KjgefOxRzQilw..";
// set the callback for Media API calls
BCMAPI.callback = "BCL.onSearchResponse";
// set the filter
BCL.params.any = "tag:nature";
BCMAPI.search(BCL.params);
BCL.onSearchResponse = function(jsonData) {
var str = "";
for (var index in jsonData.items) {
str += "<a onclick=\"BCL.playVideo(" + jsonData.items[index].id + ")\" style=\"cursor:pointer\"><img src=\"" + jsonData.items[index].thumbnailURL + "\"/><br/><small>" + jsonData.items[index].name + "</<small></a><hr/>";
}
document.getElementById("results").innerHTML = str;
}
// Player API scripting
// event listener for the player being ready
BCL.onTemplateReady = function (event) {
BCL.player = brightcove.api.getExperience("myExperience");
// get a reference to the video player
BCL.videoPlayer = BCL.player.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER);
}
// play video function
BCL.playVideo = function(videoID) {
BCL.videoPlayer.loadVideoByID(videoID);
}
</script>
</body>
</html>
任何帮助将不胜感激!