Azure 静态 Web 应用程序 - staticwebapp.config.json 文件 MimeTypes
我有一个非常基本的 Azure 静态 Web 应用程序,带有全屏视频背景
页面在我的计算机上加载良好并且视频可以播放,但不会通过 Azure 网页显示视频 - 海报图像显示正常,但
我相信这与设置有关Mime 类型
该网站没有 web.config
我读到它需要 staticwebapp.config.json 文件 (配置 Azure 静态 Web 应用)
我已将其包含在网站的根目录中,但仍然没有视频?
这是 .json 文件的内容
{
"mimeTypes": {
".mp4": "video/mp4",
".webm": "video/webm"
}
}
这是包含视频的 html 文件中的代码部分
<video autoplay poster="images/poster.png" id="videobg" loop>
<source src="images/video.webm" Type="video/webm">
<source src="images/video.mp4" Type="video/mp4">
</video>
我确信这很简单,但找不到任何东西 谷歌搜索
感谢您的任何建议
I have a very basic Azure Static Web App with a full screen video background
Page loads fine on my computer and video plays but does not display the video via the Azure web page - poster image displays OK though
I believe this is to do with setting the Mime Type
The site does not have a web.config
I have read that it needs a staticwebapp.config.json file (Configure Azure Static Web Apps)
I have included this in the root of the site but still no video?
This is the content of the .json file
{
"mimeTypes": {
".mp4": "video/mp4",
".webm": "video/webm"
}
}
This is the section of code from the html file that has the video
<video autoplay poster="images/poster.png" id="videobg" loop>
<source src="images/video.webm" Type="video/webm">
<source src="images/video.mp4" Type="video/mp4">
</video>
I am sure this is something simple but could not find anything Googling
thanks for any advice
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所以这现在可以工作了,
我从不同的位置复制了一些代码,它正在工作,
不确定是什么修复了它,但谢谢
So this is working now
I copied some code from a different location and it is working
not sure what fixed it but thanks