Html 没有找到支持格式和 MIME 类型的视频。这是什么意思,我该如何改变它
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10424729/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
no video with supported format and MIME type found. What does this mean and how can I change this
提问by tdelaney18
no video with supported format and MIME type found
没有找到支持格式和 MIME 类型的视频
A huge screen for video is displayed and says the message above. How do I solve this? This happens to me only in Mozilla Fire fox and not on Google Chrome. I am using webm videos and mp4 videos.
显示一个巨大的视频屏幕并显示上面的消息。我该如何解决这个问题?这仅发生在 Mozilla Fire fox 中,而不发生在 Google Chrome 中。我正在使用 webm 视频和 mp4 视频。
This is for html5 video.
这是针对 html5 视频的。
采纳答案by Martin Fido
The webserver might not be sending the correct MIME types. Depending on the server you may be able to add a .htaccess file with the following:
网络服务器可能没有发送正确的 MIME 类型。根据服务器的不同,您可以添加具有以下内容的 .htaccess 文件:
AddType video/webm .webm
AddType video/mp4 .mp4
If that doesn't work try searching for "server mime types".
如果这不起作用,请尝试搜索“服务器 MIME 类型”。
回答by Alok Raj
Go to IIS Manager. Click MIME Types Under IIS. Click Add Button. Enter the following Details.
转到 IIS 管理器。单击 IIS 下的 MIME 类型。单击添加按钮。输入以下详细信息。
File Name Extension: .webm MIME Type: video/webm
文件扩展名:.webm MIME 类型:video/webm
Again Add, File Name Extension: .ogv MIME Type: video/ogg
再次添加,文件扩展名:.ogv MIME 类型:video/ogg
And File Name Extension: .mp4 MIME Type: video/mp4
和文件扩展名:.mp4 MIME 类型:video/mp4
回答by Vishali Mp
<html>
<head></head>
<body>
<video width="320" height="240" controls>
<source src="ho.mp4" type="video/mp4">
<source src="ho.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</body>
</html>
this code worked fine for me...Found it from w3schools.com...Incase you still have issues try to add the mime types in the iis manager
这段代码对我来说很好用...从 w3schools.com 找到它...如果您仍有问题,请尝试在 iis 管理器中添加 mime 类型
回答by Duong Kiet
I have the same problem and this is how I fix it: Open: "C:\Users\DuongKiet\Documents\IISExpress\config\applicationhost.config" --> where "C:\Users\DuongKiet\" depends on your folder name.
我有同样的问题,这就是我的解决方法:打开:“C:\Users\DuongKiet\Documents\IISExpress\config\applicationhost.config”--> 其中“C:\Users\DuongKiet\”取决于您的文件夹姓名。
Edit applicationhost.config, go to this line:
编辑 applicationhost.config,转到这一行:
<mimeMap fileExtension=".mp3" mimeType="audio/mpeg" />
then insert this line below:
然后在下面插入这一行:
<mimeMap fileExtension=".webm" mimeType="video/webm" /> --> problemo solved
In case you cannot locate the folder, just follow this link for instruction how to add a new mime type: http://www.misfitgeek.com/use-html5-video-tags-in-your-asp-net-applications/
如果您找不到该文件夹,只需按照此链接的说明添加新的 MIME 类型:http: //www.misfitgeek.com/use-html5-video-tags-in-your-asp-net-applications/