开发者

html5 mp4 video player

开发者 https://www.devze.com 2023-01-28 02:59 出处:网络
I am trying to play mp4 video using html5 video tag. But in 开发者_开发技巧FF 3.6 its just showing a black window with cross sign. Its playing in Chrome.

I am trying to play mp4 video using html5 video tag. But in 开发者_开发技巧FF 3.6 its just showing a black window with cross sign. Its playing in Chrome.

I can play that video in windows media player (i.e. the required codec are installed)

How can i play that video in FF too?

<video id="video1" width="200" height="200" controls="true">
        <source src="video1.mp4" type='video/mp4; codecs="avc1.64001E, mp4a.40.2"' />
        Your browser does not support mp4 videos
    </video>


firefox does not support most MPEG4 natively due to licencing. you can save your video in a few different types and use canPlayType(type) method.

more here: http://wiki.whatwg.org/wiki/Video_type_parameters http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-navigator-canplaytype


For Firefox, you'll have to encode the video as Theora and save as an .ogv file.

http://diveintohtml5.info/video.html#what-works

0

精彩评论

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