IE9 HTML5视频支持 [英] IE9 HTML5 video support

查看:220
本文介绍了IE9 HTML5视频支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IE9中显示HTML5视频时出现问题,我在htaccess中添加了不同的类型

I'm having some trouble displaying HTML5 video in IE9, I added the different types to my htaccess

AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm

这就是我的html

<video id="video" autoplay loop preload>
            <source src="video/final_loop.mp4" type="video/mp4" />
            <source src="video/final_loop.webm" type="video/webm" />
            <source src="video/final_loop.ogg" type="video/ogg" />

            Your browser does not support the <code>video</code> element. 
        </video>

我也尝试将视频转换为Theora ogv格式并使用

I also tried converting the video to Theora ogv format and use

<source src="video/final_loop.theora.ogv" type="video/ogv" />

但是这也行不通,我想在IE9中支持.ogg?

But this doesn't work either, I thought .ogg was supported in IE9?

推荐答案

在官方微软网站上有IE9上的视频代码片段

On the official Microsoft website there is this code snippets for video on IE9

<video width="400"
    height="300"
    src="video.mp4"
    poster="frame.png"
    autoplay
    controls
    loop>
    This content appears if the video tag or the codec is not supported.
 </video>

尝试使用此代码。

这篇关于IE9 HTML5视频支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆