Online Documentation Server
 ПОИСК
ods.com.ua Web
 КАТЕГОРИИ
Home
Programming
Net technology
Unixes
Security
RFC, HOWTO
Web technology
Data bases
Other docs

 


 ПОДПИСКА

 О КОПИРАЙТАХ
Вся предоставленная на этом сервере информация собрана нами из разных источников. Если Вам кажется, что публикация каких-то документов нарушает чьи-либо авторские права, сообщите нам об этом.




Previous Table of Contents Next

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.  You can create custom consoles using several elements (EMBEDs).

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.

LiveVideo

LiveVideo 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-ins

There are currently hundreds of plug-ins besides LiveAudio and LiveVideo. We decided to focus on these for several reasons:

  • They come bundled with Netscape Navigator 3.0, so anyone running this browser can view audio and video files without downloading any external software.
  • Both LiveAudio and LiveVideo enable LiveConnect, so you can control them with JavaScript (and Java).

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.

Summary

In 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.

Previous Table of Contents Next


With any suggestions or questions please feel free to contact us