JavaScript EditorBest javascript editor debugger     Ajax website 



Main Page

Previous Page
Next Page

Embedding QuickTime Movies for Windows

QuickTime is Apple's high-quality video format. There are free QuickTime players available for both Macintosh and Windows. Many movie studios use QuickTime for uploading their movie trailers to the Internet.

In this section, I'll teach you how to insert a QuickTime movie that will play in Internet Explorer for Windows. We'll get to the rest of the browsers on page 288.

Figure 18.7. This is the way Internet Explorer requires the object element to be used. Unfortunately, the use of a long (awful) number for the classid attribute (which calls Internet Explorer's proprietary ActiveX technology) is completely non-standard and causes standards-loving browsers to ignore the object element.


To embed a QuickTime movie on your Web page for Internet Explorer:

1.
Create a movie and save it in QuickTime format with the .mov extension.

2.
In your Web page, where you want the movie to appear, begin the object element for IE for Windows by typing <object classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" codebase="http://www.apple.com/qtactivex/qtplugin.cab".

3.
Next, without closing the initial object tag yet, type width="w" height="h", where w and h are the desired width and height, in pixels, of the box that will hold the movie.

4.
Type > to complete the initial object tag.

5.
Next, type <param name="src" value="filename.mov">, where filename.mov is the URL of your movie file.

6.
Type <param name="autoplay" value="false">, to keep the movie from starting automatically when the visitor jumps to this page (IE 7 doesn't properly autoplay QuickTime moviesunless you use JavaScript, see page 292and it looks better if you don't even let it try.)

7.
If you want control buttons to appear under the movie, type <param name="controller" value="true". Or use a value of false to hide the controls (in which case you better use TRue in step 6).

8.
Insert more parameters as desired as described on pages 294299.

9.
Complete the object element by typing </object>.

Figure 18.8. The movie works fine for Internet Explorer (top) but doesn't appear at all in standards-loving browsers like Firefox for Windows (below).


Tips

  • Apple recommends using JavaScript to call QuickTime movies for Internet Explorer. For more details and instructions, see page 292.

  • Create a template file site in order to save yourself from typing that incredible classid. What were they thinking?

  • You can find the size of the movie in the QuickTime player by choosing Window > Show Movie Info (and clicking the triangle, if necessary).

  • The height and width determine the size of the box that contains the movie. If the box is too small, the movie will be cropped (or scaled if you've set a scale factorpage 294). If the box is too big, there will be empty space around it.

  • You should include an additional 16 pixels in the height to allow for the play, rewind, and other buttons.

  • The default value for autoplay is defined by visitors in their QuickTime settings. The default value for controller is true.

  • Many QuickTime parameters are discussed on the following pages for adjusting the playback of your movies. For a complete list, see HTML Scripting Guide for QuickTime on Apple's site.



Previous Page
Next Page


JavaScript EditorBest javascript editor debugger     Ajax website 
R7