How do I show a local video file with object and embed tags?

dotnetN00b picture dotnetN00b · Apr 18, 2012 · Viewed 25k times · Source

So my video file is in C:\inetpub\wwwroot\Videos\Test\intro.wmv. I just want to run the video locally on my web page.

It has to run on IE8/WinXP. So no HTML5.

This is what I have so far:

<object width="100%" height="100%"
type="video/x-ms-asf" url="http://localhost/Videos/Test/intro.wmv" data="intro.wmv"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="url" value="http://localhost/Videos/Test/intro.wmv">
<param name="filename" value="intro.wmv">
<param name="autostart" value="1">
<param name="uiMode" value="full" />
<param name="autosize" value="1">
<param name="playcount" value="1">
<embed type="application/x-mplayer2" src="http://localhost/Videos/Test/intro.wmv" width="100%" height="100%" autostart="true" showcontrols="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
</object>

Answer

Day picture Day · Apr 18, 2012

Try something more simple to begin like :

<object data="./Videos/Test/intro.wmv" type="video/x-ms-wmv"  width="100%" height="100%">
  <param name="src" value="./Videos/Test/intro.wmv">
  <param name="autoStart" value="1">
  alt : <a href="./Videos/Test/intro.wmv">My video name</a>
</object>

OR HTML5

<video width="320" height="240" controls="controls">  
    <source src="./Videos/Test/intro.wmv" type="video//x-ms-wmv" />   
    <!-- <track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="English"> -->     
    Nav doesn't support html5 video
</video>