linking a video file

T

thedarkman

I may have asked this before but if I have a directory on my disk
called say:

c:\video

and I have a file in this called

c:\video\tv.wmv

how can I play it using a file called c:\video\play.html

what code do I put in the file?

Thanks
 
C

cwdjrxyz

thedarkman said:
I may have asked this before but if I have a directory on my disk
called say:

c:\video

and I have a file in this called

c:\video\tv.wmv

how can I play it using a file called c:\video\play.html

what code do I put in the file?


I have a wmv file called DraculaDSL.wmv stored on my F drive at
F:\video_assorted\DraculaDSL.wmv. I wrote an html page called
badboy.html on the notepad and saved it to F:\video_assorted so it
would be in the same directory as the video and you can use relative
addresses. The html file I wrote is below.

_________________________________________________________________________

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">

<html>

<head>

<title>badboy.html</title>

<meta http-equiv="Content-Type" content="charset=iso-8859-1">

<style type="text/css">
body {background-color: #000044;color: #eeeeee}
a:active {color: #eeee00; background-color: #000043}
a:visited {color: #00ee00;background-color: #000043}
a:link {color: #ee0000;background-color: #000043}
p {font-size:125%;color:#eeeeee;font-weight:bold;background-color:
#000043}
p.two {text-align:center;font-size:125%;color:
#ff0000;background-color: #000043}
h3{text-align:center;font-size: 100%;color: #ee0000;background-color:
#000043}
</style>

</head>

<body>


<div style="text-align:center">
<object data="DraculaDSL.wmv" type="video/x-ms-wmv" style="width:320px;
height:315px">
<param name="src" value="DraculaDSL.wmv" valuetype="ref">
<param name="showcontrols" value="1" valuetype="data">
<param name="showstatusbar" value="1" valuetype="data">
<param name="autostart" value="0" valuetype="data">
<param name="volume" value="0" valuetype="data">
<param name="PlayCount" value="1" valuetype="data">
</object>
</div>

</body>

</html>

_________________________________________________________________________

Because of a bug in the new WMP11, you need to use the same width in
the object code above as for the actual wmv. If you hover the cursor
over the icon for the wmv, you get the width and height, with the width
being the first number. The height you use in the code has to be
increased enough to hold the player controls. The WMP11 bug seems to
distort videos by stretching or compressing them in the width direction
without adjusting the height in proportion. This is not a problem on IE
browsers, but is a problem for all non-IE browsers I have tested. I
don't know when and if Microsoft will correct this bug, but quite a few
Mozilla family and Opera browser users are quite angry about it,
judging from some posts in their NGs.

You could put this on the web by just uploading the html file and the
wmv image file to the same directory on the server of your site host.

The above code works on IE6, and the most recent versions of Opera,
Firefox, Mozilla, Netscape, and SeaMonkey.

To play your video on your computer, you just navigate to the icon for
the html file and double click it. If you need to change the html file,
just right click the file for it, choose to open with notepad, make
your changes, and select save.

I am using a Microsoft XP OS with 8 browsers. Procedures may be just a
bit different on other types of computers.

If you want to autostart change the number 0 to 1. If you do not want
to show the status bar or controls, change the numbers 1 for them to 0.
If you want to play more than once, increase the number 1 used for play
count.
 
C

cwdjrxyz

PH said:
<EMBED pluginspage=http://www.microsoft.com/Windows/MediaPlayer/ src=tv.wmv
width=300 height=200 type=application/x-mplayer2 autoplay="1" showstatusbar="1"></EMBED>


Embed is not an official W3C tag and never has been. It is a relic from
the browser war era. Use of it produces several validation errors, as
you can soon find by validating a page using embed at the W3C
validator. The object code is used rather than embed these days and has
been around many years now. I know many still use embed for media for
non-IE browsers. However I think it is very bad to suggest that someone
use it at this late date. So far, I have not found a situation where it
is necessary to use embed. Of course in the near anarchy of the web,
just about anything seems to go.
 
E

Ed Mullen

thedarkman said:
I may have asked this before but if I have a directory on my disk
called say:

c:\video

and I have a file in this called

c:\video\tv.wmv

how can I play it using a file called c:\video\play.html

what code do I put in the file?

Thanks

The other replies notwithstanding, and since you didn't ask about /how/
the file should be played, the simplest thing is to create an html file
with a simple href to the file. Assuming the html file and the video
file are in the same folder ...

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>title</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>
Click <a href="tv.wmvclick"> this link</a> to play the video
</body>
</html>

If your system and browser are configured properly that will launch a
media player program to play the file.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net
Harmony of aim, not identity of conclusion, is the secret of sympathetic
life. - Ralph Waldo Emerson
 
J

joecool2000

thedarkman said:
I may have asked this before but if I have a directory on my disk
called say:

c:\video

and I have a file in this called

c:\video\tv.wmv

how can I play it using a file called c:\video\play.html

what code do I put in the file?

Thanks
Why not just setup IIS, plonk the wmv file in c:\inetpub\wwwroot, and
browse to http://localhost/tv.wmv ??

joecool2000
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top