Ways to Display Video
There are three basic ways to display video on a Web form:
a. As an img HTML element using the dynsrc attribute
b. As an embedded video using the embed HTML element to insert the user' s default media player on the page
c. As an ActiveX object using the object HTML element to insert a specific media player on a page
As with audio, each of these approaches has advantages and
disadvantages. The following sections explore these techniques in more
detail.
1. Using the img Element
The easiest way to display a video on a Web form is to include the
video as an HTML img element. The dynsrc attribute of the img element
allows you to specify a video file to display in the element, as shown
here:
<img dynsrc="clock.avi">
The Image and ImageButton server controls and the Image and Image
Button HTML controls all support the dynsrc attribute. For example, the
following HTML displays a video in an ImageButton control:
<asp:ImageButton id="ImageButton1" dynsrc="clock.avi"
runat="server"></asp:ImageButton>
However, the dynsrc attribute has the following limitations:
It is not supported by Netscape Navigator.
It accepts only AVI (Audio Video Interleaved) format files.
It cannot be controlled from client-side scripts the way that videos included as ActiveX objects can.
2. Embedding Videos
Use the embed HTML element to display a video on a Web form with
the user' s default media player. For example, the following HTML
embeds a video on a page:
<embed src="clock.avi" id="aviTest" hidden="false" height="200" width="200"
autostart="false" type="video/avi" loop="true"></embed>
Embedded videos are displayed using the plug-in that is registered for the media type.
Using the embed HTML element to display video has the following advantages:
It is supported by most browsers, including Internet Explorer and Netscape Navigator.
The user can control the playback using the controls of the embedded media player.
Multiple video formats can be displayed.
The disadvantage of using the embed HTML element is that it doesn'
t provide the level of scripting support that you can get from an
ActiveX object.
3. Using ActiveX objects is more complicated and please let me know if you realy need this.