Internet Explorer 3秒后视频文件停止播放

时间:2018-08-30 14:19:00

标签: html jsp video internet-explorer-11 mp4

IE版本11.1206.15063.0CO中,嵌入的视频文件会在大约3秒钟后停止播放。它们在IE11.0.10240.17443CO的早期版本以及Google ChromeMozilla FireFox中工作。 MP4文件也可在所有媒体播放器中使用。该代码在调用时在iframe中打开。这是被调用的代码。

<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版本,以及从视频标签内部删除embed标签和webm文件。我尝试更改视频文件的编码以及对html文件的其他修改。我目前正在检查.jsp文件,该文件也会调用该代码。我尝试的所有内容仍然可以在Chrome和Firefox中运行,而不仅限于此版本的IE 11。

偶尔还会弹出一个错误消息,提示错误:不支持的视频类型或无效的路径,错误:无法解码视频。

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

谢谢。

2 个答案:

答案 0 :(得分:0)

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

尝试以下代码

<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上的最新信息,支持等

答案 1 :(得分:0)

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

<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允许的情况下才可以添加此属性,而其余部分则可以保留。