|
Example 30-3 is a nice summary of the LiveAudio features.
<HTML> <HEAD> <TITLE>LiveAudio</TITLE> </HEAD> <BODY> <TABLE BORDER=1><TR> <TD BGCOLOR="black" ALIGN="center"> <FONT COLOR="white" SIZE=2>Beverly Hills</FONT> <BR> <EMBED SRC="bhl90210.mid" AUTOSTART=FALSE LOOP=FALSE CONTROLS=PLAYBUTTON WIDTH=34 HEIGHT=22 MASTERSOUND NAME="90210"> <EMBED SRC="stub1.aif" AUTOSTART=FALSE LOOP=FALSE CONTROLS=STOPBUTTON WIDTH=34 HEIGHT=22 NAME="90210"> <EMBED SRC="stub2.aif" AUTOSTART=FALSE LOOP=FALSE CONTROLS=PAUSEBUTTON WIDTH=34 HEIGHT=22 NAME="90210"> </TD> <TD BGCOLOR="black" ALIGN="center"> <FONT COLOR="white" SIZE=2>Melrose</FONT><BR> <EMBED SRC="melrose.mid" AUTOSTART=FALSE LOOP=FALSE CONTROLS=PLAYBUTTON WIDTH=34 HEIGHT=22 MASTERSOUND NAME="melrose"> <EMBED SRC="stub1.aif" AUTOSTART=FALSE LOOP=FALSE CONTROLS=STOPBUTTON WIDTH=34 HEIGHT=22 NAME="melrose"> <EMBED SRC="stub2.aif" AUTOSTART=FALSE LOOP=FALSE CONTROLS=PAUSEBUTTON WIDTH=34 HEIGHT=22 NAME="melrose"> </TD> </TR><TR> <TD COLSPAN=2 BGCOLOR="black" ALIGN="center"> <FONT COLOR="white" SIZE=2>Master Volume</FONT><BR> <EMBED SRC="stub1.aif" CONTROLS=VOLUMELEVER WIDTH=74 HEIGHT=20 NAME="_MASTERVOLUME"> </TD> </TR></TABLE> </BODY> </HTML>
Example 30-3 (ex30-3.htm). Two sound files, with three EMBEDs for each and an EMBED to control the system volume. Figure 30-3 shows the exact output of Example 30-3 by Netscape Navigator. Since each EMBED statement can specify one control object, we need three of them to place the PLAYBUTTON, STOPBUTTON, and PAUSEBUTTON. Here’s the syntax for the Master Volume control:
<EMBED SRC="stub1.aif" CONTROLS=VOLUMELEVER WIDTH=74 HEIGHT=20 NAME="_MASTERVOLUME">
Notice the underscore which is the first character in the object’s name. LiveVideoLiveVideo plays video files in AVI format. It is currently supported for Windows 95 and NT only. Use the <EMBED> tag to place AVI movies in your Web page. The general syntax for this tag is as follows:
<EMBED SRC=[URL] AUTOSTART=[TRUE|FALSE] LOOP=[TRUE|FALSE] WIDTH=[#PIXELS] HEIGHT=[#PIXELS] ALIGN=[TOP|BOTTOM|CENTER|BASELINE|LEFT|RIGHT| TEXTTOP|MIDDLE|ABSMIDDLE|ABSBOTTOM]...>
The attributes should be obvious, because we have already discussed them in the LiveAudio section. Once the AVI video loads, you can start it with a click (only if you didn’t set AUTOSTART to TRUE). Click the right mouse button over the video panel for a list of operations. Other Plug-insThere are currently hundreds of plug-ins besides LiveAudio and LiveVideo. We decided to focus on these for several reasons:
Live3D lets you access distributed 3D spaces rendered at maximum speed with adaptive rendering, background processing, hardware acceleration, and GZIP data compression. This plug-in also matches the preceding features, but it is beyond the scope of this book because it requires VRML. SummaryIn this chapter we focused on embedding plug-ins in HTML, and referencing them with JavaScript. We also introduced LiveAudio and LiveVideo, mostly for the sake of the following chapter. Before you move on to the following chapter, be sure you know how to reference plug-ins with JavaScript, both with the embeds array and by name. In the following chapter we discuss LiveConnect, one of the strongest features implemented by Netscape in Navigator 3.0 and above.
|
|||||||||||||||||||||||
With any suggestions or questions please feel free to contact us |