开发者

HTML5 Player works on local system but not on server

开发者 https://www.devze.com 2023-03-04 20:36 出处:网络
I am using an HTML5 player and the videos work perfectly on my local machine but once I upload everything to the webserver the video will not load. No error message. Just an X

I am using an HTML5 player and the videos work perfectly on my local machine but once I upload everything to the webserver the video will not load. No error message. Just an X

All the paths are perfect (I triple checked)

It works in Chrome and Opera but not firefox or IE :(

  <source src="http://mywebsite.com/english_short.webmvp8.webm" type='video/webm; codecs="vp8, vorbis"' />
  <source src="http://mywebsite.com/english_short.theora.ogv" type='video/ogg; codecs="theora, 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="150" height="130" 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='con开发者_如何学Pythonfig={"playlist":["http://mywebsite.com/screen.png", {"url": "http://mywebsite.com/english_short.mp4","autoPlay":false,"autoBuffering":true}]}' />
    <!-- Image Fallback. Typically the same as the poster image. -->
    <img src="oceans-clip.png" width="150" height="130" alt="Poster Image"
      title="No video playback capabilities." />

  </object>
</video>


It's your video types. WebM and Ogv aren't supported by IE. Firefox is supposed to support WebM; but only in version 4. to target IE, you'll need to use MPEG or AVI.


I've had issues before with versions of Firefox before 4.0 where the OGG source had to be the first one otherwise it fails. As mentioned by Thomas, FF 4 should support WEBM, but I'd suggest putting the OGG source first, followed by the WEBM.

As for IE, again as Thomas says, it supports playing MP4 through a Flash player as you have done so.

Can you link us to a test page?

0

精彩评论

暂无评论...
验证码 换一张
取 消