`EXTENDED FUNCTIONALITY GUIDE
`RealSystem™ G2
`Revision Date: December 21, 1998
`
`BTN0007208
`
`1
`
`NEULION 1016
`
`
`
`Information in this document is subject to change without notice. Companies, names, and data used in
`examples herein are fictitious unless otherwise noted. No part of this document may be reproduced or
`transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written
`permission of RealNetworks, Inc.
`©1998 RealNetworks, Inc.
`RealAudio, RealVideo, and RealPlayer are registered trademarks of RealNetworks, Inc.
`The Real logo, RealServer, RealPlayer Plus, RealText, RealPix, RealAudio Encoder, RealVideo Encoder,
`RealEncoder, RealPublisher, RealProducer, RealProducer Plus, RealProducer Pro, SureStream, RealBroadcast
`Network, and RealSystem are trademarks of RealNetworks, Inc.
`RealFlash is a trademark of Macromedia, Inc. and RealNetworks, Inc.
`Macromedia is a registered trademark and Flash and Shockwave are trademarks of Macromedia, Inc.
`STiNG is a trademark of Iterated Systems, Inc.
`ACELP-NET codec used under license from Université de Sherbrooke. Sipro Lab Télécom, Inc. Copyright ©1994-
`1997. All rights reserved.
`DolbyNet is a trademark of Dolby Laboratories, Inc.
`Dolby Digital AC-3 audio system manufactured under license from Dolby Laboratories.
`Apple, Macintosh, and Power Macintosh are registered trademarks of Apple Computer, Inc.
`Microsoft, MS-DOS, Windows, and Windows NT are registered trademarks and ActiveX is a trademark of
`Microsoft Corporation.
`Netscape and Netscape Navigator are registered trademarks of Netscape Communications Corporation.
`Pentium is a registered trademark and MMX and the Intel Optimizer Logo are trademarks of Intel Corporation.
`Sonic Foundry and Sound Forge are registered trademarks of Sonic Foundry, Inc.
`Other product and corporate names may be trademarks or registered trademarks of other companies. They are
`used for explanation only, with no intent to infringe.
`
`RealNetworks, Inc.
`1111 Third Avenue, Suite 2900
`Seattle, WA 98101 USA
`
`http://www.real.com
`
`BTN0007209
`
`2
`
`
`
`CONTENTS
`
`CONTENTS
`
`1
`7
`
`2
`2
`
`3
`3
`
`INTRODUCTION
`INTRODUCTION
`RealSystem Components ....................................................... 1
`RealSystem Components ..................................................... .. 1
`Conventions Used in this Manual ......................................... .. 2
`Conventions Used in this Manual........................................... 2
`Technical Support ................................................................. 2
`Technical Support ............................................................... .. 2
`RealForum ...................................................................... .. 3
`RealForum........................................................................ 3
`
`1
`1
`
`USINGJAVASCRIPTAND THE NEFSCAPE PLUG-IN
`USING JAVASCRIPT AND THE NETSCAPE PLUG-IN
`Naming a Plug-in Instance ..................................................... 4
`Naming a Plug-in Instance ................................................... .. 4
`Using RealPlayer Methods through JavaScript ......................... 4
`Using RealPlayer Methods throughJavaScript ....................... .. 4
`Handling URLs through <EMBED> ........................................ 5
`Handling URLs through <EMBED> ...................................... .. 5
`
`Using PREFETCH with <EMBED> .......................................... 5
`Using PREFEFCH with <EMBED> .... ..
`5
`Receiving Callbacks ............................................................... 6
`Receiving Callbacks ............................................................. .. 6
`
`4
`4
`
`USING VBSCRIPT AND THE ACTIVEX CONTROL
`USING VBSCRIPT AND THE ACTIVEX CONTROL
`
`Using RealPlayer Methods through VBScript........................... 8
`Using RealPlayer Methods through VBScript .... ..
`8
`Handling URLs through <OBJECT> ........................................ 9
`Handling URLs through <OBJEC|'> ...................................... .. 9
`Using PREFETCH with <OBJECT>.......................................... 9
`Using PREFEFCH with <OBJECT> ........................................ .. 9
`Receiving Callbacks ..............................................................10
`Receiving Callbacks ............................................................ ..10
`
`8
`
`12
`12
`
`MI:_l'HODS
`METHODS
`Playback Commands............................................................12
`Playback Commands .......................................................... ..12
`PlayState Information...........................................................13
`PlayState |nFormation ......................................................... ..13
`Attributes .......................................................................... ..13
`Attributes ............................................................................13
`Clip Position ........................................................................17
`Clip Position ...................................................................... ..17
`Clip/TAC Information ..........................................................18
`Clip/TAC |nFormation ........................................................ ..18
`
`Playlist/Multiclip..................................................................18
`Playlist/Multiclip....
`Live Playback .......................................................................20
`Live Playback ..................................................................... ..20
`User Interface Components ..................................................20
`User |nterFace Components ................................................ ..20
`Error Handling .....................................................................21
`Error Handling ................................................................... ..21
`Display State........................................................................23
`Display State ...................................................................... ..23
`Volume/Mute Control
`Volume/Mute Control ..........................................................23
`
`Context Menu .................................................................... ..24
`Context Menu ......................................................................24
`Network Information .......................................................... ..25
`Network Information............................................................25
`Version Information ........................................................... ..26
`Version Information .............................................................26
`Event Flags...........................................................................26
`Event Flags ......................................................................... ..26
`
`BTN0007210
`
`iii
`
`BTN0007210
`
`3
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
` Contents
`
`User Preference Settings........................................................26
`RealPlayer 5.0 Compatibility.................................................27
`
`4
`
`CALLBACK METHODS
`RealPlayer G2 Callbacks .......................................................28
`RealPlayer 5.0 Compatibility.................................................31
`
`28
`
`iv
`
`BTN0007211
`
`4
`
`
`
`INTRODUCTION
`
`RealPlayer G2 includes a Netscape plug-in and ActiveX control that expose
`RealPlayer functionality. This lets you play back a RealSystem presentation
`directly in a Web page without launching RealPlayer as a separate application.
`You simply add <EMBED> tag or <OBJECT> tag mark-up to a Web page. The
`embedded presentation typically includes an image window and one or more
`standard RealPlayer interface elements, such as the Stop button, the volume
`slider, and so on.
`
`Additional Information
`RealSystem G2 Production Guide available at
`http://service.real.com/help/library/index.html
`explains the basics of embedding a presentation.
`
`Using a scripting language such as JavaScript or VBScript, you can use
`RealPlayer functions such as the stop, play, and volume controls without
`using RealPlayer’s standard interface components. You can use your own
`graphic image for a Stop button, for example. When a user clicks the button
`image, a stop command is sent to RealPlayer’s Netscape plug-in or ActiveX
`control. This document describes all the supported methods and events for
`extending RealPlayer’s embedded functionality.
`
`Tip
`The HTML version of this guide, available at
`http://service.real.com/help/library/index.html,
`contains samples of embedded playback.
`
`RealSystem Components
`You need the following tools to create and test your embedded presentation:
`
`• RealPlayer G2
`Use RealPlayer G2, available free at http://www.real.com, to test your
`JavaScript or VBScript extensions. Installing RealPlayer G2 also installs its
`
`1
`
`BTN0007212
`
`5
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
` Introduction
`
`Netscape plug-in and ActiveX control for embedded playback. The
`RealPlayer G2 installation includes a ZIP file with Java classes for use with
`the Netscape plug-in.
`
`• RealServer
`RealServer streams clips to RealPlayer. RealServer is not necessary for
`testing local playback of embedded clips, but is necessary for streaming
`presentations to RealPlayer G2 over a network. RealServer Administration
`Guide is available at http://service.real.com/help/library/index.html.
`• RealSystem G2 Software Development Kit (SDK)
`The RealSystem G2 SDK is not necessary for extending RealPlayer’s
`embedded playback features, but is required for advanced programming
`tasks such as building a new client interface on top of the RealPlayer G2
`core. A knowledge of C++ programming is required to use the SDK.
`Register for and download the SDK at http://www.real.com/devzone/.
`
`Conventions Used in this Manual
`The following table explains the conventions used in this manual.
`
`Convention
`variables
`
`[options]
`
`choice 1|choice 2
`...
`
`Notational Conventions
`Meaning
`Italicized text represents variables. Substitute values
`appropriate for your situation.
`Square brackets indicate optional values you may or may
`not need to use.
`Vertical lines separate values you can choose between.
`Ellipses indicate nonessential information omitted from
`the example.
`
`Technical Support
`For technical support with RealSystem G2, please fill out the form at:
`
`• http://service.real.com/contact/email.htm
`The information you provide in this form will help technical support
`personnel to give you a prompt response. For general information about
`RealNetworks' technical support, visit:
`
`2
`
`BTN0007213
`
`6
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
` Introduction
`
`• http://service.real.com/help/call.html
`
`RealForum
`RealNetworks also encourages you to join RealForum, an e-mail discussion
`group about RealSystem products in which developers and content producers
`post tips and ask for assistance. RealNetworks employees monitor the
`postings and offer suggestions as appropriate. You can sign up for RealForum
`at http://proforma.real.com/mario/devzone/realforum.html.
`
`3
`
`BTN0007214
`
`7
`
`
`
` Chapter 1: USING JAVASCRIPT AND THE NETSCAPE
`PLUG-IN
`
`1
`
`You can use JavaScript with the RealPlayer G2 Netscape plug-in with
`the following browsers:
`
`• Netscape Navigator 3.0, 4.0, and higher
`
`• Microsoft Internet Explorer 3.0 and 4.0
`
`Additional Information
`RealSystem G2 Production Guide available at http://
`service.real.com/help/library/index.html explains
`the basics of embedding a presentation with the
`Netscape plug-in.
`
`Naming a Plug-in Instance
`To refer to an embedded instance with JavaScript, you include a NAME
`parameter in the <EMBED> tag:
`<EMBED NAME=vid SRC=”...” WIDTH=300 HEIGHT=134>
`
`You can then refer to the instance through a JavaScript command such as this:
`<Input Type=”button” Value=”play” onClick=”document.vid.DoPlay()”>
`
`Using RealPlayer Methods through JavaScript
`To extend RealPlayer’s Netscape plug-in functionality with JavaScript, you
`first embed the source file in an HTML page with the <EMBED> tag:
`<EMBED NAME=javademo
` SRC="demo.rpm"
` WIDTH=220 HEIGHT=180
` CONSOLE=one
`
`4
`
`BTN0007215
`
`8
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
`CHAPTER 1: Using JavaScript and the Netscape Plug-In
`
` CONTROLS=ImageWindow
` BACKGROUNDCOLOR=white
` CENTER=true
` >
`
`In the <EMBED> tag, the NAME parameter provides the name used by the
`JavaScript functions. For JavaScript to function with RealPlayer, the <EMBED>
`tag must not contain the parameter NOJAVA=true. That parameter prevents the
`browser’s Java Virtual Machine from starting up.
`You can then use JavaScript to issue RealPlayer commands to control the
`embedded presentation. The following example shows a simple form that
`provides a Play, Pause, and Stop button for the embedded presentation.
`<FORM>
`<INPUT TYPE="button" VALUE="Play" onClick="document.javademo.DoPlay()">
`<INPUT TYPE="button" VALUE="Pause" onClick="document.javademo.DoPause()">
`<INPUT TYPE="button" VALUE="Stop" onClick="document.javademo.DoStop()">
`</FORM>
`
`Additional Information
`The section “Methods” beginning on page 12 lists the
`RealPlayer methods.
`
`Handling URLs through <EMBED>
`You can use the AUTOGOTOURL parameter in the <EMBED> tag to determine how
`URLs in the presentation are handled. The default value of true applies if you
`leave the parameter out. In this case any URL embedded in the presentation
`goes to the browser. If you set this parameter to false, RealPlayer sends the
`URL to the Java applet or application with the OnGotoURL() call.
`
`Note
`The SetAutoGoToURL() method (see page 15) can override
`the AUTOGOTOURL parameter. AUTOGOTOURL is not
`compatible with the RealPlayer 5.0 Netscape plug-in,
`however, so use SetAutoGoToURL() when planning
`backwards-compatibility.
`
`Using PREFETCH with <EMBED>
`The PREFETCH parameter causes RealPlayer G2 to get the stream description
`information before the stream starts. You can use this to find out the size and
`
`5
`
`BTN0007216
`
`9
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
`CHAPTER 1: Using JavaScript and the Netscape Plug-In
`
`width of an embedded clip, for example, then dynamically create the <EMBED>
`tag for the image window, using the clip’s native size for the WIDTH and HEIGHT
`parameters. To do this, you would embed a control, such as the default control
`panel, and set PREFETCH to true:
`<EMBED NAME=console
` SRC="demo.rpm"
` WIDTH=400 HEIGHT=100
` CONSOLE=one
` CONTROLS=All
` PREFETCH=true
` >
`
`The control fetches the stream information, then responds with the callback
`OnPreFetchComplete() (see page 31). You next use GetClipWidth() and
`GetClipHeight() (see page 18) to determine the native size of the image window.
`Through a means such as DHTML, you can then create the image window
`control. If the width and height were 320 by 240, respectively, you could
`generate an <EMBED> tag like the following:
`<EMBED NAME=image
` SRC="demo.rpm"
` WIDTH=320 HEIGHT=240
` CONSOLE=one
` CONTROLS=ImageWindow
` >
`
`Receiving Callbacks
`When using JavaScript and the Netscape plug-in, you use LiveConnect to
`receive callbacks. LiveConnect is described at http://home.netscape.com/
`navigator/v3.0/liveconnect.html. The java directory of the HTML version of
`this manual contains callback.java, which is a sample Java class used to create a
`Java callback object. You can modify this class as necessary to get notifications
`from RealPlayer’s RMObserver or RAObserver interface, both of which are
`included in the rpcl3260.zip file installed in the RealPlayer folder:
`• RMObserver.class
`RMObserver is a Java interface for events coming from RealPlayer G2 (but
`not RealPlayer 5.0). Any object implementing this interface may register
`itself into RealPlayer G2 to get a large set of notifications. To see how this
`is done, view the adviseG2() function in RAPlayer.java, which is included in
`the ZIP file.
`
`6
`
`BTN0007217
`
`10
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
`CHAPTER 1: Using JavaScript and the Netscape Plug-In
`
`• RAObserver.class
`RAObserver is a Java interface for events coming from RealPlayer 5.0. Any
`object implementing this interface may register itself into RealPlayer G2
`or 5.0 to get a small set of notifications. To see how this is done, view the
`advise() function in RAPlayer.java, which is included in the ZIP file.
`
`Additional Information
`The section “CallBack Methods” beginning on page 28
`lists the RealPlayer callback events.
`
`7
`
`BTN0007218
`
`11
`
`
`
` Chapter 2: USING VBSCRIPT AND THE ACTIVEX
`CONTROL
`
`2
`
`You can use VBScript with the RealPlayer G2 ActiveX control to
`provide playback capabilities within these products:
`
`• Internet Explorer 3.0 and 4.0
`
`• Any application that supports ActiveX controls, such as Visual Basic,
`Visual C++, Microsoft Access, and so on.
`
`Additional Information
`RealSystem G2 Production Guide available at http://
`service.real.com/help/library/index.html explains
`the basics of embedding a presentation with the ActiveX
`Control.
`
`Using RealPlayer Methods through VBScript
`To extend RealPlayer’s ActiveX functionality on Internet Explorer, you first
`embed the source file in an HTML page with the <OBJECT> tag:
`<OBJECT ID=RVOCX CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
`WIDTH=220 HEIGHT=180>
`<PARAM NAME="SRC" VALUE="rtsp://realserver.company.com/media/animate.swf">
`<PARAM NAME="CONSOLE" VALUE="one">
`<PARAM NAME="CONTROLS" VALUE="ImageWindow">
`<PARAM NAME="BACKGROUNDCOLOR" VALUE="white">
`<PARAM NAME="CENTER" VALUE="true">
`</OBJECT>
`
`In the <OBJECT> tag, the ID parameter identifies the embedded clip for
`reference by VBScript parameters.
`You can then use VBScript to issue RealPlayer commands to control the
`embedded presentation. The following example shows a simple form that
`provides a Play, Pause, and Stop button for the embedded presentation.
`
`8
`
`BTN0007219
`
`12
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
`CHAPTER 2: Using VBScript and the ActiveX Control
`
`<FORM>
`<input TYPE="button" VALUE="Play" NAME="doplay">
` <script LANGUAGE="VBScript" FOR="doplay" EVENT="onClick">
` RVOCX.DoPlay
` </script>
`<input TYPE="button" VALUE="Pause" NAME="pause">
` <script LANGUAGE="VBScript" FOR="pause" EVENT="onClick">
` RVOCX.DoPause
` </script>
`<input TYPE="button" VALUE="Stop" NAME="stop">
` <script LANGUAGE="VBScript" FOR="stop" EVENT="onClick">
` RVOCX.DoStop
` </script>
`</FORM>
`
`Additional Information
`The section “Methods” beginning on page 12 lists the
`RealPlayer methods.
`
`Handling URLs through <OBJECT>
`You can use the AUTOGOTOURL parameter in the <OBJECT> tag to determine how
`URLs in the presentation are handled. The default value of true applies if you
`leave the parameter out. In this case any URL embedded in the presentation
`goes to the browser. If you set this parameter to false, RealPlayer sends the
`URL to the application with the OnGotoURL() call.
`
`Note
`The SetAutoGoToURL() method (see page 15) can override
`the AUTOGOTOURL parameter.
`
`Using PREFETCH with <OBJECT>
`The PREFETCH parameter causes RealPlayer G2 to get the stream description
`information before the stream starts. You can use this to find out the size and
`width of an embedded clip, for example, then dynamically create the <OBJECT>
`tag for the image window, using the clip’s native size for the WIDTH and HEIGHT
`parameters. To do this, you would embed a control, such as the default control
`panel, and set PREFETCH to true:
`
`9
`
`BTN0007220
`
`13
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
`CHAPTER 2: Using VBScript and the ActiveX Control
`
`<OBJECT ID=RVOCX CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
`WIDTH=400 HEIGHT=100>
`<PARAM NAME="SRC" VALUE="rtsp://realserver.company.com/media/animate.swf">
`<PARAM NAME="CONSOLE" VALUE="one">
`<PARAM NAME="CONTROLS" VALUE="All">
`<PARAM NAME="PREFETCH" VALUE="true">
`</OBJECT>
`
`The control fetches the stream information, then responds with the callback
`OnPreFetchComplete() (see page 31). You next use GetClipWidth() and
`GetClipHeight() (see page 18) to determine the native size of the image window.
`Through a means such as DHTML, you can then create the image window
`control. If the width and height were 320 by 240, respectively, you could
`generate an <OBJECT> tag like the following:
`<OBJECT ID=RVOCX CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
`WIDTH=320 HEIGHT=240>
`<PARAM NAME="SRC" VALUE="rtsp://realserver.company.com/media/animate.swf">
`<PARAM NAME="CONSOLE" VALUE="one">
`<PARAM NAME="CONTROLS" VALUE="ImageWindow">
`</OBJECT>
`
`Receiving Callbacks
`To receive callbacks through VBScript, you use the <OBJECT> tag ID, shown
`here set to RVOCX:
`<OBJECT ID=RVOCX HEIGHT=256 WIDTH=256>
` CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
`<PARAM NAME="controls" VALUE="all">
`<PARAM NAME="SRC" VALUE="http://www.company.com/sample.ram">
`</OBJECT>
`
`You then use a <SCRIPT> tag to receive a VBScript callback. The following
`example shows a callback for onShowStatus(statusText):
`<P>
`Status Text:
`<input type="text" name="statusText" size=100><br>
`</P>
`<SCRIPT language="VBS">
`Sub RVOCX_OnShowStatus(byVal text)
` statusText.Value=text
`End Sub
`</SCRIPT>
`
`10
`
`BTN0007221
`
`14
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
`CHAPTER 2: Using VBScript and the ActiveX Control
`
`Additional Information
`The section “CallBack Methods” beginning on page 28
`lists the RealPlayer callback events.
`
`11
`
`BTN0007222
`
`15
`
`
`
` Chapter 3: METHODS
`
`3
`
`An application, applet, or control can use the following methods to
`communicate with RealPlayer G2. For method data types, refer to
`RAPlayer.java, included in the rpcl3260.zip file installed in the RealPlayer
`folder. RealPlayer 5.0 supports a limited set of these methods as
`described in “RealPlayer 5.0 Compatibility” on page 27.
`
`Playback Commands
`
`DDDDooooPPPPllllaaaayyyy(((())))
`Plays the current clip. Equivalent to clicking the Play button.
`
`CCCCananananPPPPllllaaaayyyy(((())))
`Returns TRUE or FALSE. Returns TRUE if the player is currently paused or
`stopped, and current source file is valid.
`
`DDDDooooSSSSttttoooopppp(((())))
`Stops the clip. Equivalent to clicking the Stop button. This method is
`backwards-compatible with RealPlayer 5.0.
`
`CCCCananananSSSSttttopopopop(((())))
`Returns TRUE if RealPlayer is currently playing a clip or is paused. This method
`is backwards-compatible with RealPlayer 5.0.
`
`DDDDooooPPPPauauauausssseeee(((())))
`Pauses the current clip. Equivalent to clicking the Pause button.
`
`CCCCananananPPPPauauauausssseeee(((())))
`Returns TRUE if the player is currently playing a clip.
`
`12
`
`BTN0007223
`
`16
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
`CHAPTER 3: Methods
`
`CCCCananananPPPPllllaaaayyyyPPPPauauauausssseeee(((())))
`Returns TRUE if the player is currently playing, paused, or stopped, and current
`source file is valid. Backwards-compatible with RealPlayer 5.0. If supporting
`only RealPlayer G2, use CanPause() and CanPlay() instead.
`
`DDDDooooPPPPllllaaaayyyyPPPPauauauausssseeee(((())))
`Plays or pauses the current clip. Backwards-compatible with RealPlayer 5.0. If
`supporting only RealPlayer G2, use DoPause() and DoPlay() instead.
`
`PlayState Information
`
`GGGGeeeettttPPPPllllaaaayyyySSSSttttaaaatttteeee(((())))
`Returns the current state of the RealPlayer. Values are numerical, with the
`following meanings:
`0 Stopped
`1 Contacting
`2 Buffering
`3 Playing
`4 Paused
`5 Seeking
`
`GGGGeeeettttBBBBuuuuffffffffeeeerrrriiiinnnnggggTTTTiiiimmmmeeeeEEEEllllaaaappppsssseeeedddd(((())))
`Returns number of milliseconds of elapsed buffering time.
`
`Note
`The GetBufferingtimeElapsed() method is not currently
`supported. It will be supported in an upcoming release.
`
`GGGGeeeettttBBBBuuuuffffffffeeeerrrriiiinnnnggggTTTTiiiimmmmeeeeRRRReeeemmmmaaaaiiiinnnniiiinnnngggg(((())))
`Returns estimated remaining buffering time in milliseconds.
`
`Attributes
`
`GGGGeeeettttPPPPrrrreeeeFFFFeeeettttcccchhhh()()()()
`Returns whether or not PreFetch is enabled.
`
`SSSSeeeettttPPPPrrrreeeeFFFFeeeettttcccchhhh(((())))
`Enables/disables PreFetch playback mode. Valid values are TRUE and FALSE with
`FALSE as the default.
`
`13
`
`BTN0007224
`
`17
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
`CHAPTER 3: Methods
`
`Additional Information
`See “Using PREFETCH with <EMBED>” on page 5 or
`“Using PREFETCH with <OBJECT>” on page 9.
`
`GGGGeeeettttCCCCoooonnnnttttrrrroooollllssss(((())))
`Returns the visible components of the control.
`
`Additional Information
`For valid control names, see the chapter on Web page
`playback in RealSystem G2 Production Guide at http://
`service.real.com/help/library/index.html.
`
`SSSSeeeettttCCCCoooonnnnttttrrrroooollllssss(((())))
`Sets the visible components of the control. Compatible only with RealPlayer
`G2.
`
`SSSSeeeettttCCCCoooonnnnttttrrrroooollllSSSSttttrrrriiiinnnngggg(((())))
`Sets the visible components of the control. Method is identical to
`SetControls(), but is compatible with RealPlayer 5.0 Netscape Plug-in (though
`not the 5.0 ActiveX control). If supporting only RealPlayer G2, use
`SetControls() instead.
`
`GGGGeeeettttCCCCoooonnnnssssoooolllleeee(((())))
`Returns a console name used to link multiple control instances. Call this
`function once for each instance of a control you want to link.
`
`SSSSeeeettttCCCCoooonnnnssssoooolllleeee(((())))
`Sets a console name used to link multiple control instances. Call this once for
`each instance of a control you want to link. All controls with the same console
`name work together. For example, if you have multiple Play and Stop buttons
`on the same page, a shared console name enables them to control the same
`clip. The console name _master links to all instances. The console name
`_unique links to no other instances.
`
`SSSSeeeettttCCCCoooonnnnssssoooolllleeeeNaNaNaNammmmeeee(((())))
`Functionally identical to SetConsole(), but backwards-compatible with
`RealPlayer 5.0 Netscape plug-in (though not the 5.0 ActiveX control). If
`supporting only RealPlayer G2, use SetConsole() instead.
`
`14
`
`BTN0007225
`
`18
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
`CHAPTER 3: Methods
`
`SSSSeeeettttAAAAuuuuttttooooSSSSttttaaaarrrrtttt((((bbbboooooooolllleeeean auan auan auan auttttooooSSSSttttaaaarrrrtttt))))
`
`
`
`Sets whether or not the control automatically starts playing once the source
`data is available. Valid values are TRUE and FALSE. This method is compatible
`with the RealPlayer 5.0 Netscape Plug-in but not its ActiveX control.
`
`GGGGeeeettttAAAAuuuuttttooooSSSSttttaaaarrrrtttt()()()()
`Returns whether or not playback will start automatically.
`
`SSSSeeeettttAAAAuuuuttttooooGGGGooooTTTTooooUUUURRRRLLLL(((())))
`Specifies how a URL will be handled. This method is backwards-compatible
`with RealPlayer 5.0. Valid values are:
`
`• TRUE
`RealPlayer plug-in automatically forwards URL event to browser.
`
`• FALSE
`onGoToURL() event handled by Java applet or VBScript instead.
`
`Additional Information
`With RealPlayer G2, this can also be set with the
`AUTOGOTOURL parameter in the <EMBED> or <OBJECT> tag.
`See “Handling URLs through <EMBED>” on page 5 or
`“Handling URLs through <OBJECT>” on page 9.
`
`GGGGeeeettttAAAAuuuuttttooooGGGGoooottttooooUUUURRRRLLLL(((())))
`Returns whether or not AutoGotoURL property is enabled.
`
`DDDDooooGGGGooooTTTTooooUUUURRRRLLLL((((uuuurrrrllll, , , , ttttaaaarrrrggggeeeetttt))))
`For the RealPlayer 5.0 and G2 ActiveX control only, this method causes the
`control to attempt a navigation to the specified URL in the specified frame
`target. The container must support URL browsing. Parameters are:
`string URL
`
`string target
`
`SSSSeeeettttLLLLooooopopopop(((())))
`Specifies whether the clip will loop or not. Valid values are TRUE (loops until
`play is interrupted) and FALSE (default).
`
`GGGGeeeettttLLLLoooooooopppp(((())))
`Returns whether the clip has been set to loop.
`
`15
`
`BTN0007226
`
`19
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
`CHAPTER 3: Methods
`
`SSSSeeeettttNuNuNuNummmmLLLLooooopopopop(((())))
`Sets number of times to loop the clip. Takes an integer as its parameter.
`
`GGGGeeeettttNuNuNuNummmmLLLLooooopopopop(((())))
`Returns number of loops set in SetNumLoop().
`
`SSSSeeeettttCCCCeeeennnntttteeeerrrr(((())))
`Sets whether or not the visual datatype should be centered at its natural size
`within the image window. Valid values are TRUE and FALSE (default).
`
`GGGGeeeettttCCCCeeeennnntttteeeerrrr(((())))
`Returns whether or not the visual datatype will be centered within the image
`window. Valid values are TRUE and FALSE.
`
`SSSSeeeettttMMMMaaaaiiiinnnnttttaaaaiiiinnnnAAAAssssppppeeeecccctttt(((())))
`Maintains correct aspect ratio of source within image window when stretched.
`Valid values are TRUE and FALSE (default).
`
`GGGGeeeettttMMMMaaaaiiiinnnnttttaaaaiiiinnnnAAAAssssppppeeeecccctttt(((())))
`Returns whether or not the aspect ratio of the visual datatype will be
`maintained.
`
`SSSSeeeettttBBBBaaaacccckkkkggggrrrrooooununununddddCCCCoooolllloooorrrr(((())))
`Specifies the desired background color for the image window control. Valid
`values are a RGB hexadecimal color value in the format #RRGGBB, or the
`following color names, shown here with their corresponding RGB values:
`
`white (#FFFFFF)
`yellow (#FFFF00)
`lime (#00FF00)
`aqua (#00FFFF)
`
`silver (#C0C0C0)
`fuchsia (#FF00FF)
`olive (#808000)
`teal (#008080)
`
`gray (#808080)
`red (#FF0000)
`green (#008000)
`blue (#0000FF)
`
`black (#000000)
`maroon (#800000)
`purple (#800080)
`navy (#000080)
`
`GGGGeeeettttBBBBaaaacccckkkkggggrrrrooooununununddddCCCCoooolllloooorrrr(((())))
`Returns hexadecimal value for current background color.
`
`SSSSeeeettttNNNNooooLLLLooooggggoooo(((())))
`Determines whether to suppress the display of RealLogo in image window
`control. Image window defaults to black unless a background color has been
`specified. Valid values are TRUE and FALSE (default).
`
`GGGGeeeettttNNNNooooLLLLooooggggoooo()()()()
`Returns whether or not the RealLogo will be displayed in the image window.
`
`16
`
`BTN0007227
`
`20
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
`CHAPTER 3: Methods
`
`SSSSeeeettttNNNNooooLLLLaaaabbbbeeeellllssss(((())))
`Suppresses the Title, Author, and Copyright label text in the controls window
`of RealPlayer 5.0. The content text strings are still displayed. This method
`does not affect RealPlayer G2 but is compatible with it.
`
`GGGGeeeettttNNNNooooLLLLaaaabbbbeeeellllssss(((())))
`Returns whether or not Title, Author, and Copyright labels will be suppressed.
`
`SSSSeeeettttSSSShuhuhuhufffffffflllleeee(((())))
`Randomizes playback of all clips, excluding clips that have already played.
`Works for multiclip RAM files (.ram or .rpm) or SMIL files that contain only a
`sequence of clips. Valid values are TRUE and FALSE.
`
`GGGGeeeettttSSSShuhuhuhufffffffflllleeee(((())))
`Returns whether shuffle play is enabled.
`
`SSSSeeeettttSSSSoooouuuurrrrcccceeee((((SSSSttttrrrriiiinnnng g g g SSSSoooouuuurrrrcccceeee))))
`Specifies the URL of the clip to play. The source URL can begin with rtsp://,
`http://, pnm://, or file://. This method is backwards-compatible with the
`RealPlayer 5.0 Netscape plug-in, though not the 5.0 ActiveX control.
`
`GGGGeeeettttSSSSoooouuuurrrrcccceeee(((())))
`Returns the URL of the playing clip.
`
`SSSSeeeettttCCCCananananSSSSeeeeeeeekkkk(((())))
`Sets whether the user can seek within the clip through the user interface. Valid
`values are TRUE (default) and FALSE. Live or simulated live clips are always
`FALSE.
`
`GGGGeeeettttCCCCananananSSSSeeeeeeeekkkk(((())))
`Live or simulated live clips return FALSE.
`
`Clip Position
`
`GGGGeeeettttPPPPoooossssiiiittttiiiioooonnnn(((())))
`Returns the current position in the clip in milliseconds. Valid values will be
`>=0 and <=total clip length.
`
`SSSSeeeettttPPPPoooossssiiiittttiiiioooonnnn(((())))
`Seeks into the clip the specified point in milliseconds. Valid values are =0 and
`<total clip length.
`
`17
`
`BTN0007228
`
`21
`
`
`
`Embedded RealPlayer Extended Functionality Guide
`
`CHAPTER 3: Methods
`
`If an attempt is made to set the position >total length, then SetPosition() will
`equal total length.
`
`GGGGeeeettttLLLLeeeennnnggggtttthhhh(((())))
`Returns the total length of the clip in milliseconds. Valid values are >=0.
`
`Clip/TAC Information
`
`GGGGeeeettttTTTTiiiittttlllleeee(((())))
`Returns the current clip's title string.
`
`SSSSeeeettttTTTTiiiittttlllleeee(((())))
`Sets the current clip's title string, overriding any existing title information.
`GetTitle() subsequently returns this new value.
`
`GGGGeeeettttAAAAuuuutttthhhhoooorrrr(((())))
`Returns the current clip's author string.
`
`SSSSeeeettttAAAAuuuutttthhhhoooorrrr()()()()
`Sets the current clip's author string, overriding any existing author
`information. GetAuthor() subsequently returns this new value.
`
`GGGGeeeettttCCCCooooppppyyyyrrrriiiigggghhhhtttt(((())))
`Returns the current clip's copyright string.
`
`SSSSeeeettttCCCCopopopopyyyyrrrriiiigggghhhhtttt(((())))
`Sets the current