All major browsers except Internet Explorer (from version 5.5 and up) use the standard object tag in a standard way. I'll describe it here. On page 290 we'll see how to combine this method with the IE method discussed earlier so that all browsers can see your video. To embed QuickTime movies for everyone besides IE: 1. | Create your QuickTime movie, save it in .mov format, and upload it to your server.
| 2. | Begin the object for standards loving browsers by typing <object.
| 3. | Indicate what kind of file the movie is by typing type="video/quicktime".
| 4. | Specify the movie's location on the Internet by typing data="filename.mov".
| 5. | Still without closing the initial object tag, type width="w" height="h", where w and h are the desired width and height, respectively, in pixels, of the box that will hold the movie.
| 6. | To give the location of the QuickTime player to visitors who don't yet have it installed, type codebase="http://www.apple.com/quicktime/download"
| 7. | Finally, close the initial object tag by typing > (the right angle bracket).
| 8. | Next type <param name="autoplay" value="false" /> to keep QuickTime from starting until the visitor clicks the play button.
| 9. | Type <param name="controller" value="true" /> to have the controls appear below the movie.
| 10. | Type </object> to complete the object.
Figure 18.9. The standard implementation of the object element includes a type that indicates the MIME type of the multimedia file, a data attribute with the URL of the file, the width and height, and one or more parameters. | Tips It really gets my goat that IE's nonstandard use of the object tag used to force standards-loving browsers that did support object to give it up in favor of the non-standard embed tag. The embed element has never been part of the HTML standards. Pages containing it will not validate. That said, almost all pages with multimedia files, until now, have been forced to use it. No more. Figure 18.10. Now we've got a movie showing in standards-loving browsers like Firefox. On the next page, we will see how to combine the two methods so that all browsers can see your movies. Figure 18.11. But Internet Explorer does not support the standard implementation of the object element. You can find the dimensions 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 controllers. The default value for autoplay is defined by the visitor in their QuickTime settings. The default value for controller is true. If you use TRue for the autoplay parameter, your video will start loading and playing when your visitor opens your page. You might want to make sure the video isn't too loud (or too big). 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. |