2013-06-21 42 views
2

我想讓Brightcove嵌入式視頻播放器在IE8中工作。它目前在所有其他瀏覽器> IE8中工作。Brightcove嵌入式播放器不工作在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> 

任何幫助會如此感激!

回答

1

嘗試從開始和結束時刪除註釋。我見過這阻止IE8以前工作。不知道爲什麼。

+0

我希望這是解決方案,但它仍然無法正常工作:-( – sodonnell

+0

只是在XP兼容模式下測試您的代碼在IE 8.0.6001和不是,它對我來說工作正常。 – Mark