Customer Support
International Downloads Documentation Real.com RealNetworks.com
RealVideo Overview

Configuring Your Web Site

After encoding your RealAudio and RealVideo files, you are ready to attach the files to Web pages. The following sections explain the construction and use of RealVideo content on your Web site. When you have your RealServer set up, use this information to showcase audio and video content from your site.

Making the Most of Your Content

To get the most out of your RealVideo content, educate your Web site's visitors about RealVideo. Let people know that they can listen and view your clips instantly, without download delays. Identify each clip with a RealVideo bubble icon to distinguish it as real-time video.

You may obtain the above graphic from RealNetworks' Logo and Usage site at:

http://www.real.com/company/guide/index.html

Capture the graphic from within your Web browser by right-clicking (Windows) or Control-clicking (Macintosh) it and saving it to file.

Make it easy for your visitors to get RealPlayer by providing a link to the RealNetworks home page at:

http://www.real.com/

RealVideo Metafiles

HTML documents use hyperlinks to connect Web pages. RealVideo material is also reached via links. However, RealVideo links you put into your HTML pages are not direct references to RealVideo files. Instead they are references to metafiles which contain information needed to establish a connection between your RealServer and your listener's RealPlayer and to initiate playback.

To create a link between two of your Web pages, you might add the following text to an HTML document:

<A HREF="sect2.htm">Continue to Section 2</A>

A visitor to your site could click the text, and your Web server would then deliver the appropriate section of your document.

If you employed the same syntax to create a link to a RealVideo file, your visitor's click would prompt your Web server to deliver your RealVideo data. But, your Web server cannot stream RealVideo for real-time playback. Only your RealServer can do that.

Your Web server can, however, convey information to a user's RealPlayer that enables that Player to establish a direct connection to your RealServer. Once in place, this direct connection is used to stream to the Player and to carry commands (such as seek or pause) back to your RealServer.

Instead of pointing to a file, your Web page is set up to point to a metafile. This metafile, in turn, contains the URL (Uniform Resource Locator) of the file (or files) you want associated with the hyperlink. The user's browser passes the URLs to RealPlayer, which retrieves .rm files from your RealServer.

Creating Metafiles

Metafiles contain the addresses of RealVideo (.rm) or RealAudio (.ra) files. These addresses are in the form of URLs. They begin with a locator type, followed by a specific address. The locator type identifies the protocol used to exchange information between client and server. Common locator types include http and ftp.

The locator type used by RealVideo software is pnm (RealNetworks Metafile). Addresses you put into a metafile begin with pnm://

To create a metafile:

  1. Use a text editor (such as Notepad) to create a file containing a RealVideo URL. The contents of your file should be in the following form:
    pnm://hostname/path

    For example, to provide access to a RealVideo file called hello.rm the text of your metafile would be:

    pnm://www.server1.com/hello.rm

    Where www.server1.com is the DNS name of the machine running your RealServer, on which you store your RealVideo files.

    If you want more than one file to play when the user clicks your link, create a metafile containing several URLs (on separate lines with no intervening blank lines). For example, if your metafile contains:

    	pnm://www.server1.com/hello.rm
    	pnm://www.server1.com/welcome.rm
    	pnm://www.server1.com/coolstuff.rm
    

    the Player automatically plays your three files in sequence. A listener can use the Clip menu on the Player to move forward and backward between clips (.rm files).

  2. Save your metafile in the "Text Only with Line Breaks" format, using a .ram file name extension.

    For example, you could save the three lines shown above in a file named 3track.ram on your Web server.

  3. In your HTML document, reference the metafile in a hyperlink, followed by a reference to RealVideo icon (so that RealVideo icon is displayed to the left of the file) as follows (one line):
<A HREF="http://www.real.com/welcome.ram">
<IMG SRC="http://www.real.com/pics/rvfile.gif"
align=left border=0> Welcome!</A>

Where welcome.ram is the metafile.

File Name Extensions

Each metafile that you create must be saved with (or renamed to have) a file name extension. This extension tells your Web server what the metafile is, to ensure that the enclosed URL is handled properly.

RealVideo System uses two metafile types: .ram and .rpm. These different file name extensions are passed on by your Web server and, ultimately, tell the user's Web browser which application to launch to play the referenced file:

.ram file - Browser launches RealPlayer
.rpm file - Browser launches RealPlayer Plug-in (see below)

Note You must configure your Web server to understand that the extension .ram refers to the MIME type x-pn-realaudio (detailed instructions for configuring a variety of Web servers are available in the Server Administration Guide).

Customizing Calls to Video and Audio Content

Optional arguments may be added to metafiles to finesse what is seen and heard by users when they click your RealVideo link. You may alter the point in a clip at which play starts or ends, or the Title, Author, and Copyright information is displayed by RealPlayer.

Add the options to your metafile following the URL to which they apply. Options must be preceded by a ? (question mark) and separated from each other by an & (ampersand). The syntax is as follows:

pnm://www.real.com/test.rm?[opt1]&[opt2]

Changing Start and Stop Times

To create a link that starts playing a clip from a point other than the beginning of the file, use the start command. Specify the time into the clip at which play should begin. For example:

pnm://www.real.com/test.rm?start="30"

would result in playback starting thirty seconds into the video file.

The format for the start time is as follows:

start="dd:hh:mm:ss.ss"

Tenths of seconds are separated from seconds by a decimal point; the other units of time are separated by colons. The time is interpreted from right to left, and it is not necessary to specify days, hours, or minutes if these are not relevant.

Similar to the start option is the end option. For example, the metafile text:

pnm://www.real.com/test.rm?end="5:30"

is used to provide for playback of test.ra that terminates five minutes and thirty seconds from the start of the clip.

Note The end time is always measured from the actual start of the data in the file, even in the case where playback begins elsewhere. For example, the line:

pnm://www.real.com/test.rm?start="30"&end="5:30"

is used to start play of test.rm from the thirty-second mark and to stop play five minutes later.

Changing Title, Author, or Copyright Information

The following options exist to change RealVideo descriptive information from the metafile:

title="new title"
author="new author"
copyright="new copyright"

Strings can be changed independently or in combination.

Changing information in this manner does not change what is stored in your RealVideo file-only what is displayed when it is accessed through this particular metafile. This functionality is especially useful if, for example, you have one large .ra file that contains your band's entire CD, and you want to credit the author of each song as it plays. You could create a multi-clip .ram file as follows:

pnm://www.server/band.rm?end="5:30"&title="Song1"
pnm://www.server/band.rm?start="5:31"&end="7:45
"&title="song2"&author="Joe Smith"

HTTP Streaming

HTTP streaming enables content providers to stream RealVideo clips from a World Wide Web server. While this method is not as robust, it provides a reasonable method for providing short RealVideo content to a limited number of users.

Before you can stream RealVideo clips through HTTP, you must define the following MIME types for your World Wide Web server

audio/x-pn-realaudio (files with a .ra, .rm or .ram file extension)
audio/x-pn-realaudio-plugin (files with a .rpm file extension)

Some World Wide Web servers are pre-configured with these MIME types.

Note If you are running a Web page off an ISP server, send mail to the ISP administrator asking them to configure RealPlayer mime type.

To stream RealVideo content using HTTP:

  1. Copy your encoded RealVideo files (files with the .rm extension) to your World Wide Web server.

  2. Use a text editor (such as Notepad) to create a metafile containing a RealVideo URL. For example, the contents of your file should be in the following form:

    http://hostname/path

    where hostname is the name of your World Wide Web server. For example: www.real.com

    Note Refer to "Creating Metafiles". This file works similarly, except it uses http as the protocol instead of pnm.

  3. Save your metafile as text using a .ram file name extension.

  4. In your HTML document, reference the metafile in a hyperlink. For example:

    <A HREF="file.ram">
    <A HREF="http://hostname/file.ram">

    You can use relative or complete paths. If you use complete paths, you must include both the hostname and the complete path. For example:

    <A HREF="http://www.real.com/home/welcome.ram">
  5. When a user clicks on the link, the audio or video file(s) begin to download. RealPlayer begins playing after a few seconds; it does not need to wait for the entire file to be downloaded.

Custom Controls for RealVideo

RealVideo System enables seamless integration of RealPlayer Controls into your Web page layout. You can place individual interactive components, such as a play button or image window, anywhere on your page, just as you would place an image using the <IMG> tag in HTML.

RealVideo offers two products which, in conjunction with the most popular Web browsers, enable "in page" audio controls.

  • RealPlayer Plug-in provides Player-like features to browsers that support the Netscape Navigator Plug-in architecture. This plug-in also works in Internet Explorer 3.0.

  • RealPlayer Control for ActiveX works with Internet Explorer 3.0 and Visual Basic applications to provide RealVideo playback capabilities.

Using RealPlayer Plug-in

The Plug-in runs as an adjunct to Web browsers that support Netscape's Plug-in architecture. This RealPlayer Plug-in is included in the Player installation.

The <EMBED> tag specifies Plug-in attributes in HTML pages in much the same way that the <IMG> tag specifies image attributes. The basic <EMBED> tag for RealVideo contains only the attributes SRC, WIDTH, and HEIGHT, as shown below:

<EMBED SRC=metafile.rpm WIDTH=width_value
HEIGHT=height_value>

For example:

<EMBED SRC="sample1.rpm" WIDTH=300 HEIGHT=134>

creates an in-page Player that is 300-pixels wide and 134-pixels high.

For the Plug-in, metafiles are stored with a .rpm file name extension.

The name tag is supported as an option with JavaScript to refer to a specific plug-in.

Note Do not place the <EMBED> tag within a table.

FeatureDescription
SRC AttributeThe SRC attribute specifies RealVideo metafile to be accessed. RealPlayer Plug-in is associated with a .rpm file name extension. This extension tells the user's Web browser to load RealPlayer Plug-in rather than the stand-alone RealPlayer.

For the user's Web browser to correctly identify .rpm files, you or your system administrator must first configure the .rpm MIME type in your Web server. Users do not need to configure their Web browsers to recognize the .rpm MIME type. The plug-in architecture automatically sends .rpm files to RealPlayer Plug-in. Files with a .rpm extension are identical to .ram files, except for the extension.

WIDTH and HEIGHT AttributesThe WIDTH and HEIGHT attributes specify the size of the embedded RealVideo component. Unlike images, Plug-ins do not size automatically. The WIDTH and HEIGHT can be specified in pixels (the default) or as a percentage of the Web browser window (for example: WIDTH=100%).

Note If the WIDTH and HEIGHT attributes are not included, the Plug-in may appear as a tiny (and useless) icon with some browsers.

If you want your Plug-in component to maintain an absolute size, specify HEIGHT and WIDTH in pixels. If you want the Plug-in graphic to scale with the Web browser window, specify size as a percentage. For example, if you want to fit the entire width of the Web browser window, use WIDTH=100%.

CONTROLS AttributeThe CONTROLS attribute of the <EMBED> tag allows you to place individual control elements within your page. You can use multiple <EMBED> statements to construct a custom interface, made up of individual controls. CONTROLS supports the following values: All, ControlPanel, InfoVolumePanel, InfoPanel, StatusBar, PlayButton, StopButton, VolumeSlider, PositionSlider, PositionField, StatusField, ImageWindow.

Preparing HTML Pages for Browsers that Cannot Use the Plug-in

Some Web browsers do not support plug-ins. You can create HTML pages that are enhanced for plug-ins but which also work for other browsers. Simply use the <NOEMBED> tag to include HTML statements for use by Web browsers that do not support Plug-ins.

The <NOEMBED> command should appear after an <EMBED> command and take the following syntax:

<NOEMBED> HTML to be ignored </NOEMBED>

For example, the command:

<EMBED SRC="sample1.rpm" WIDTH=300 HEIGHT=134>
<NOEMBED> <A HREF="sample1.ram">Play the clip
using the stand-alone Player! </A></NOEMBED>

would show a page with the Plug-in if your page were accessed by a browser supporting Plug-ins, and would otherwise display the message "Play the clip using the stand-alone Player!" (and allow playback with the standard Player).

Using RealPlayer Control for ActiveX

You can embed RealPlayer Control for ActiveX in HTML pages using the Object tag.

The following is an example of RealPlayer Control <OBJECT> in an HTML page.

<OBJECT 
ID=RAOCX
CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
HEIGHT=140
WIDTH=312>
<PARAM NAME="SRC" VALUE="pnm://audio.real.com/file.rm">
<PARAM NAME="CONTROLS" VALUE="all"> </OBJECT>

Note Directory names cannot have spaces.

Embedded Object Parameters

FeatureDescription
OBJECTTag is used to embed RealPlayer Control for ActiveX. There should be one <Object> tag per RealPlayer Control on the page.
CLASSIDSpecifies the control's CLSID. This value is always "clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" for RealPlayer Control for ActiveX.
HEIGHTSpecifies the control's height on the HTML page. A value of 0 makes the control invisible.
WIDTHSpecifies the control's width on the HTML page. A value of 0 makes the control invisible.
PARAMSpecially embedded tag for supplying parameters to the ActiveX object.

The following properties are available with the PARAM Parameter:
ParameterDescription
SRCSets the source of RealVideo or RealAudio clip. The SRC location can be pnm, file or http protocol. This parameter is required.
CONTROLSSets the visible components of the control. Valid CONTROLS include All, ControlPanel, InfoVolumePanel, InfoPanel, StatusBar, PlayButton, StopButton, VolumeSlider, PositionSlider, PositionField, StatusField, and ImageWindow.
CONSOLESets a console name used to link multiple control instances. All controls with the same console name work together. For example, if you have multiple Play and Stop buttons on the same page, the console name would enable them to control the same RealVideo or RealVideo clip. Call this function once for each instance of the Play or Stop button you want to link.

The console name. "_master" links to all instances. "_unique" links to no other instances.

AUTOSTARTSets whether or not the control automatically starts playing once the source data is available. Valid values are TRUE or FALSE.
NOLABELSSuppresses the Title, Author, and Copyright label text in the controls window. The text strings in the fields are still displayed.
RESETResets RealPlayer Control for ActiveX playlist. Valid values are TRUE or FALSE.
AUTOGOTOURLSpecifies how a URL is handled. Valid values are TRUE or FALSE. TRUE indicates that RealPlayer Control for ActiveX automatically forwards the URL event to the browser. FALSE indicates that the OnGotoURL VBScript event is used instead.

Specifying How the Control Should Look

The CONTROLS attribute allows you to place individual control elements within your page. The CONTROLS attributes for the Netscape Navigator Plug-in and RealPlayer ActiveX Control are the same. The following explains the output of each attribute:

All - Displays a full Player view including the Control Panel, Information-and-Volume Panel and Status Bar.

Minimum Width: 21%
Maximum Width: 100%

Minimum Height: 23%
Maximum Height: 80%

InfoVolumePanel - Displays the Title, Author, and Copyright information panel and the volume slider.

Minimum Width: 21%
Maximum Width: 100%

Minimum Height: 12%
Maximum Height: 50%

For example:

<script Language=JavaScript>
function playSource()
{if (navigator.appName == "Netscape")
{document.javaPlug1.DoPlayPause();}

else

{RAOCX.DoPlayPause();}
}
</script>

InfoPanel - Displays the Title, Author, and Copyright information.

Minimum Width: 20%
Maximum Width: 100%

Minimum Height: 10%
Maximum Height: 50%

ControlPanel - Displays the play/pause button, the stop button and the position slider.

Minimum Width: 21%
Maximum Width: 100%

Minimum Height: 8%
Maximum Height:25%

StatusPanel - Displays the Status Panel showing informational messages, current time position, and clip length. If you do not embed a Status Panel in your page, error messages are displayed in the Web browser's status bar.

PlayButton - Displays the play/pause button.

Minimum Width: 5%
Maximum Width: 100%

Minimum Height: 2%
Maximum Height: 25%

StopButton - Displays the stop button.

Minimum Width: 5%
Maximum Width: 100%

Minimum Height: 2%
Maximum Height: 25%

VolumeSlider - Displays the volume slider.

Minimum Width: 4%
Maximum Width: 100%

Minimum Height: 10%
Maximum Height: 100%

PositionSlider - Displays the position slider.

Minimum Width: 8%
Maximum Width: 100%

Minimum Height: 5%
Maximum Height: 25%

PositionField - Displays the field of the Status Bar showing position and clip length.

Minimum Width: 10%
Maximum Width: 100%

Minimum Height: 4%
Maximum Height: 25%

StatusField - Displays the message text area of the Status Bar.

Minimum Width: 13%
Maximum Width: 100%

Minimum Height: 4%
Maximum Height: 15%

ImageWindow - Displays the video image.

Minimum Width: 100%
Maximum Width: 100%

Minimum Height: 100%
Maximum Height: 100%

StatusBar - Displays the status field, position field, channels (stereo/mono).

Minimum Width: 21%
Maximum Width: 100%

Minimum Height: 5%
Maximum Height: 14%

ActiveX Methods and Properties

Methods

Methods are functions that control the performance of the Control. Unless otherwise noted, these methods have no return values and no parameters.

MethodDescription
DoPlayPausePlays or pauses the current clip. Equivalent to clicking the Play/Pause button.
DoStopStops the RealAudio clip. Equivalent to clicking the Stop button.
DoNextItemSkips to the next clip in a .ram file that contains multiple clips. A .ram file is a RealAudio metafile that points to one or more RealAudio files.
DoPrevItemSkips to the previous clip in a .ram file that contains multiple clips. A .ram file is a RealAudio metafile that points to one or more RealAudio files.
CanPlayPauseTests if Play/Pause function is available. Returns TRUE or FALSE
CanStopTests if Stop function is available. Returns TRUE or FALSE.
HasNextItemTests if the next clip function is available. The next clip function is available when the connected source is a .ram file that contains multiple clips, and the current clip is not the last clip in the .ram file. Returns true or false.
HasPrevItemTests if the previous clip function is available. The previous clip function is available when the connected source is a .ram file that contains multiple clips, and the current clip is not the first clip in the .ram file. Returns true or false.
AboutBoxOpens the Copyright information for the control.
EditPreferencesOpens the Preferences dialog box. Enables the end user to set his/her RealAudio preferences. These preferences are global to all RealAudio clients on the machine.
HideShowStatisticsShows or hides the Connection Statistics dialog box.
IsStatisticsVisibleTests if the Connection Statistics dialog box is displayed. Returns true or false.
DoGotoURL(url, target)Causes the control to attempt a navigation to the specified URL in the specified frame target. The container must support URL browsing. Parameters: string URL, string target.

Object Properties

The object properties are set within Visual Basic and specify properties about the control.

PropertyDescription
SourceSpecifies the URL of the RealAudio clip to play. The Source location can be pnm:, file: or http: protocol.
ControlsReturns/Sets the visible components of the control. Valid CONTROLS include ALL, ControlPanel, InfoVolumePanel, InfoPanel, StatusBar, PlayButton, StopButton, VolumeSlider, PositionSlider, PositionField, and StatusField.
ConsoleSets a console name used to link multiple control instances. All controls with the same console name work together. For example, if you have multiple Play and Stop buttons on the same page, the console name would enable them to control the same RealAudio clip. Call this function once for each instance of the Play or Stop button you want to link. The console name master links to all instances while unique links to no other instances.
AutostartSets whether or not the control automatically starts playing once the source data is available. Valid values are TRUE or FALSE.
NoLabelsSuppresses the Title, Author, and Copyright label text in the controls window. The text strings in the fields are still displayed.
AutoGotoURLSpecifies how a URL will be handled. Valid values are TRUE or FALSE. TRUE indicates that the RealAudio ActiveX Control will automatically forward the URL event to the browser. FALSE indicates that the OnGotoURL VBScript event will be sent instead.

Java and JavaScript Methods

Methods are functions that control the performance of the Java enabled RealAudio Plug-in.

MethodDescription
SetSource(String Source) Specifies the URL of the RealAudio clip to play. The Source location can be pnm:, file: or http: protocol.
SetControlsString(String ControlsString) Returns/Sets the visible components of the control. Valid CONTROLS include ALL, ControlPanel, InfoVolumePanel, InfoPanel, StatusBar, PlayButton, StopButton, VolumeSlider, PositionSlider, PositionField, and StatusField.
SetConsoleName(String ConsoleName) Sets a console name used to link multiple RealAudio Plug-in instances. All RealAudio Plug-ins with the same console name work together. For example, if you have multiple Play and Stop buttons on the same page, the console name would enable them to control the same RealAudio clip. Call this function once for each instance of the Play or Stop button you want to link. The console name master links to all instances while unique links to no other instances.
SetAutoStart(Boolean bAutoStart) Sets whether or not the RealAudio Plug-in automatically starts playing once the source data is available. Valid values are TRUE or FALSE.
SetNoLabels(Boolean bNoLabels) Suppresses the Title, Author, and Copyright label text in the RealAudio Plug-in window. The text strings in the fields are still displayed.
DoPlayPause() Plays or pauses the current clip. Equivalent to clicking the Play/Pause button.
DoStop() Stops the RealAudio clip. Equivalent to clicking the Stop button.
DoNextItem() Skips to the next clip in a .ram file that contains multiple clips. A .ram file is a RealAudio metafile that points to one or more RealAudio files.
DoPrevItem() Skips to the previous clip in a .ram file that contains multiple clips. A .ram file is a RealAudio metafile that points to one or more RealAudio files.
CanPlayPause() Tests if Play/Pause function is available. Returns TRUE or FALSE
CanStop() Tests if Stop function is available. Returns TRUE or FALSE.
HasNextItem() Tests if the next clip function is available. The next clip function is available when the connected source is a .ram file that contains multiple clips, and the current clip is not the last clip in the .ram file. Returns true or false.
HasPrevItem() Tests if the previous clip function is available. The previous clip function is available when the connected source is a .ram file that contains multiple clips, and the current clip is not the first clip in the .ram file. Returns true or false.
AboutBox() Opens the Copyright information for the control.
EditPreferences() Opens the Preferences dialog box. Enables the end user to set his/her RealAudio preferences. These preferences are global to all RealAudio clients on the machine.
HideShowStatistics() Shows or hides the Connection Statistics dialog box.
IsStatisticsVisible() Tests if the Connection Statistics dialog box is displayed. Returns true or false.

CallBack Methods

CallBack methods are functions that provide notification from the RealAudio engine. CallBack methods can only be used with Java applets by implementing the RAObserver interface.

MethodDescription
onClipOpened(String shortClipname, String URL) Sent when a clip has been opened.
onClipClosed()Sent to indicate that no clip is currently open.
onShowStatus(String status)Sent to indicate that the status text is changing.
setAutoGoToURL(boolean bAutoGoToURL) Specifies how a URL will be handled. Valid values are true or false. True indicates that the RealAudio Plug-in will automatically forward the URL event to the browser. False indicates that the OnGoToURL event will be handled by the Java applet instead.
onGoToURL(String url, String target) Sent when a URL event has been encountered for the currently playing RealAudio clip. This event will only occur if the AutoGotoURL property is false.

Advanced Control Attributes

The more exciting features of RealPlayer Plug-in and RealPlayer Control for ActiveX may be utilized by specifying custom attributes within your HTML documents.

Removing Text Labels from Controls

If your Web page is in a language other than English, or if you want to use RealVideo Description fields to display information other than Title, Author, and Copyright, you may remove the Title, Author, and Copyright Labels from the information area. Controls that display Title, Author, and Copyright information for a clip, support a NOLABELS=TRUE attribute.

For example, allowing the default behavior

<EMBED SRC="use_lbl.rpm" WIDTH=350
HEIGHT=80 CONTROLS=InfoPanel>

or specifying NOLABELS=FALSE

<EMBED SRC="use_lbl.rpm" WIDTH=350 HEIGHT=80
CONTROLS=InfoPanel NOLABELS=FALSE>

results in the following display.

On the other hand, using NOLABELS=TRUE, for example:

<EMBED SRC="no_lbl.rpm" WIDTH=350
HEIGHT=80 CONTROLS=InfoPanel NOLABELS=TRUE>

produces the following InfoPanel:

Starting Clips Automatically

Adding an AUTOSTART=TRUE attribute tells the user's browser to automatically begin playing your clip when the page is visited. You can use this feature to begin narration, to play a welcome message or start a video.

Since only one clip can play at a time, if you specify AUTOSTART for more than one control instance, only the last control to load will play. The order in which your files are delivered is dependent on the Web server and on the browser's cache size. This is not necessarily the order in which you put them within your HTML. Therefore, you should specify AUTOSTART for only one control instance per page.

Playing Clips with a Hidden Control or Plug-in

If you want to play RealVideo or RealAudio clips without having a visible Plug-in control, you hide the control. By embedding a Plug-in in your page that has its size set to width=2 height=0, no image appears on your Web page. You can control the Plug-in with JavaScript.

For example:

<script Language=JavaScript>
function playSource()
{if (navigator.appName == "Netscape")
{document.javaPlug1.DoPlayPause();}

else

{RAOCX.DoPlayPause();}
}
</script>
<A HREF="#" onClick="playSource()
"><IMG RC="button.gif"></A>
<OBJECT ID=RAOCX CLASSID="
clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
WIDTH=2 HEIGHT=0>
<PARAM NAME="SRC" VALUE="pnm://audio.real.com/
welcome.rm">
<PARAM NAME="CONTROLS" VALUE="
PlayButton">
<embed src="start.rpm" Width=2 Height=0
Controls=PlayButton name=javaPlug1>
</OBJECT>

The above example works in both Netscape and Internet Explorer. Only one control will appear on the Web page.

Making Controls Work Together

RealVideo System allows you to embed any number of RealVideo elements within a Web page. Normally, each tag instance refers to different video content. Sometimes, however, you may want to link two or more controls together. For example, you can create a play button and an image window that work as a pair.

To include multiple components that work together, specify a CONSOLE attribute for each control and assign this the same value in each instance. For example:

<EMBED SRC="sample1.rpm"
WIDTH=30 HEIGHT=33 CONTROLS="PlayButton"
CONSOLE="Clip1">
<EMBED SRC="empty1.rpm" WIDTH=182
HEIGHT=144 CONTROLS="ImageWindow"
CONSOLE="Clip1">

Note Each <EMBED> tag must have a unique SRC attribute (if the same source is specified for two tags, one is ignored). Create a dummy .rpm file (named, for example: empty1.rpm) for a second control accessing a clip. Put a hard carriage return (ASCII code 13) into the dummy file.

Specifying a CONSOLE value of " master" links a particular control to all other RealPlayer Controls on the page. Use this value, for example, to add a Status Bar to display information for all clips, for example:

<EMBED SRC="sample1.rpm"
WIDTH=300 HEIGHT=33 CONTROLS="StatusBar"
CONSOLE="_master">

Because many platforms, including Windows, only support one volume setting, all volume sliders act on the same underlying value and affect all clips regardless of CONSOLE name. For this reason, you may want to include only one volume slider per page, with no reference to a .rm file in its associated .rpm file.

If you only include an ImageWindow control on the Web page, the video stream may still be controlled by using the context sensitive pop-up menu. For Windows users, right-click the ImageWindow; Macintosh users, click and hold the mouse button until the pop-up menu appears.


Continue to Synchronized Multimedia

Return to the Table of Contents