Fix: HTML5 Video not playing when deployed to azure

Story by Abhilash on Azure


The HTML5 video added in the webpage was playbacking successfully in my developer environment. But, why deployed to client's Azure web app it was not playing at all. I suspected for any script errors but browser's console window was empty. Later I figured out that we need to specify mime type in web.config of the website for this to work.

Below is a quick peek of web.config file.

			<remove fileExtension=".mp4" />
			<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
			<remove fileExtension=".webm" />
			<mimeMap fileExtension=".webm" mimeType="video/webm" />
			<!-- Add your mime type here -->


Hope this helps.

comments powered by Disqus

Related Story   →

Fix: Request blocked while sending JsonResult from MVC Action method

This request has been blocked because sensitive information could be disclosed to third party web si