As of August 1st, 2008, the Edutech web site will no longer be updated. Edutech was funded by the Swiss Virtual Campus programme, which ended on July 31st, 2008. Some activities will be taken over by the e-Learning Services group at the SWITCH foundation.
Code for Movies in 6 Formats
Introduction
Keywords: Vista, movie, HTML Code
These code examples have been provided curtsy to Goran Josic from the eLab of the University of Lugano.
Table of contents
- HTML Code for local AVI file
- HTML Code for local RM file
- HTML Code for local MOV file
- HTML Code for local MPEG file
- HTML Code for local WMV file
- HTML Code for WMV file on external server
- HTML Code for Flash File
- Commenting the Code
HTML Code for local AVI file
<OBJECT
ID='MediaPlayer' standby='Loading Microsoft Windows Media
Player components...' TYPE='application/avi' width='320'
height='290'><br>
<param name='url' value='videos/video.avi'>
<param name='AutoStart' value='true'>
<param name='ShowControls' value='0'>
<param name='uiMode' value='mini'>
<embed type='video/quicktime' name='pippo' width='320' height='290' src='videos/video.avi' filename='videos/video.avi' autostart='true' showcontrols='true'showstatusbar='true' showdisplay='false' autorewind='true'></embed>
</OBJECT>
<param name='url' value='videos/video.avi'>
<param name='AutoStart' value='true'>
<param name='ShowControls' value='0'>
<param name='uiMode' value='mini'>
<embed type='video/quicktime' name='pippo' width='320' height='290' src='videos/video.avi' filename='videos/video.avi' autostart='true' showcontrols='true'showstatusbar='true' showdisplay='false' autorewind='true'></embed>
</OBJECT>
HTML Code for local RM file
<OBJECT ID='MediaPlayer' standby='Loading Microsoft
Windows Media Player components...' TYPE='application/rm' width='320'
height='290'><br>
<param name='url' value='videos/RmTest.rm'>
<param name='AutoStart' value='true'>
<param name='ShowControls' value='0'>
<param name='uiMode' value='mini'>
<embed type='audio/x-pn-realaudio-plugin' name='pippo' width='320' height='290' src='videos/RmTest.rm' filename='videos/RmTest.rm' autostart='true' showcontrols='true'showstatusbar='true' showdisplay='false' autorewind='true'></embed>
</OBJECT>
<param name='url' value='videos/RmTest.rm'>
<param name='AutoStart' value='true'>
<param name='ShowControls' value='0'>
<param name='uiMode' value='mini'>
<embed type='audio/x-pn-realaudio-plugin' name='pippo' width='320' height='290' src='videos/RmTest.rm' filename='videos/RmTest.rm' autostart='true' showcontrols='true'showstatusbar='true' showdisplay='false' autorewind='true'></embed>
</OBJECT>
HTML Code for local MOV file
<OBJECT ID='MediaPlayer' standby='Loading Microsoft
Windows Media Player components...' TYPE='application/mov' width='320'
height='290'><br>
<param name='url' value='videos/MovTest.mov'>
<param name='AutoStart' value='true'>
<param name='ShowControls' value='0'>
<param name='uiMode' value='mini'>
<embed type='video/quicktime' name='pippo' width='320' height='290' src='videos/MovTest.mov' filename='videos/MovTest.mov' autostart='true' showcontrols='true'showstatusbar='true' showdisplay='false' autorewind='true'></embed>
</OBJECT>
<param name='url' value='videos/MovTest.mov'>
<param name='AutoStart' value='true'>
<param name='ShowControls' value='0'>
<param name='uiMode' value='mini'>
<embed type='video/quicktime' name='pippo' width='320' height='290' src='videos/MovTest.mov' filename='videos/MovTest.mov' autostart='true' showcontrols='true'showstatusbar='true' showdisplay='false' autorewind='true'></embed>
</OBJECT>
HTML Code for local MPEG file
<OBJECT ID='MediaPlayer' standby='Loading Microsoft
Windows Media Player components...' TYPE='application/mpeg' width='250'
height='200'><br>
<param name='url' value='videos/MpegTest.mpeg'>
<param name='AutoStart' value='true'>
<param name='ShowControls' value='0'>
<param name='uiMode' value='mini'>
<embed type='video/quicktime' name='pippo' width='320' height='290' src='videos/MpegTest.mpeg' filename='videos/MepegTest.mpeg' autostart='true' showcontrols='true'showstatusbar='true' showdisplay='false' autorewind='true'></embed>
</OBJECT>
<param name='url' value='videos/MpegTest.mpeg'>
<param name='AutoStart' value='true'>
<param name='ShowControls' value='0'>
<param name='uiMode' value='mini'>
<embed type='video/quicktime' name='pippo' width='320' height='290' src='videos/MpegTest.mpeg' filename='videos/MepegTest.mpeg' autostart='true' showcontrols='true'showstatusbar='true' showdisplay='false' autorewind='true'></embed>
</OBJECT>
HTML Code for local WMV file
<OBJECT ID='MediaPlayer' standby='Loading Microsoft
Windows Media Player components...' TYPE='application/wmv' width='320'
height='290'><br>
<param name='url' value='videos/WmvTest.wmv'>
<param name='AutoStart' value='true'>
<param name='ShowControls' value='0'>
<param name='uiMode' value='mini'>
<embed type='video/x-ms-wmv' name='pippo' width='320' height='290' src='videos/WmvTest.wmv' filename='videos/WmvTest.wmv' autostart='true' showcontrols='true'showstatusbar='true' showdisplay='false' autorewind='true'></embed>
</OBJECT>
<param name='url' value='videos/WmvTest.wmv'>
<param name='AutoStart' value='true'>
<param name='ShowControls' value='0'>
<param name='uiMode' value='mini'>
<embed type='video/x-ms-wmv' name='pippo' width='320' height='290' src='videos/WmvTest.wmv' filename='videos/WmvTest.wmv' autostart='true' showcontrols='true'showstatusbar='true' showdisplay='false' autorewind='true'></embed>
</OBJECT>
HTML Code for WMV file on external server
<OBJECT
ID='MediaPlayer' standby='Loading Microsoft Windows Media
Player components...' TYPE='application/wmv' width='250'
height='200'><br>
<param name='url' value='videos/WmvTest.wmv'>
<param name='AutoStart' value='true'>
<param name='ShowControls' value='0'>
<param name='uiMode' value='mini'>
<embed type='video/x-ms-wmv' name='pippo' width='320' height='290' src='http://www.elab.usilu.net/utility/videos/videos/video.wmv' filename='http://www.elab.usilu.net/utility/videos/videos/video.wmv' autostart='true' showcontrols='true'showstatusbar='true' showdisplay='false' autorewind='true'></embed>
</OBJECT>
<param name='url' value='videos/WmvTest.wmv'>
<param name='AutoStart' value='true'>
<param name='ShowControls' value='0'>
<param name='uiMode' value='mini'>
<embed type='video/x-ms-wmv' name='pippo' width='320' height='290' src='http://www.elab.usilu.net/utility/videos/videos/video.wmv' filename='http://www.elab.usilu.net/utility/videos/videos/video.wmv' autostart='true' showcontrols='true'showstatusbar='true' showdisplay='false' autorewind='true'></embed>
</OBJECT>
HTML Code for Flash File
<OBJECT
classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width="400" height="266">
<param name='movie' value='videos/Demo.swf'>
<param name='quality' value="high">
<param name='bgcolor' value='#FFFFFF'>
<param name='loop' value="false">
<param value="true" name="Play" />
<EMBED src='videos/Demo.swf' quality='high' bgcolor='#FFFFFF' width="320" height="180" loop="true" play="true" type='application/x-shockwave-flash'
pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>
</EMBED>
</OBJECT>
codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width="400" height="266">
<param name='movie' value='videos/Demo.swf'>
<param name='quality' value="high">
<param name='bgcolor' value='#FFFFFF'>
<param name='loop' value="false">
<param value="true" name="Play" />
<EMBED src='videos/Demo.swf' quality='high' bgcolor='#FFFFFF' width="320" height="180" loop="true" play="true" type='application/x-shockwave-flash'
pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>
</EMBED>
</OBJECT>
Commenting the Code
| Tag name | Explanation |
| Object ID | For Windows Explorer |
| Param Name | For Windows Explorer |
| Embed | For Netscape and FireFox |
| Type | Concerns Mime Type |
See a comprehensive description of all parameters
Where possible open movies in Netscape and Mozilla/FireFox with Quicktime:
- embed type='video/quicktime'
Exception for
- Real Media: embed type='audio/x-pn-realaudio-plugin'
- Winows WMV: embed type='video/x-ms-wmv'
If you call different types of movies in one HTML page, change the name (here 'pippo') each time.
Useful Links
- Media HTML Generator This generator helps you to produce the code that you can past into your HTML-pages without having to learn how to produce such code.
