Reputation: 21
New to the server side and stuck...
I have a short video clip on my website. Locally, it working in the browser. Then I deployed to Azure and the video didn't work. My HTML is:
<section class="promo static" id="home">
<video autoplay="" loop="" poster="assets/img/VideoPick.png" id="bgvid">
<source src="assets/img/ThisVideo.webm" type="video/webm">
<source src="assets/img/ThisVideo.mp4" type="video/mp4">
</video>
</section>
Note: My local is a Mac, and I am using sublime for the editor.
Is there something in the configurations I need to change, or a web.config file that I need to add and reference in the project?
Upvotes: 1
Views: 1789
Reputation: 18387
You need to allow mp4 on IIS. You can do this using a web.config file.
PS: you don't need to use .NET, just create a file called "web.config" with the following content:
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
<mimeMap fileExtension=".webm" mimeType="video/webm" />
</staticContent>
</system.webServer>
</configuration>
Upvotes: 10