html5 video flash识破,Html5 Video and Flash Approach

问题

Looking into HTML5 video tag, and researching which browsers support which video file types, and my initial thought is things just got harder than just using flash.

I am wondering if there is some skeleton code (combined with development approach for videos) that someone has figured out to do the following:

If flash is available, use it

If not, try html5 video ogg format

If that doesn't work, try html5 video h.264 format

If that doesn't work, try html5 video webM format

Based on what I am seeing, am I correct in thinking that now, in order to accommodate all users on all browsers, a video needs to be published in 4 formats? If so, this HTML5 video thing is an epic fail!

Anyway, any ideas, processes, links to libraries, etc are appreciated.

Thanks -

回答1:

It's not that hard. You can give multiple sources (in multiple formats) for a single tag.

Also the better choice is to search for native html5 video first, then fallback to flash.

The two fromats you need are WebM (royaltiy free, supported by alternative briwsers Mozilla, Opera, Chrome and others) and H.264 for the big ones (IE and Safari). Your fallback option (flash) is also able to play H.264.

I suggest reading this guide if you haven't already.

Edit:

If you're looking for the lowest common demoninator then it's surely hinted H.264 over HTTP. Flash can play it without a media server and it's the only format iOS supports anyway, so you are OK for one single format for the time being.

But even with this single format you can support HTML5-bsed playback on the two factory teams (Safari and IE). I know the video tag is kinda new but they build on solid foundations in the OS's. Even at this state they are a better option than Flash.

So the real dilemma after all is ith the alternative browsers. You can use two formats instead of one (to throw in WebM) or you only stay with H.264 and use Flash on non-h264 browsers.

This is rather a question of personal preference (and the cost of double storage). But storage is generally free these days, bandwidth is the real cost factor anyway.

回答2:

Did you see the JWPlayer? It might save you some time.

来源:https://stackoverflow.com/questions/5833496/html5-video-and-flash-approach

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值