2013-10-02 79 views
1

我想從jPlayer中使用url嵌入視頻文件。jPlayer不支持IE 7,8,9

這是我的代碼是using.This工作完全正常的Chrome和Firefox,但無法在Internet Explorer 7,8或顯示9.Video框,它顯示的視頻框下的錯誤消息。

jPlayer Developer Guide說支持IE 7及以上。

那麼會有什麼問題?

我嘗試HTML5介紹用戶標記爲這一點,但IE 8及以下版本不支持也。

<html> 
    <head> 


     <!--Stylesheets--> 
     <link rel="stylesheet" href="css/styles.css"/> 

     <!--jQuery--> 
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> 

     <!--jPlayer--> 
     <script src="js/jquery.jplayer.min.js"></script> 

     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> 


    </head> 
<body> 
<div style="margin-left:50px;" > 
    <a href="https://www.google.com"> 
     <img src="back.jpg" width="64px" height="64px" alt=""/>  
    </a> 
</div> 
    <!--container for everything--> 
    <div id="jp_container_1" class="jp-video jp-video-360p"> 

     <!--container in which our video will be played--> 
     <div id="jquery_jplayer_1" class="jp-jplayer"></div> 

     <!--main containers for our controls--> 
     <div class="jp-gui"> 
      <div class="jp-interface"> 
       <div class="jp-controls-holder"> 

        <!--play and pause buttons--> 
        <a href="javascript:;" class="jp-play" tabindex="1">play</a> 
        <a href="javascript:;" class="jp-pause" tabindex="1">pause</a> 
        <span class="separator sep-1"></span> 

        <!--progress bar--> 
        <div class="jp-progress"> 
         <div class="jp-seek-bar"> 
          <div class="jp-play-bar"><span></span></div> 
         </div> 
        </div> 

        <!--time notifications--> 
        <div class="jp-current-time"></div> 
        <span class="time-sep">/</span> 
        <div class="jp-duration"></div> 
        <span class="separator sep-2"></span> 

        <!--mute/unmute toggle--> 
        <a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a> 
        <a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a> 

        <!--volume bar--> 
        <div class="jp-volume-bar"> 
         <div class="jp-volume-bar-value"><span class="handle"></span></div> 
        </div> 
        <span class="separator sep-2"></span> 

        <!--full screen toggle--> 
        <a href="javascript:;" class="jp-full-screen" tabindex="1" title="full screen">full screen</a> 
        <a href="javascript:;" class="jp-restore-screen" tabindex="1" title="restore screen">restore screen</a> 

       </div><!--end jp-controls-holder--> 
      </div><!--end jp-interface--> 
     </div><!--end jp-gui--> 
     <div class="jp-no-solution"> 
      <span>Update Required</span> 
      Here's a message which will appear if the video isn't supported. A Flash alternative can be used here if you fancy it. 
     </div> 

    </div><!--end jp_container_1--> 

    <!--instantiate--> 
    <script type="text/javascript"> 
    $(document).ready(function(){  
     $("#jquery_jplayer_1").jPlayer({ 
      ready: function() { 
       $(this).jPlayer("setMedia", { 
        webmv: "Big_Buck_Bunny_Trailer.webm", 
        poster: "Big_Buck_Bunny_Trailer_480x270.png" 

       }); 
      }, 
      swfPath: "js", 
      supplied: "webmv", 
      size: { 
       width: "570px", 
       height: "340px", 
       cssClass: "jp-video-360p" 
      } 
     }); 
    }); 
    </script> 

</body> 
</html> 

回答

0

Internet Explorer不支持WebM視頻格式。 在這種情況下,JPlayer使用「Flash Fallback」方法,即使用Flash Player播放不支持的視頻格式。 因此,爲了在Internet Explorer中可視化您的WebM視頻,您需要安裝Flash Player。