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

查看:23
本文介绍了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

This is what I have as 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" />

但这也不行,我以为 .ogg 在 IE9 中受支持?

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天全站免登陆