Flash 带有视频后备和有效的 html5?
我正在尝试制作一个 Flash 视频,对于那些不支持 Flash 的浏览器(例如 iPhone),可以回退到 html5 视频元素。我也想要有效的 html5。
我看到的问题是,在 html5 中,对象不再支持 classid 属性,但如果用户没有 Flash 但想要它,则需要这样做。
看来我的选择是接受无效的 html5 但 Flash 不能正常工作,或者有 classid 但没有有效的 html5。
无论如何都要拥有这一切吗?我一定是错过了什么!
I'm trying to have a flash video, with fallback to the html5 video element for those browsers which don't support flash, such as iPhone. I'd also like to have valid html5.
The issue I see is that in html5, object doesn't support the classid attribute anymore, but this would be required for a user to get flash if they don't have it but want it.
It seems my options are to accept invalid html5 but not have the flash work properly, or have the classid and not have valid html5.
Anyway to have it all? I must be missing something!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用条件排除除 IE 之外的每个浏览器的 classid,因为其他浏览器在没有它的情况下也可以正常工作。验证器将忽略包含 classid 的版本,只读取 HTML 5 有效版本。
它并不漂亮,但如果验证是必要的,它就会起作用。
You could exclude the classid for every browser except IE using conditionals as other browsers work fine without it. The validator would ignore the version with the classid included and just read the HTML 5 valid version.
It's not pretty but if validation is essential it would work.