You are here: Re: linking a video file « HTML « IT news, forums, messages
Re: linking a video file

Posted by cwdjrxyz on 01/03/07 22:33

thedarkman wrote:
> 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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация