0
votes

I have added the html 5 video tag in my web page. The video is running (locally) on an IIS server which is the hosting machine. But when I run through the domain name it's not running (outside of IIS).

Folder permission is also given, but it runs from IIS Local.

I added the mime type on the IIS server.

var video = document.getElementById('videotag'); 
video.src =   '../Images/Videos/example.webm';
video.play(); 
1
The title and body of your question seem to contradict: "is not playing through IIS" versus "it's not running outside of IIS". Could you improve the question? - trincot
If your type is MP4 on IIS with .NET add a mime type. - A. Wentzel

1 Answers

0
votes

There is only a single way to do this currently. If your type of video is MP4 running on IIS/.NET

Add a web.config file to the root of the application wwwroot\web.config with the following contents

  <?xml version="1.0" encoding="UTF-8"?>
  <configuration>
    <system.webServer>
      <staticContent>
        <mimeMap fileExtension=".mp4" mimeType="application/mp4" />
        <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
        <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
      </staticContent>
    </system.webServer>
  </configuration>