2013-10-21 45 views
0

我已經看了一些其他資源,都在SO和MediaElements的網站上,似乎沒有任何工作。「下載文件」與MediaElements.js在IE8中的視頻

我試圖使一個的jsfiddle但它不會在IE8加載: http://jsfiddle.net/RyzaV/

下面的代碼:

<div id="video" class="box"> 
    <video width="200" height="155" style="width: 100%; height: 100%;" id="player1" controls="controls" preload="true"> 
     <source type="video/<?php echo $video_format; ?>" src="<?php echo $video_url; ?>" /> 
     <object width="200" height="155" type="application/x-shockwave-flash" data="http://s3.amazonaws.com/websites.retailcatalog.us/media/mediaelements/flashmediaelement.swf"> 
      <param name="movie" value="http://s3.amazonaws.com/websites.retailcatalog.us/media/mediaelements/flashmediaelement.swf" /> 
      <param name="flashvars" value="controls=true&file=<?php echo $video_url; ?>" /> 
     </object> 
    </video> 

    <link type="text/css" rel="stylesheet" href="//s3.amazonaws.com/websites.retailcatalog.us/media/mediaelements/mediaelementplayer.min.css" /> 
    <script type="text/javascript" src="//s3.amazonaws.com/websites.retailcatalog.us/media/mediaelements/mediaelement-and-player.min.js"></script> 
    <script type="text/javascript" language="javascript"> 
     $('#video').find('video:first').mediaelementplayer({ 
      success: function(media, node, player) { 
       $('#' + node.id + '-mode').html('mode: ' + media.pluginType); 
      } 
      , flashName: 'flashmediaelement-cdn.swf' 
     }); 
    </script> 
</div> 

任何想法,我缺少的是什麼?這是參考頁:
http://www.mediaelementjs.com/#note2

回答

0

不確定究竟是什麼原因造成的問題,但下面的結束了工作(它看起來像object標籤是導致該問題):

<div id="video" class="box"> 
    <video width="200" height="155" style="width: 100%; height: 100%;" id="player1" controls="controls" preload="true"> 
     <source type="video/<?php echo $video_format; ?>" src="<?php echo $video_url; ?>" /> 
    </video> 

    <link type="text/css" rel="stylesheet" href="//s3.amazonaws.com/websites.retailcatalog.us/media/mediaelements/mediaelementplayer.min.css" /> 
    <script type="text/javascript" src="//s3.amazonaws.com/websites.retailcatalog.us/media/mediaelements/mediaelement-and-player.min.js"></script> 
    <script type="text/javascript" language="javascript"> 
     $('#video').find('video:first').mediaelementplayer({ 
      success: function(media, node, player) { 
       $('#' + node.id + '-mode').html('mode: ' + media.pluginType); 
      } 
      , flashName: 'flashmediaelement-cdn.swf' 
     }); 
    </script> 
</div> 
0

你應該放在頭標籤下面幾行:

<link type="text/css" rel="stylesheet" href="//s3.amazonaws.com/websites.retailcatalog.us/media/mediaelements/mediaelementplayer.min.css" /> 
<script type="text/javascript" src="//s3.amazonaws.com/websites.retailcatalog.us/media/mediaelements/mediaelement-and-player.min.js"></script> 

然後,要確保你之前的MediaElement和-player.min.js調用jQuery的。