I have started to try to use video in my MVC project for the first time, using the html video tag. I've used a sample local mp4 file to test things out.
<video controls="controls" width="500" id="video_contract">
<source src="~/videos/samplevideo.mp4" type="video/mp4" />
</video>
I couldn't get the mp4 to play and read that I had to use a mimeMap in the web.config file, as follows:
<staticContent>
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
</staticContent>
Once my project was published the video was fine in the test published project.
The problem is that my local development project stopped rendering images etc. I have researched the problem and found this MVC CSS not rendering in Visual Studio When debugging .
As per the instruction I removed the mimeMap command and all was good again. I still need to be able to show mp4 video, so how do I get around this problem?
Apologies if I have missed something obvious, but I am still new to ASP.net programming.
Thanks.