IE10在使用< video>时不播放视频标记,但直接请求视频时播放它 [英] IE10 not playing a video when using the <video> tag, but plays it when requesting the video directly

查看:1273
本文介绍了IE10在使用< video>时不播放视频标记,但直接请求视频时播放它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有标记的网页,上面有以下标记:

I have a webpage with a tag on it with the following markup:

<video width="456" height="360" controls autoplay>
    <source src="Movies/Intro.mp4" type="video/mp4" />
    <source src="Movies/Intro_H264.webm" type='video/webm; codecs="vp8.0, vorbis"'/>
    <source src="Movies/Intro_H264.ogg" type='video/ogg; codecs="theora, vorbis"'/>
</video>

如果我在IE10中访问此页面,它会呈现视频播放器,但会显示错误消息:错误:不支持的视频类型无效的文件路径

If I visit this page in IE10 it renders the video player but with an error message that reads: "Error: unsupported video type of invalid file path"

但奇怪的是,如果我右键单击视频框并选择,复制视频URL,然后在IE中打开一个新标签,并粘贴到它在浏览器中播放的视频文件( Movies / Intro.mp4 )的直接URL,没有问题。

But what's odd is if I right-click on the video box and choose, Copy video URL, and then open a new tab in IE and paste in the direct URL to the video file (Movies/Intro.mp4) it plays in the browser without issue.

此外,我可以使用Chrome访问该页面,它可以毫无问题地从网页上播放MP4视频。所有这一切,我认为视频文件本身或编码没有任何问题,但为什么IE 10不在播放标签时播放视频,但它是在直接请求视频时播放的?

Also, I can visit the page using Chrome and it plays the MP4 video from the webpage without issue. All that to say, I don't think there's any issue with the video file itself or the encoding, but why is IE 10 not playing the video when it's in the tag, but it is playing it when requesting the video directly?

任何见解?

谢谢

推荐答案

我会检查是否为文件正确返回了mime-type。

I would check whether the mime-type is correctly being returned for the file.

无论返回的MIME类型如何,Chrome都能正常播放。

Chrome will play correctly regardless of the MIME Type returned.

要检查:


  1. 按F12显示IE工具窗口/窗格。

  2. 转到网络选项卡

  3. 点击开始捕获

  4. 浏览到相关页面

  5. 查找mp4专线

  6. 如果Type显示为application / octect-stream,那么这就是你的问题。

  1. Press F12 to display the IE Tools Window/Pane.
  2. Go to the Network Tab
  3. Click Start Capturing
  4. Browse to the page in question
  5. Find the mp4 line
  6. If the Type is displayed as application/octect-stream then this is your issue.

这篇关于IE10在使用&lt; video&gt;时不播放视频标记,但直接请求视频时播放它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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