Adding Videos to a Web Page
Today, someone asked me about how to add a video clip to a Web and show the controls.
This is relatively easy, so I thought I would share with all of you how to do
this. You can do this by using the Windows Media Player. To do this, switch to
Code (or HTML) view and paste the following HTML code:
<object id="WMPlayer1" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"
height="250" width="250"> <param name="uiMode"
value="full" /> <param name="autoStart" value="true"
/> <param name="URL" value="SampleVideo.WMV" />
Your browser does not support ActiveX controls or the Windows Media Player.
</object>To make this work for your video file, change the value of the
value attribute (see red text above) to the path and filename of your video
file. If you want to change the size of the view, change the value of the height
and width attributes (see blue text above) to the height and width that you
want.
Once you add the HTML, you can change the filename and size using the properties
dialog box also. Just switch back to Design view and double click on the control.
This code displays video files in Internet Explorer and Netscape Navigator.
I was unable to get this to display properly with Mozilla. (I’m not sure if
that means that Mozilla doesn’t support Windows Media Player or ActiveX controls,
or if there is a property that I need to set. Anyway, I wasn’t able to find
an ActiveX property in the Preferences dialog, so I’m assuming that Mozilla
doesn’t support any ActiveX controls. If anyone has any information about this,
please let me know.) I didn’t test it in Opera (which I don’t have installed
on my computer, but I am rectifying since so many have offered comments about
Opera), so I can’t tell you whether it works in Opera or not. In addition, the
visitor must have Active X controls enabled in their browser.
Note This code works well as long as the visitor has Windows Media Player installed
on their local computer. If they don’t, then they may be asked to install it.
ActiveX controls are installed locally on the visitors machine, so they can
have security risks associated with them. Most browsers allow users to turn
off installing, displaying, and running them, and Internet Explorer allows users
to run them if they are signed, to prompt before installing them, and to disable
unsigned ActiveX controls.
Published Thursday, September 30, 2004 1:44 PM by lisawoll
Filed Under: Tips and Tricks
Comment Notification
If you would like to receive an email when updates are made to this post, please
register here
You can also stay up to date using your favorite aggregator by subscribing
to the CommentRss Feed
http://blogs.msdn.com/lisawoll/archive/2004/09/30/236330.aspx
http://blogs.msdn.com/lisawoll/archive/2004/09/30/236330.aspx”>http://blogs.msdn.com/lisawoll/archive/2004/09/30/236330.aspx
>