VideoJS和FireFox HTML5视频.WebM格式不起作用

时间:2011-11-30 02:16:13

标签: video html5-video mp4 webm flash-video

UPDATE :似乎缓慢地将FireFox上的视频缓冲起来。等待约5分钟后,视频将播放。在所有其他设备上,它立即加载......这是什么交易?

问题:如何在包括移动设备在内的所有浏览器上播放VideoJS?我认为我根据VideoJS文档做了所有这些,但我必须遗漏一些东西。

网站是:http://centerforconfidence.com/addons/stop-tracking-ga/index.php?ct=disable

情况:
我正在使用VideoJS和Embed Form Builder: http://videojs.com/embed-builder/

我已经从Adobe Premier Pro创建了h.264编码的.mp4视频 我使用AVS视频转换器将其转换为.WebM视频

在我的Andriod设备上,以下代码用作嵌入式视频 在FireFox上,它会尝试加载HTML5视频播放器,但从不加载视频 在IE9上,它使用Flash Fallback。

     <!-- Begin VideoJS -->
  <div class="video-js-box">
    <!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
    <video class="video-js" width="560" height="340" controls preload autoplay poster="http://www.centerforconfidence.com/addons/videos/webinar-invite-1/ImagePreview2.png">
      <source src="http://www.centerforconfidence.com/addons/videos/webinar-invite-1/Webinar-Invite-1-Final-4.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
      <source src="http://www.centerforconfidence.com/addons/videos/webinar-invite-1/Webinar-Invite-1-Final-4.webm" type='video/webm; codecs="vp8, vorbis"' />
      <!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
      <object id="flash_fallback_1" class="vjs-flash-fallback" width="560" height="340" type="application/x-shockwave-flash" 
        data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
        <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
        <param name="allowfullscreen" value="true" />
        <param name="flashvars" 
          value='config={"playlist":["http://www.centerforconfidence.com/addons/videos/webinar-invite-1/ImagePreview2.png", {"url": "http://www.centerforconfidence.com/addons/videos/webinar-invite-1/Webinar-Invite-1-Final-4.mp4","autoPlay":true,"autoBuffering":true}]}' />
        <!-- Image Fallback. Typically the same as the poster image. -->
        <img src="http://www.centerforconfidence.com/addons/videos/webinar-invite-1/ImagePreview2.png" width="560" height="340" alt="Poster Image" 
          title="No video playback capabilities." />
      </object>
    </video>
    <!-- Download links provided for devices that can't play video in the browser. -->
    <p class="vjs-no-video"><strong>Download Video:</strong>
      <a href="http://www.centerforconfidence.com/addons/videos/webinar-invite-1/Webinar-Invite-1-Final-4.mp4">MP4</a>,
      <a href="http://www.centerforconfidence.com/addons/videos/webinar-invite-1/Webinar-Invite-1-Final-4.webm">WebM</a>,
      <!-- Support VideoJS by keeping this link. -->
      <a href="http://videojs.com">HTML5 Video Player</a> by VideoJS
    </p>
  </div>
  <!-- End VideoJS -->

谢谢!

1 个答案:

答案 0 :(得分:0)

只需使用.ogv for firefox。然后您也将获得Internet Explorer支持。