QuickTime is an example of media that is not directly handled by web browsers. When a browser encounters a reference to such media in an html document, it can either hand the media file off to an external application (i.e. QuickTime Player in the case of QT or QTVR) or use an extension to the core browser software, a plugin or ActiveX control. When the plugin handles the media file, it will play within the browser, either in line on the web page or in a separate window. In order to use the plugin or ActiveX, you must reference the media file with the correct html syntax.

Netscape on Windows and Macintosh, Internet Explorer for Macintosh, and older versions of Internet Explorer for Windows can use the EMBED tag to handle QTVR in web pages with a plugin. The newest versions of IE for Windows (5.5SP2and 6.0) do not support Netscape style plugins. QuickTime must be handled with an ActiveX control using the OBJECT tag. When authoring web pages, you can ensure that all users will be able to view your QTVR movues by using HTML compatible with both systems.

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 substitute "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)
.
If you already have EMBED elements for the QuickTime plug-in on the relevant pages, you need to enclose each of them in an OBJECT element with CLASSID and CODEBASE parameter values as shown above and with SRC and other parameter values to match those in your existing EMBED element. The OBJECT element can use any EMBED attributes QuickTime understands. Visit http://www.apple.com/quicktime/authoring/embed.html for more information
.
For existing web pages, it may be sufficient to add such an OBJECT element to the "front door" page of your site. Once the OBJECT element on the "front door" page has caused the user to install the ActiveX control, all subsequent pages with the original EMBED elements will work properly. In cases where you cannot be certain that the "front door" page is always visited, then all your pages should be revised to use these OBJECT elements.

For more information on embedding QuickTime go to Apple's web page.

 

There are many parameters that can be specified in the EMBED and OBJECT
tags that will affect how your movie will look and behave. These are described here...

Parameter Description Example
AUTOPLAY=value AUTOPLAY can either be set to TRUE or FALSE. The default behavior is set by the user in the 'QuickTime Plug-in Settings.' When set to TRUE, the AUTOPLAY attribute causes the movie to start playing as soon as the QuickTime Plug-In estimates that it will be able to play the entire movie without waiting for additional data. <embed src="sample.mov" width="200" height="240" autoplay="true">
BGCOLOR=hex value This attribute specifies the background color for any space that is not taken by the movie. For example, if a 160x120 movie was embedded in a space of 200x120, there would be 40 pixels of undefined color space in the width. Specifying the hex value of the background color will fill the undefined space with the value chosen. <embed src="sample.mov" width="200" height="240" bgcolor="000000">
BGCOLOR=name The QuickTime 4 Plug-in has additional support for the BGCOLOR attribute by recognizing color names. Acceptable values for this attribute are: "BLACK" (#000000), "GREEN" (#008000), "SILVER" (#C0C0C0), "LIME" (#00FF00), "GRAY" (#808080), "OLIVE" (#808000), "WHITE" (#FFFFFF), "YELLOW" (#FFFF00), "MAROON" (#800000), "NAVY" (#000080), "RED" (#FF0000), "BLUE" (#0000FF), "PURPLE" (#800080), "TEAL" (#008080), "FUCHSIA" (#FF00FF), "AQUA" (#00FFFF) <embed src="sample.mov" width="200" height="240" bgcolor="black">
CONTROLLER=value The CONTROLLER attribute sets the visibility of the movie controller. CONTROLLER can either be TRUE or FALSE. By default, CONTROLLER is TRUE. If CONTROLLER is set to FALSE, the movie controller will not display. Note: For compatibility with existing web pages, the default is FALSE for QuickTime VR movies, image files, and flash files. <embed src="sample.mov" width="200" height="240" controller="false">
CORRECTION=value CORRECTION can either be NONE or FULL. By default, CORRECTION equals FULL. This attribute is only appropriate for QuickTime VR panoramas. <Embed src="sample.mov" width="320" height="240" correction="full">
FOV=integer Only integer values between 8 and 64 degrees are supplied for this attribute. If no value is specified for FOV, the value stored in the movie is used. The FOV attribute allows you to specify the initial field of view angle for a QuickTime VR movie. <Embed src="sample.mov" width="320" height="240" fov="55">
HEIGHT=size in pixels (required) The HEIGHT attribute specifies the height of the embedded file in pixels. If the movie controller is visible, an additional 16 pixels will need to added. The HEIGHT attribute is required unless the HIDDEN attribute is specified. The HEIGHT of the movie can be found by choosing 'Get Info...' in the 'Movie' menu within QuickTime Player. If you do not use the SCALE attribute and you supply a height that is smaller than the actual height of the movie (plus 16 if you are showing the controller), the movie will be cropped to fit the height. If you supply a height that is greater than the height of the movie, the movie will be centered inside this height. Note:Never specify a height of less than 2 as this can cause problems with some browsers. <Embed src="sample.mov" width="200" height="240" controller="true">
HOTSPOTn="url" This attribute enables clicking on a hotspot with the specified ID in a VR panorama to take the user to the specified URL. n is the hotspot ID as defined when the hot spot is created in the QuickTime VR authoring tools. <Embed src="sample.mov" width="200" height="240" hotspot17="http://www.apple.com">
KIOSKMODE=value KIOSKMODE is either TRUE or FALSE. By default, KIOSKMODE is FALSE. When KIOSKMODE is set to TRUE, the plug-in does not include its pop-up menu in the movie controller and does not allow drag and drop to save the movie. <Embed src="sample.mov" width="200" height="240" kioskmode="true">
LOOP=value LOOP is either TRUE, FALSE or PALINDROME. By default, LOOP is set to FALSE. When set, the LOOP attribute makes the movie play continuously. Setting LOOP to PALINDROME causes the movie to play alternately forwards and backwards. This option is not appropriate for QuickTime VR Objects and Panoramas. <Embed src="sample.mov" width="200" height="240" loop="true">
MOVIENAME=name
With QuickTime 4.0 the targeting mechanism of wired actions has been extended to enable any action to target an element of another open movie. This means two or more movies within the same web page can communicate using the QuickTime 4.0 Plug-in. These same movies may communicate if they are opened in QuickTime Player if they are named using userdata atoms. For example, one movie can act as a controller for another movie setting things such as it's rate, volume, the pan angle of a QTVR track it contains, or the location of a sprite in a sprite track that it contains. In many cases things that required JavaScript can now be done using only the QuickTime Plug-in with Wired Movies. <Embed src="sample.mov" width="200" height="240" moviename="targetmov">
MOVIEID=integer Just like MovieName, but uses a numeric ID instead of a name string. MovieID may be computed in the Wired Sprite scripts and may be useful where the MovieName of the target movie is not known. <Embed src="sample.mov" width="200" height="240" movieid="5">
NODE=integer The NODE attribute allows you to specify the initial node for a multi-node QuickTime VR movie. Only integer values are supplied for this attribute. If no value is specified for this attribute, the default NODE and view (specified at creation time of the pano movie) is used. <Embed src="sample.mov" width="320" height="240" node="128">
PAN=integer The PAN attribute allows you to specify the initial pan angle for a QuickTime VR movie. Only integer values are supplied for this attribute. The range of values for a typical movie would be 0.0 to 360.0 degrees. If no value for PAN is specified, the value stored in the movie is used. This attribute has no meaning for a standard QuickTime movie. <Embed src="sample.mov" width="320" height="240" pan="180">
PLUGINSPAGE=url The PLUGINSPAGE attribute allows you to specify a URL from which the user can fetch the necessary plug-in if it is not installed. This attribute is handled by your browser. If your browser cannot find the plug-in when loading your page, it will warn the user and allow them to bring up the specified URL, from which one could download QuickTime which includes the QuickTime Plug-In. IMPORTANT: Please set this attribute to: http://www.apple.com/quicktime/download/" which will point to the latest version of the plug-in. This option is appropriate for QuickTime movies and QuickTime VR Objects and Panoramas. <Embed src="sample.mov" width="200" height="240"
pluginspage="http://www.apple.com/quicktime/download/">
QTSRC="URL" This attribute allows content developers to force a browser to use the QuickTime Plug-in for a file no matter what its MIME type is. The attribute treats it's value as a URL to load, and ignores any data loaded by the browser from the "src" parameter. <EMBED src="sample.mov" qtsrc="rtsp://www.apple.com/quicktime/movies/sample2.mov">
SCALE=value SCALE is either TOFIT, ASPECT or a number. By default the value of SCALE is 1. If set to TOFIT, the movie is scaled to fit the embedded box as specified by the HEIGHT and WIDTH attributes. If this is set to ASPECT, the movie will scale to fit the embedded box while maintaining the aspect ratio. If this is set with a number, the movie will be scaled by that number (e.g. 1.5). Note: Using the number scale attribute with a QTVR Panorama movie can degrade the performance of the movie even on high-end systems. <Embed src="sample.mov" width="200" height="240" scale="tofit">
SRC=URL The SRC attribute defines the url to the file for the plugin or helper application to play. The SRC attribute is the most common way to embed the media, except for occasional instances where the TYPE attribute may
be necessary.
<Embed src="sample.mov" width="200" height="240">
TARGET="QUICKTIMEPLAYER" When set, the QuickTime Plug-in will launch QuickTime Player as a helper application (if it is not already running) and opens the url of the movie file. In order for TARGET="QUICKTIMEPLAYER" to work,
there needs to be an href attribute in the embed tag which points to the movie file.
<Embed src="poster.mov" width="200" height="240" href="sample.mov" target="quicktimeplayer">
TARGETn="frame_Name" TARGET is an optional attribute, used in conjunction with the HOTSPOT or HREF attributes. When set, the TARGET attribute is the name of a valid frame (including _self, _top, _parent, _blank or an explicit frame name) that will be the target of a link specified by the HOTSPOT or HREF attribute. Leaving TARGET unspecified will open the new file in the same place as the current movie. HOTSPOT32="http://www.apple.com/quicktime"TARGET32="_blank"
would specify that when hotspot 32 is clicked, the QuickTime home page will load in a new window. NOTE: It is important to use the same ID# for both the HOTSPOT and TARGET for each URL reference. This ensures that the plug-in knows what HOTSPOT goes with what TARGET.
TILT=integer The TILT attribute allows you to specify the initial tilt angle for a QuickTime VR movie. Only integer values are supplied for this attribute. The range of values for a typical movie would be -42.5 to 42.5 degrees. If no value for TILT is specified, the value stored in the movie is used. This attribute has no meaning for a standard QuickTime movie. <Embed src="sample.mov" width="320" height="240" tilt="20.0">
VOLUME=value The VOLUME attribute sets the movie's initial audio volume. Only integer values between 0 through 100 are applied for this attribute. By default, VOLUME is set to 100. A setting of 0 effectively mutes the audio whereas a setting of 100 is the maximum volume. <Embed src="sample.mov" width="200" height="240" volume="50">
WIDTH=size in pixels The WIDTH attribute specifies the WIDTH of the embedded file in pixels. The WIDTH of the movie can be found by choosing 'Get Info...' in the 'Movie' menu within QuickTime Player. <Embed src="sample.mov" width="200" height="240">
Please direct all correspondance to Gary L. Nieder, Ph.D.

Last updated 1/11/02
Links link