Home >Web Front-end >HTML Tutorial >Why can't videos in mp4 format embedded in html be played_HTML/Xhtml_Webpage Production

Why can't videos in mp4 format embedded in html be played_HTML/Xhtml_Webpage Production

WBOY
WBOYOriginal
2016-05-16 16:40:493374browse

The following code is in my test.html. If you access it through an absolute path such as c:test.html, you can play the video, but if you access it through: http://localhost/test.html, you cannot play it. It is only on the page. It looks like a player is loaded in, but none of the buttons work. I don’t know where the problem is, but according to my estimation, it has nothing to do with the code. The code is as follows:

Copy code
The code is as follows:











After inspection I found that it really has nothing to do with the code. The specific reason is because there is no mapping of MP4 in IIS. The solution is as follows:

win7:
Control Panel – View Mode (upper right) corner) – small icon – management tools – Internet Information Services (IIS) Manager – click your website name on the left – double-click “MIME Type” on the right – click Add on the far right – fill in the file extension as .mp4, and the MIME type is Video /mp4 or application/octet-stream, this is fine, this will do the trick!
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn