home  •    about us  •    courses  •    student work  •    alumni news  •    what's new
 

Embedding Video in HTML

Windows users who try to play a QuickTime movie in Internet Explorer version 5.5 SP2 or later will encounter the "broken plug-in icon" until they install the new QuickTime ActiveX control from Apple in addition to the QuickTime plug-in. Users of other browsers on either Windows or Mac OS are unaffected–they can continue to use the plug-in installed with QuickTime and do not need to get the new QuickTime ActiveX control. When authoring web pages, you can prevent this potential problem by authoring your HTML to check if the required ActiveX control is installed wherever you have QuickTime content embedded. This HTML change will result in web pages compatible with Netscape and Internet Explorer browsers on both Mac and Windows systems (see below for more information).

The required code consists of an HTML OBJECT element with an enclosed EMBED element as in the following example:

<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width ="160"height ="144"
CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
<PARAM name="SRC" VALUE="sample.mov">
<PARAM name="AUTOPLAY" VALUE="true">
<PARAM name="CONTROLLER" VALUE="false">
<EMBED SRC="sample.mov" width ="160" height ="144" AUTOPLAY="true" CONTROLLER="false" PLUGINSPAGE="http://www.apple.com/quicktime/download/">
</EMBED>
</OBJECT>

CLASSID must always equal: clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B
CODEBASE must always equal: http://www.apple.com/qtactivex/qtplugin.cab
PLUGINSPAGE must always equal: http://www.apple.com/quicktime/download/

The other attributes should be customized to your web page. You need to replace "sample.mov" (in both SRC attribute elements) with the URL of the actual movie to be played. You should also change the HEIGHT and WIDTH parameters to match the height and width of the movie (in pixels). Add 16 pixels to the height if you want to show the controller. The LOOPING attribute can be set to TRUE, FALSE or PALINDROME.

Because a browser will use either the OBJECT element or the EMBED element, but not both, most of the element attributes must be included in each. Note that in the example above the EMBED element has autoplay="true" and the OBJECT element has <param name="autoplay" value="true">, so the movie will begin to play automatically whether it is loaded with the QuickTime ActiveX control or the QuickTime plug-in. The only attributes that should not be duplicated are CLASSID, CODEBASE, and PLUGINSPAGE. CLASSID and CODEBASE are specific to the OBJECT element. PLUGINSPAGE is specific to the EMBED element.

Although Windows Internet Explorer 5.5 SP2 and 6.0 will no longer use the QuickTime plug-in, once the QuickTime ActiveX control has been installed on a user's system, these versions of Internet Explorer will use the installed ActiveX control to satisfy a properly coded EMBED element.


Return to FILM 410* Course Materials.

See also Apple QuickTime for more details.