html
  • html5
  • video
  • browser
  • 2013-04-23 115 views 1 likes 
    1

    我想要在所有浏览器中播放视频,但是它在Chrome中运行得非常好,在Firefox中出现错误,并在I.E. 10视频盒负载可达但不运行某些浏览器中没有播放的视频(I.E.10)

    这里是代码:

    <video id="myVideo" width="100%" controls="controls"> 
             <source src="..\resources\Tutorial\video.ogg" type='video/ogg; codecs=&quot;theora, vorbis&quot;' /> 
             <source src="..\resources\Tutorial\video.mp4" type='video/mp4;'/> 
            </video> 
    

    我怎样才能让我的视频在所有浏览器玩?

    谢谢你们:)

    尝试:

    <video id="myVideo" width="100%" controls="controls"> 
             <source src="..\resources\Tutorial\video.webm" type='video/webm; codecs="vp8, vorbis"' /> 
             <source src="..\resources\Tutorial\video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> 
             <source src="..\resources\Tutorial\video.ogv" type='video/ogg; codecs="theora, vorbis"' /> 
             Video tag not supported. Download the video <a href="..\resources\Tutorial\video.webm">here</a>. 
            </video> 
    

    ,但没有运气或者,同上

    +0

    试试rem来自ogg视频的'编解码器'。额外的'"'可能会让你烦恼。 – 2013-04-23 10:02:36

    +0

    谢谢,我已经尝试过。相同的问题 – user2292674 2013-04-23 10:08:49

    +0

    也许你的ogg视频格式不正确?我经常使用以下格式,它总是适用于我https://gist.github.com/dyladan/5442401 – 2013-04-23 10:14:02

    回答

    1

    简单的解决方案上面

    斜线是错误的,它应该是/现在在除IE 10之外的所有浏览器中都很好,没有错误只是不运行

    相关问题