dotnetN00b
dotnetN00b

Reputation: 5131

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

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>

Upvotes: 4

Views: 25352

Answers (3)

dotnetN00b
dotnetN00b

Reputation: 5131

This works at least.

<object width="100%" height="100%"
type="video/x-ms-asf" url="/wiki/Videos/Test/intro.wmv" data="/wiki/Videos/Test/intro.wmv"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="url" value="/wiki/Videos/Test/intro.wmv">
<param name="filename" value="/wiki/Videos/Test/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="/wiki/Videos/Test/intro.wmv" width="100%" height="100%" autostart="true" showcontrols="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
</object>

Upvotes: 0

Infinity
Infinity

Reputation: 683

<video width="320" height="240" controls="controls">
  <source src="movie.mp4" type="video/mp4" />
  <source src="movie.ogg" type="video/ogg" />
  <source src="movie.webm" type="video/webm" />
<object data="movie.mp4" width="320" height="240">
  <embed src="movie.swf" width="320" height="240" />
</object> 
</video>

Save this as html file in the same folder, where the video is, this is in html 5, its always good to give relative path then the absolute path.

Upvotes: 0

Day
Day

Reputation: 349

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> 

Upvotes: 4

Related Questions