In this hour, you've seen how to embed video and sound into a web page. You saw how to use a simple link to a multimedia clip, which is the most broadly supported but least flexible option for playing media content. You then learned how to use the <object> tag to embed a media player directly in a web page. Not only that, but you found out that for maximum browser compatibility it helps to assist the <object> tag with the <embed /> tag. The <object> and <embed /> tags can be used to include a vast array of media types, including WAV, MP3, RealAudio, and MIDI files, not top mention AVI, WMV, and QuickTime videos, to name just a few. Table 19.1 summarizes the tags discussed in this hour. Table 19.1. HTML Tags and Attributes Covered in Hour 19Tag/Attribute | Function |
---|
<embed /> | Embeds a multimedia file to be read or displayed by a plug-in application; this tag is technically deprecated but still useful due to browsers not fully supporting the <object> tag yet. |
Attributes |
---|
width="width" | The width of the embedded object in pixels. | height="height" | The height of the embedded object in pixels. | type="mimetype" | The MIME type of the multimedia content. | src="mediaurl" | The URL of the file to embed. | controls="controls" | The configuration of the user input controls for the media player; use All to enable all controls. | loop="loop" | Whether to play the media clip once or loop it repeatedly; set to true or false. | autostart="autostart" | Whether to start playing the media clip upon opening the page; set to TRue or false. | pluginspage="pluginurl" | The URL of the plug-in required to play the media clip. | <object>…</object> | Inserts images, videos, Java applets, ActiveX controls, or other objects into a document. (See Hour 18 for attributes of the <object> tag.) | <param>…</param> | Runtime settings for an object, such as the width and height of the area it occupies on a page. |
Attributes |
---|
name="name" | A named parameter property. | value="value" | The value associated with a named parameter property. |
|