首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >视频文件在互联网explorer11中播放3秒后停止播放

视频文件在互联网explorer11中播放3秒后停止播放
EN

Stack Overflow用户
提问于 2018-08-30 22:19:00
回答 2查看 480关注 0票数 0

IE版本的11.1206.15063.0CO中,嵌入的视频文件在大约3秒后停止播放。它们可以在早期版本的IE版本11.0.10240.17443CO以及Google ChromeMozilla FireFox中使用。MP4文件也适用于所有媒体播放器。代码在调用时在iframe中打开。下面是被调用的代码。

代码语言:javascript
复制
<html>
<head>

<meta name="google" value="notranslate" /> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>VA Getting to the POINT Aug 18</title>

<style>
html, body {
    margin: 0px;
    padding: 0px;
    font-family:Verdana, Geneva, sans-serif;
    background-color: #1a1a1a;
    text-align: center;
    width: 100%;
    height: 100%; 
}

</style>

<link href="" rel="stylesheet" type="text/css">
</head>
<body>

<video width="980" height="540" controls>
    <source src="VA_Getting_to_the_POINT_Aug_2018.mp4" type="video/mp4" />
    <source src="VA_Getting_to_the_POINT_Aug_2018.webm" type="video/webm" />
    <embed src="VA_Getting_to_the_POINT_Aug_2018.mp4" type="application/x-shockwave-flash" width="980" height="570" allowscriptaccess="always" allowfullscreen="true" autoplay="false"></embed>  <!--IE 8 - add 25-30 pixels to vid height to allow QT player controls-->
</video>
</body>
</html>

我已经尝试将元内容更改为不同的视频版本,并从视频标记中删除IE标记和webm文件。我已经尝试更改视频文件的编码和对html文件的其他修改。我目前也在检查调用代码的.jsp文件。我尝试的所有东西都能在Chrome和火狐上运行,但这个版本的IE11就不行了。

偶尔也会弹出一个错误:错误:不支持的视频类型或无效的路径和错误:视频无法解码。

如有任何帮助或建议,将不胜感激。

谢谢。

EN

回答 2

Stack Overflow用户

发布于 2018-08-30 22:30:41

IE需要H.264或MPEG-4编解码器,而您没有指定它们。

尝试下面的代码

代码语言:javascript
复制
<video width="980" height="540" controls>
    <source src="VA_Getting_to_the_POINT_Aug_2018.mp4" type="video/mp4" codecs="H.264/MPEG-4"/>
    <source src="VA_Getting_to_the_POINT_Aug_2018.webm" type="video/webm" />
    <embed src="VA_Getting_to_the_POINT_Aug_2018.mp4" type="application/x-shockwave-flash" codecs="H.264/MPEG-4" width="980" height="570" allowscriptaccess="always" allowfullscreen="true" autoplay="false"></embed>  <!--IE 8 - add 25-30 pixels to vid height to allow QT player controls-->
</video>

this link上提供的最新信息、支持等

票数 0
EN

Stack Overflow用户

发布于 2019-04-24 23:12:18

正如我所说的,我在IE中也有同样的问题,添加preload="auto“解决了我的问题。你可以尝试下面这样的方法。

代码语言:javascript
复制
<video width="980" height="540" controls preload="auto">
    <source src="VA_Getting_to_the_POINT_Aug_2018.mp4" type="video/mp4" />
    <source src="VA_Getting_to_the_POINT_Aug_2018.webm" type="video/webm" />
    <embed src="VA_Getting_to_the_POINT_Aug_2018.mp4" type="application/x-shockwave-flash" width="980" height="570" allowscriptaccess="always" allowfullscreen="true" autoplay="false"></embed>  <!--IE 8 - add 25-30 pixels to vid height to allow QT player controls-->
</video>

但是由于添加预加载可能并不总是好的事情,你可以只在internet explorer的情况下添加这个属性,其余的你可以保持原样。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52099300

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档