html5-video – 找不到支持格式和MIME类型的视频

前端之家收集整理的这篇文章主要介绍了html5-video – 找不到支持格式和MIME类型的视频前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我的视频索引中有下一个代码
<video width="100%"  controls>
  <source src="video/v1.ogv" type="video/ogg">
  <source src="video/v1.webm" type="video/webm">
  <source src="video/v1.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

当我尝试在firefox中加载它时,它将返回“没有支持格式的视频和找到的MIME类型”.

Firebug将返回

"NetworkError: 500 Internal Server Error - https://root/folder/video/v1.ogv"

v1.ogv

HTTP load Failed with status 500. Load of media resource https://root/folder/video/v1.ogv Failed.


...,c=l.length;c--;)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f));if(i){if(o||e){if(o){for(l=[],...

jquery.min.js (line 2)

"NetworkError: 500 Internal Server Error - https://root/folder/video/v1.webm"

v1.webm

HTTP load Failed with status 500. Load of media resource https://root/folder/video/v1.webm Failed.

Specified "type" attribute of "video/mp4" is not supported. Load of media resource video/v1.mp4 Failed.

All candidate resources Failed to load. Media load paused.

任何线索?它既不适用于谷歌浏览器.

解决方法

路径有效吗?

> https://root/folder/video/v1.ogv
> https://root/folder/video/v1.webm

Firefox doesn’t support .mp4 files解释了“video / mp4”的指定“类型”属性不受支持.错误.

如果您使用的是Apache,则可以强制它使用正确的MIME类型.将以下内容添加到.htaccess文件中.

# MIME types for Video
AddType video/mp4 mp4 m4v f4v f4p
AddType video/ogg ogv
AddType video/webm webm
AddType video/x-flv flv
原文链接:https://www.f2er.com/html5/168822.html

猜你在找的HTML5相关文章