previous next

Appendix A: Methods

An application, applet, or control can use the methods described in this chapter to communicate with RealPlayer. The methods are listed here in alphabetical order and each description contains information about how to use the method in your Netscpae plug-in or ActiveX control, an example of syntax and usage, and backward compatibilty tips for various API versions.

For More Information: For information about categories of methods, such as those used to control playback of your presentation, see Chapter 2 "Using Methods and Callbacks".

Many of the methods listed below return a boolean value for plug-ins. Plug-in developers can safely ignore the boolean value since it should always return true. This value will only be false if some serious error occurs with the plug-in. Therefore, if you are having problems getting your script to work, you might want to check this return value.

AboutBox

Although this method is obsolete, backward-compatibility is supported for RealPlayer versions 5.0 and later. It is strongly recommended that you use ActiveX OnlySetShowAbout in lieu of this function.

CanPlayPause

Although this method is obsolete, backward-compatibility is supported for RealPlayer versions 5.0 and later. It is strongly recommended that you use CanPause and CanPlay in lieu of this function.

CanPause

Indicates whether the player is currently playing a clip that can be paused.

CanPause(void)

Returns true if the player is currently playing a clip. Returns false if the player is already pause or is stopped.

CanPlay

Indicates whether the player is currently paused or stopped, or is currently playing.

CanPlay(void)

Returns true if the player is currently paused or stopped, and current source file is valid. Returns false if the player is currently playing.

CanStop

Indicates whether the the current clip is playing or paused, or the clip is already stopped. This method is compatible with RealPlayer version 5.0 and later.

CanStop(void)

Returns true if RealPlayer is currently playing a clip or is paused. Returns false if the clip is already stopped.

DoGotoURL

Causes the control to attempt a navigation to the specified URL in the specified frame target. The container must support URL browsing. This method is backward-compatible with ActiveX controls built with RealPlayer version 5.0 or later, but not compatible with version 5.0 Netscape plug-ins.

DoGotoURL(string url, string target)
url
The URL to which to navigate.

target
The frame target to which to navigate.

The target parameter is required in order to use this function, but the value of the parameter is ignored.

Returns void.

DoNextItem

Although this method is obsolete, backward-compatibility is supported for RealPlayer versions 5.0 and later. It is strongly recommended that you use DoNextEntry in lieu of this function.

DoNextEntry

Skips to the next clip in the RAM (.ram or .rpm) or SMIL file that contains multiple clips. In a SMIL file, a <par> group is treated as a single clip.

DoNextEntry(void)

Returns a boolean value for plug-ins.

DoPlayPause

Although this method is obsolete, backward-compatibility is supported for RealPlayer versions 5.0 and later. It is strongly recommended that you use DoPause and DoPlay in lieu of this function.

DoPause

Pauses the current clip. Equivalent to clicking the Pause button.

DoPause(void)

Returns a boolean value for plug-ins.

DoPlay

Plays the current clip. Equivalent to clicking the Play button.

DoPlay(void)

Returns a boolean value for plug-ins.

DoPrevItem

Although this method is obsolete, backward-compatibility is supported for RealPlayer versions 5.0 and later. It is strongly recommended that you use DoPrevEntry in lieu of this function.

DoPrevEntry

Skips to the previous clip in a RAM (.ram or .rpm) or SMIL file that contains multiple clips. In a SMIL file, a <par> group is treated as a single clip.

DoPrevEntry(void)

Returns a boolean value for plug-ins.

DoStop

Stops the clip. Equivalent to clicking the Stop button. This method is compatible with RealPlayer version 5.0 and later.

DoStop(void)

Returns a boolean value for plug-ins.

EditPreferences

Although this method is obsolete, backward-compatibility is supported for RealPlayer versions 5.0 and later. It is strongly recommended that you use SetShowPreferences in lieu of this function.

GetAuthor

Indicates the current clip's author string.

GetAuthor(void)

Returns a string that contains the current clip's author.

GetAutoGoToURL

Indicates whether or not the AutoGoToURL setting is enabled.

GetAutoGoToURL(void)

Warning! The use of this method varies slightly between programming languages. In C++, the name of the method is GetAutoGotoURL, while in Java, the name is GetAutoGoToURL. Either name may be used when developing in JavaScript or VBScript.

Returns true if the setting is enabled. Returns false if the setting is disabled.

GetAutoStart

Indicates whether or not playback will start automatically.

GetAutoStart(void)

Returns true if playback will start automatically. Returns false if the playback will not be started automatically.

GetBackgroundColor

Indicates the hexadecimal value for the current background color for the image window.

GetBackgroundColor(void)

Returns a string that contains the RGB hexadecimal color value in the format #RRGGBB. The color names for these color values are described in SetBackgroundColor.

GetBandwidthAverage

Indicates the average amount of bandwidth used by the presentation.

GetBandwidthAverage(void)

Returns an int32 that contains the average bandwidth, in bits per second, of the packet transfer from the beginning of the playback to the current time.

GetBandwidthCurrent

Indicates the current amount of bandwidth being used by the presentation.

GetBandwidthCurrent(void)

Returns an int32 that contains the current bandwidth in bits per second.

GetBufferingTimeElapsed

Indicates the current elapsed buffering time.

GetBufferingTimeElapsed(void)

Returns an int32 that contains the number of milliseconds of elapsed buffering time.

GetBufferingTimeRemaining

Indicates the estimated remaining buffering time.

GetBufferingTimeRemaining(void)

Returns an int32 that contains the estimated remaining buffering time in milliseconds.

GetCanSeek

Indicates whether the user can seek within the clip through the user interface.

GetCanSeek(void)

Returns true if the user can seek within the clip. Returns false if the user cannot seek within the clip. Live or simulated live clips always return false.

GetCenter

Indicates whether or not the visual datatype will be centered within the image window.

GetCenter(void)

Returns true if the visual datatype is centered in the image window. Returns false (default) if the datatype is not centered.

GetClipHeight

Indicates the height of the presentation.

GetClipHeight(void)

Returns an int32 that contains the height of the clip window, in pixels. A value of 0 is returned when the presentation is not visual.

GetClipWidth

Indicates the width of the presentation.

GetClipWidth(void)

Returns an int32 that contains the width of the clip window, in pixels. A value of 0 is returned when the presentation is not visual.

GetConnectionBandwidth

Indicates the normal, maximum bandwidth settings as set by the user in the RealPlayer preferences.

GetConnectionBandwidth(void)

Returns an int32 that contains the maximum bandwidth setting, in bits per second, from the Connections tab of the RealPlayer Preferences dialog.

GetConsole

Indicates a console name used to link multiple control instances.

GetConsole(void)

Returns a string that contains the name of the RealPlayer console currently associated with the embedded control.

GetConsoleEvents

Indicates whether console events are enabled.

GetConsoleEvents(void)

Returns true if console events are enabled. Returns false if console events are disabled.

For More Information: See "Event Handling"for an explanation of console events.

GetControls

Indicates the name of the visible components of the RealPlayer control.

GetControls(void)

Returns a string that contains the name of the RealPlayer control currently associated with the name or ID of the embedded control.

For More Information: For valid control names, see the chapter on Web page playback in RealSystem G2 Production Guide at http://service.real.com/help/library/encoders.html.

GetCopyright

Indicates the current clip's copyright string.

GetCopyright(void)

Returns a string that contains the current clip's copyright information.

GetCurrentEntry

Indicates the number of the entry currently playing.

GetCurrentEntry(void)

Returns an int32 that contains the number of the entry currently playing. The current entry number of the first entry is "0".

Warning! The use of this method varies slightly between programming languages. In C++, this function returns an int16, while in Java, an int32 value is returned. Either integer type may be used when developing in JavaScript or VBScript.

string GetDRMInfo

This method is used in conjunction with the RealNetworks digital rights management systems. The returned string provides necessary client information that is used by the license server to generate content licenses for a particular unique user.

GetDRMInfo (4-letter product identifier)
Returns a string.
where the product acronym is:
RNBA for use with the Media Commerce Suite

The returned string is in the following form (line breaks are for readability only):

ClientPubKey=<ClientPubKey>

&Challenge=<Challenge>

&ExtraInfo=<ExtraInfo>


Note: This method is available only in Embedded RealPlayer builds 6.0.8.1024 and later.

GetDoubleSize

Indicates whether or not the image is currently in double-size mode.

GetDoubleSize(void)

Returns true if the image is double size. Returns false if the image is not double size.

Note: This method is included only for ActiveX controls and plug-ins used in applications; this method is not intended for use in web pages.

GetEnableContextMenu

Indicates whether or not the context menu is currently enabled.

GetEnableContextMenu(void)

Returns true (default) if the context menu is enabled. Returns false if the context menu is disabled.

GetEnableDoubleSize

Indicates whether or not the double size selection is enabled in the Zoom item of the context menu.

GetEnableDoubleSize(void)

Returns true if the double size selection is enabled. Returns false (default) if the double size selection is disabled.

GetEnableFullScreen

Indicates whether or not the full screen selection is enabled in Zoom item of the context menu.

GetEnableFullScreen(void)

Returns true (default) if the full screen selection is enabled. Returns false if the full screen selection is disabled.

Netscape and ActiveXGetEnableOriginalSize

Indicates whether the original size selection is enabled in the Zoom item of the context menu.

GetEnableOriginalSize(void)

Returns true (default) if the original size option is enabled. Returns false if the original size option is disabled.

GetEntryAbstract

Indicates the abstract for the specified playlist entry.

GetEntryAbstract(int32 entry_index)
entry_index
The entry number of the clip in the playlist for which the abstract is being requested. The entry number for the first clip in the playlist is "0".

Warning! The use of this method varies slightly between programming languages. In C++, this function requires an int16 parameter, while in Java, an int32 parameter is required. Either integer type may be used when developing in JavaScript or VBScript.

Returns a string that contains the abstract for the specified playlist entry.

GetEntryAuthor

Indicates the author for the specified playlist entry.

GetEntryAuthor(int32 entry_index)
entry_index
The entry number of the clip in the playlist for which the author is being requested. The entry number for the first clip in the playlist is "0".

Warning! The use of this method varies slightly between programming languages. In C++, this function requires an int16 parameter, while in Java, an int32 parameter is required. Either integer type may be used when developing in JavaScript or VBScript.

Returns a string that contains the author for the specified playlist entry.

GetEntryCopyright

Indicates the copyright for the specified playlist entry.

GetEntryCopyright(int32 entry_index)
entry_index
The entry number of the clip in the playlist for which the copyright is being requested. The entry number for the first clip in the playlist is "0".

Warning! The use of this method varies slightly between programming languages. In C++, this function requires an int16 parameter, while in Java, an int32 parameter is required. Either integer type may be used when developing in JavaScript or VBScript.

Returns a string that contains the copyright for the specified playlist entry.

GetEntryTitle

Indicates the title for the specified playlist entry.

GetEntryTitle(int32 entry_index)
entry_index
The entry number of the clip in the playlist for which the title is being requested. The entry number for the first clip in the playlist is "0".

Warning! The use of this method varies slightly between programming languages. In C++, this function requires an int16 parameter, while in Java, an int32 parameter is required. Either integer type may be used when developing in JavaScript or VBScript.

Returns a string that contains the title for the specified playlist entry.

GetFullScreen

Indicates whether or not the image is currently in full-screen mode.

GetFullScreen(void)

Returns true if the image is in full-screen mode. Returns false if the image is not in full-screen mode.

GetImageStatus

Indicates whether the status text is written to the image window.

GetImageStatus(void)

Returns true (default) if the status text is written to the image window. Returns false if the status text is not sent.

GetIsPlus

Indicates whether the client is a basic RealPlayer or RealPlayer Plus.

GetIsPlus(void)

Returns true if the client is RealPlayer Plus. Returns false if the client is the basic RealPlayer.

GetLastErrorMoreInfoURL

Provides the "more info" URL from the last error.

GetLastErrorMoreInfoURL(void)

Returns a string that contains the "more info" URL. This method may return nothing (for example, if there is no "more info" URL).

GetLastErrorRMACode

Gets the RMA error code from the last error. RMA error codes are described in the header file pnresult.h in the RealSystem G2 SDK available at http://www.realnetworks.com/devzone/. In normal operation, all RealSystem components need to be able to handle the following basic codes that may be returned by the RealSystem system:

GetLastErrorRMACode(void)

Returns an int32 that contains the error code value.

Netscape and ActiveXGetLastErrorSeverity

Indicates the error level for the last error.

GetLastErrorSeverity(void)

Returns an int32 that contains the error level.

Warning! The use of this method varies slightly between programming languages. In C++, this function returns an int16, while in Java, an int32 value is returned. Either integer type may be used when developing in JavaScript or VBScript.

Error levels consist of the following:

Error Levels
Level Condition Usage
0 Panic Error potentially causing a system failure. RealSystem takes actions necessary to correct the problem. This may include shutting down the presentation.
1 Severe Error requiring immediate user intervention to prevent a problem. RealSystem will shut down the presentation if necessary.
2 Critical Error that may require user intervention to correct. RealSystem will shut down the presentation if necessary.
3 General Error that does not cause a significant problem with normal system operation.
4 Warning Warning about a condition that does not cause system problems but may require attention.
5 Notice Notice about a condition that does not cause system problems but should be noted.
6 Informational Informational message only.
7 Debug Information of use only when debugging a program.

GetLastErrorUserCode

Indicates the user error code from the last error.

GetLastErrorUserCode(void)

Returns an int32 that contains the user error code. This method will always return 0 unless you are using a custom plug-in that provides its own user- defined error codes for error events.

GetLastErrorUserString

Gets the error string from the last error dialog.

GetLastErrorUserString(void)

Returns a string that contains the last error message. This method will return nothing unless you are using a custom plug-in that provides its own user- defined error strings for error events.

Netscape OnlyGetLastMessage

Gets the text of the last status message that was returned by the OnShowStatus callback method.

Note: This method is intended for a Netscape plug-in only. If you are coding an ActiveX control, use the Netscape OnlyGetLastMessage method instead.

GetLastMessage(void)

Returns a string that contains the last status message.

GetLastStatus

Gets the text of the last status message that was returned by the OnShowStatus callback method.

Note: This method is intended for an ActiveX control only. If you are coding a Netscape plug-in, use the GetLastStatus method instead.

GetLastStatus(void)

Returns a string that contains the last status message.

GetLength

Indicates the total length of the clip.

GetLength(void)

Returns an int32 that contains the total length of the clip, in milliseconds. Valid values are >=0.

GetLiveState

Indicates whether the current clip is live.

GetLiveState(void)

Returns true if the current clip is live. Returns false if the current clip is not live.

GetLoop

Indicates whether the clip has been set to loop.

GetLoop(void)

Returns true if the clip has been set to loop until play is interrupted. Returns false if the clip does not loop (default).

GetMaintainAspect

Indicates whether or not the aspect ratio of the visual datatype will be maintained.

GetMaintainAspect(void)

Returns true if the aspect ratio of the visual datatype is maintained. Returns false (default) if the aspect ratio changes when the image window is stretched.

GetMute

Indicates whether or not the volume has been muted.

GetMute(void)

Returns true if the volume is muted. Returns false if the volume is not muted.

GetNoLabels

Although this method is obsolete, backward-compatibility is supported for RealPlayer versions 5.0 and later.

GetNoLogo

Indicates whether or not the Real logo will be displayed in the image window.

GetNoLogo(void)

Returns true if the Real logo is not displayed in the image window. Returns false (default) if the Real logo is displayed in the image window.

GetNumEntries

Indicates the total number of entries in the playlist.

GetNumEntries(void)

Warning! The use of this method varies slightly between programming languages. In C++, this function returns an int16, while in Java, an int32 value is returned. Either integer type may be used when developing in JavaScript or VBScript.

Returns an int32 that contains the total number of entries in the playlist. The entry number for a single entry is "1".

GetNumLoop

Indicates the number of times the clip is set to loop.

GetNumLoop(void)

Returns an int32 that indicates the number of times the clip has been set to loop by SetNumLoop.

GetNumSources

Indicates the number of sources in the presentation.

GetNumSources(void)

Warning! The use of this method varies slightly between programming languages. In C++, this function returns an int16, while in Java, an int32 value is returned. Either integer type may be used when developing in JavaScript or VBScript.

Returns an int32 that contains the number of sources in the presentation.

GetOriginalSize

Indicates whether the image is currently in its original size.

GetOriginalSize(void)

Returns true if the image is its original size. Returns false if the image is not its original size.

GetPacketsEarly

Returns the total number of packets received from the RealSystem Server before they are ready to play.

Note: This method is intended for an ActiveX control only.

GetPacketsEarly(void)

Returns an int32 that contains the number of packets that were received too early.

GetPacketsLate

Indicates the total number of packets received from the RealSystem Server that are too late to play.

GetPacketsLate(void)

Returns an int32 that contains the number of packets that were received too late.

GetPacketsMissing

Indicates the total number of packets not received from the RealSystem Server in time to play.

GetPacketsMissing(void)

Returns an int32 that contains the number of packets that were not received in time to play.

GetPacketsOutOfOrder

Indicates the total number of packets received from the RealSystem Server out of order.

GetPacketsOutOfOrder(void)

Returns an int32 that contains the total number of out of order packets.

GetPacketsReceived

Indicates the total number of packets that have currently been received from the RealSystem Server.

GetPacketsReceived(void)

Returns an int32 that contains the total number of packets received so far.

GetPacketsTotal

Indicates the total number of packets currently used by the presentation. The total number of packets reported by this method include the number of received packets plus the number of lost packets. If there are no lost packets, this method returns the same number as GetPacketsReceived.

GetPacketsTotal(void)

Returns an int32 that contains the total number of packets.

GetPlayState

Indicates the current state of the RealPlayer.

GetPlayState(void)

Returns an int32 value with the following meanings:

GetPosition

Indicates the current position in the clip.

GetPosition(void)

Returns an int32 that contains the current position in the clip, in milliseconds. Valid values are >=0 and <=total clip length.

GetPreferredLanguageID

Indicates the preferred language ID.

GetPreferredLanguageID(void)

Returns an int32 that contains the identification number of the language set in the Content tab of the RealPlayer Preferences dialog.

GetPreferredLanguageString

Indicates the preferred language for content as set by the user in the RealPlayer preferences.

GetPreferedLanguageString(void)

Returns a string that contains the preferred language. For a list of language codes, see the SMIL language codes appendix in RealSystem G2 Production Guide.

GetPreFetch

Indicates whether or not PREFETCH is enabled.

GetPreFetch(void)

Returns true if PREFETCH is enabled. Returns false if PREFETCH is not enabled.

ActiveX OnlyGetShowAbout

Indicates whether or not the About box is open.

GetShowAbout(void)

Returns true if the About dialog box is visible. Returns false if the dialog box is not visible.

GetShowPreferences

Indicates whether or not the Preferences dialog box is visible.

GetShowPreferences(void)

Returns true if the Preferences dialog box is visible. Returns false if the dialog box is not visible.

GetShowStatistics

Indicates whether or not the RealPlayer Statistics dialog box is visible.

GetShowStatistics(void)

Returns true if the RealPlayer Statistics dialog box is visible. Returns false (default) if the dialog box is not visible.

GetShuffle

Indicates whether or not shuffle play is enabled.

GetShuffle(void)

Returns true if shuffle play is enabled. Returns false if shuffle play is disabled.

GetSource

Indicates the URL of the playing clip.

GetSource(void)

Returns a string that contains the URL of the playing clip.

GetSourceTransport

Returns a string with the source protocol used for playback.

GetSourceTransport(int32 source_number)
source_number
The number of the source for which a protocol will be specified. This number can be set between 1 and n, where n is the number of sources returned by GetNumSources.

Warning! The use of this method varies slightly between programming languages. In C++, this function requires an int16 parameter, while in Java, an int32 parameter is required. Either integer type may be used when developing in JavaScript or VBScript.

Returns a string that contains the source protocol used for playback, such as UDP or TCP.

GetStereoState

Indicates whether the current clip is in stereo.

GetStereoState(void)

Returns true if the current clip is in stereo and false for monaural. This function returns a boolean value for Netscape plug-ins

GetTitle

Indicates the current clip's title string.

GetTitle(void)

Returns a string that contains the current clip's title.

GetUserCountryID

Indicates the country that the user selected during electronic registration.

GetUserCountryID(void)

Returns an int32 that contains the identification number of the user-selected country.

GetVersionInfo

Indicates major and minor version information for the Embedded RealPlayer (not the parent RealPlayer).

GetVersionInfo(void)

Returns a string, such as 6.0.0.128, that contains the version information.

Netscape OnlyGetVolume

Indicates the current volume level.

GetVolume(void)

Warning! The use of this method varies slightly between programming languages. In C++, this function returns an int16, while in Java, an int32 value is returned. Either integer type may be used when developing in JavaScript or VBScript.

Returns an int32 that contains the current volume level. The returned value will be in the range of 0 through 100.

GetWantErrors

Indicates whether error dialogs will be displayed.

GetWantErrors(void)

Returns true if error dialogs are trapped, and therefore not displayed. Returns false if the error dialogs are displayed.

GetWantKeyboardEvents

Indicates whether keyboard events are sent or not (that is, it indicates whether the OnKeyDown, OnKeyPress, and OnKeyUp callbacks are to be sent).

GetWantKeyboardEvents(void)

Returns true if the keyboard events are sent. Returns false (default) if the keyboard events are not sent.

GetWantMouseEvents

Indicates whether or not mouse events are to be sent (that is, whether the OnLButtonDown, OnLButtonUp, OnMouseMove, OnRButtonDown, and OnRButtonUp callbacks are to be sent).

GetWantMouseEvents(void)

Returns true if the mouse events are sent. Returns false (default) if the mouse events are ignored.

HasNextItem

Although this method is obsolete, backward-compatibility is supported for RealPlayer versions 5.0 and later. It is strongly recommended that you use HasNextEntry in lieu of this function.

HasNextEntry

Tests if the next clip function is available. The next clip function is available when the connected source is a RAM (.ram or .rpm) or SMIL file that contains multiple clips and the current clip is not the last clip in the RAM or SMIL file. In a SMIL file, a <par> group is treated as a single clip.

HasNextEntry(void)

Returns true if the next clip function is available. Returns false if no more clips are available after the current clip.

HasPrevItem

Although this method is obsolete, backward-compatibility is supported for RealPlayer versions 5.0 and later. It is strongly recommended that you use HasPrevEntry in lieu of this function.

HasPrevEntry

Tests if the previous clip function is available. The previous clip function is available when the connected source is a RAM (.ram or .rpm) or SMIL file that contains multiple clips and the current clip is not the first clip in the RAM file. In a SMIL file, a <par> group is treated as a single clip.

HasPrevEntry(void)

Returns true if the previous clip function is available. Returns false if the current clip is the first clip.

HideShowStatistics

Although this method is obsolete, backward-compatibility is supported for RealPlayer versions 5.0 and later. It is strongly recommended that you use SetShowStatistics in lieu of this function.

Netscape OnlyIsStatisticsVisible

Although this method is obsolete, backward-compatibility is supported for RealPlayer versions 5.0 and later. It is strongly recommended that you use GetShowStatistics in lieu of this function.

Netscape OnlyNetscape OnlySetAuthor

Sets the current clip's author string, overriding any existing author information. GetAuthor subsequently returns this new value.

SetAuthor(string new_author)
new_author
The author string to be set. This author string overrides all subsequent author information in a multiclip presentation.

Returns a boolean value for plug-ins.

SetAutoGoToURL

Specifies how a URL will be handled. This method is compatible with RealPlayer version 5.0 and later.

SetAutoGoToURL(boolean enable_start)

Warning! The use of this method varies slightly between programming languages. In C++, the name of the method is SetAutoGotoURL, while in Java, the name is SetAutoGoToURL. Either name may be used when developing in JavaScript or VBScript.

enable_start
If set to true, a RealPlay plug-in automatically forwards the URL event to the browser. If set to false, the onGoToURL event is handled by a Java applet or VBScript instead.

For More Information: Beginning with RealPlayer G2, this can also be set with the AUTOGOTOURL parameter in the <EMBED> or <OBJECT> tag.

Returns a boolean value for plug-ins.

SetAutoStart

Sets whether or not the control automatically starts playing once the source data is available. This method is backward-compatible with Netscape plug-ins and ActiveX controls built with RealPlayer version 5.0 or later.

For More Information: If you are developing a Netscape plug-in in RealPlayer version 5.0 or later, you can also use the AUTOSTART parameter to specify automatic playback in the tag definition.

SetAutoStart(boolean auto_start)
auto_start
If set to true, the control automatically starts playing once the source data is available. If set to false, the control does not automatically start playing.

Returns a boolean value for plug-ins.

SetBackgroundColor

Specifies the desired background color for the image window control.

For More Information: You can also use the BACKGROUNDCOLOR parameter to specify the background color of the image window in the tag definition.

SetBackgroundColor(string color)
color
The background color of the image window control. Valid values are an RGB hexadecimal color value in the format #RRGGBB, or the following color names, shown here with their corresponding RGB values:

white (#FFFFFF)silver (#C0C0C0)gray (#808080)black (#000000)
yellow (#FFFF00)fuchsia (#FF00FF)red (#FF0000)maroon (#800000)
lime (#00FF00)olive (#808000)green (#008000)purple (#800080)
aqua (#00FFFF)teal (#008080)blue (#0000FF)navy (#000080)

Returns a boolean value for plug-ins.

SetCanSeek

Sets whether the user can seek within the clip through the user interface.

SetCanSeek(boolean can_seek)
can_seek
If set to true (default), the user can seek within the clip. If set to false, the user cannot seek within the clip. This function cannot be used to establish seeking ability for a live or simulated live clip.

Returns a boolean value for plug-ins.

SetCenter

Sets whether or not the visual datatype should be centered at its natural size within the image window.

For More Information: You can also use the CENTER parameter to specify that the presentation should be centered in the image window, in the tag definition.

SetCenter(boolean value)
value
If set to true, the visual datatype is centered in the image window at its natural size. If set to false (default), the visual datatype's height and width is expanded to fill the image window.

Note: The SetCenter and SetMaintainAspect methods cannot both be set to true. Therefore, if you have set the set parameter of the SetMaintainAspect method to true, the value parameter of the SetCenter method must be set to false.

Returns a boolean value for plug-ins.

SetConsoleName

This method is backward-compatible with Netscape plug-ins built with RealPlayer version 5.0 or later, but not compatible with version 5.0 ActiveX controls. It is strongly recommended that you use SetConsole in lieu of this function.

SetConsole

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.

For More Information: You can also use the CONSOLE parameter to specify whether your controls are linked in the tag definition. For more information about linking multiple controls, see the RealSystem Production Guide.

SetConsole(string console)
console
The name of the console to be set. This name must be associated with the unique name or ID for each embedded control you want to link. For example:

document.playcontrol.SetConsole("console1") — JavaScript

Document.playcontrol.SetConsole("console1") — VBScript

Returns a boolean value for plug-ins.

SetConsoleEvents

Sets whether or not console events are enabled. This method is included to provide more control of callbacks in plug-ins.

This method does not affect ActiveX controls.

SetConsoleEvents(boolean value)
value
If set to true, events from any plug-in are sent to the applet. If set to false, only the plug-in to which the console connects will send events.

Returns a boolean value for plug-ins.

For More Information: See "Event Handling" for an explanation of console events.

Netscape OnlyNetscape OnlySetControlString

This method is backward-compatible with Netscape plug-ins built with RealPlayer version 5.0 or later, but not compatible with version 5.0 ActiveX controls.. It is strongly recommended that you use SetControls in lieu of this function.

SetControls

Sets the visible components of the control.

For More Information: You can also use the CONTROLS parameter to add controls to your Web page in the tag definition.

SetControls(string controls)
controls
The name of the RealPlayer control to be set. This name must be associated with a unique name or ID for each embedded control. For example:

document.playcontrol.SetControls("PlayOnlyButton") — JavaScript

Document.playcontrol.SetControls("PlayOnlyButton") — VBScript

Returns a boolean value for plug-ins.

SetCopyright

Sets the current clip's copyright string, overriding any existing copyright information. GetCopyright subsequently returns this new value.

SetCopyright(string copyright)
copyright
The copyright string to be set. This copyright string overrides all subsequent copyright information in a multiclip presentation.

Returns a boolean value for plug-ins.

SetDoubleSize

Sets the image window to double its original size.

SetDoubleSize(void)

Returns a boolean value for plug-ins.

Note: This method is included only for ActiveX controls and plug-ins used in applications; this method is not intended for use in Web pages.

SetEnableContextMenu

Specifies whether the control over which the mouse cursor is placed displays the default context menu when the right mouse button is pressed.

SetEnableContextMenu(boolean menu_on)
menu_on
If set to true (default), the context menu is displayed. If set to false, the context menu is not displayed.

Returns a boolean value for plug-ins.

SetEnableDoubleSize

Enables or disables the double size selection in the Zoom item of the context menu.

SetEnableDoubleSize(boolean enabled)
enabled
If set to true, the double size selection is enabled. If set to false (default), the double size selection is disabled.

Returns a boolean value for plug-ins.

SetEnableFullScreen

Enables or disables the full screen selection in the Zoom item of the context menu.

SetEnableFullScreen(boolean enabled)
enabled
If set to true (default), the full screen selection is enabled. If set to false, the full screen selection is disabled.

Returns a boolean value for plug-ins.

SetEnableOriginalSize

Enables or disables the original size selection in the Zoom item of the context menu.

SetEnableOriginalSize(boolean enabled)
enabled
If set to true (default), the original size selection is enabled. If set to false, the original size selection is disabled.

Returns a boolean value for plug-ins.

SetFullScreen

Sets the image to full-screen mode.

SetFullScreen(void)

Returns a boolean value for plug-ins.

Note: The user presses theEsc key to reduce the image back to its original size.

SetImageStatus

Enables or disables the status text that is written along the bottom of the image window.

For More Information: You can also use the IMAGESTATUS parameter to specify whether the status information should be displayed, in the tag definition.

SetImageStatus(boolean enabled)
enabled
If set to true (default), the status text is written to the image window. If set to false, the status text is not sent to the image window.

Returns a boolean value for plug-ins.

SetLoop

Specifies whether the clip will loop or not.

For More Information: You can also use the LOOP parameter to specify whether the clip should loop, in the tag definition.

SetLoop(boolean set)
set
If set to true, the clip loops until play is interrupted. If set to false, the clip does not loop (default).

Returns a boolean value for plug-ins.

SetMaintainAspect

Sets whether or not to maintain the correct aspect ratio of the source within the image window when the image window is stretched.

For More Information: You can also use the MAINTAINASPECT parameter to specify whether the correct aspect ratio should be maintained, in the tag definition.

SetMaintainAspect(boolean set)
set
If set to true, the correct aspect ratio of the source is maintained. If set to false (default), the aspect ratio is changed so the source fills the image window.

Note: The SetMaintainAspect and SetCenter methods cannot both be set to true. Therefore, if you have set the value parameter of the SetCenter method to true, the set parameter of the SetMaintainAspect method must be set to false.

Returns a boolean value for plug-ins.

SetMute

Sets the mute state.

SetMute(boolean mute)
mute
If set to true, the audio is muted. If set to false, the sound is not muted.

Returns a boolean value for plug-ins.

SetNoLabels

Sets whether to suppress the title, author, and copyright label text in the controls window of RealPlayer 5.0. The content text strings are still displayed. This method is backward-compatible with Netscape plug-ins built with RealPlayer version 5.0 or later, but not compatible with version 5.0 ActiveX controls.

For More Information: You can also use the NOLABELS parameter to specify whether the presentation information should be displayed, in the tag definition.

SetNoLabels(boolean set)
set
If set to true, the title, author, and copyright label text is suppressed in the controls window. If set to false, the title, author, and copyright label text is displayed.

Returns a boolean value for plug-ins.

SetNoLogo

Sets whether to suppress the display of the Real logo in the image window control.

For More Information: You can also use the NOLOGO parameter to specify whether the logo should be displayed, in the tag definition.

SetNoLogo(boolean set)
set
If set to true, the Real logo is not displayed in the image window. The image window then defaults to black unless a background color has been specified. If set to false (default), the Real logo is displayed in the image window.

Returns a boolean value for plug-ins.

SetNumLoop

Sets number of times to loop the clip.

For More Information: You can also use the NUMLOOP parameter to specify the number of times the presentation should loop, in the tag definition.

SetNumLoop(int32 number_of_loops)
number_of_loops
The number of times for the clip to loop.

Returns a boolean value for plug-ins.

SetOriginalSize

Sets the image window to its original size.

SetOriginalSize(void)

Returns a boolean value for plug-ins.

SetPosition

Seeks into the clip to the specified point.

SetPosition(int32 position)
position
The point in the clip to which to seek, in milliseconds. Valid values are >=0 through <=total clip length. If an attempt is made to set the position >total length, then SetPosition will equal total length.

Note: Be sure to wait for the seek to finish before continuing with any programming that requires the clip to be at the point specified by this method.

Returns a boolean value for plug-ins.

SetPreFetch

Enables or disables PREFETCH playback mode.

SetPreFetch(boolean set)
set
If set to true, PREFETCH playback mode is enabled. If set to false (default), PREFETCH playback mode is disabled.

For More Information: You can also use the PREFETCH parameter to specify whether prefetch playback mode is enabled, in the tag definition.

Returns a boolean value for plug-ins.

ActiveX OnlySetShowAbout

Displays the RealPlayer About dialog box.

SetShowAbout(boolean set)
set
If set to true, the RealPlayer About dialog box is displayed. Setting this parameter to false while the dialog box is displayed does nothing; you must close the display using the buttons available in the dialog box.

Returns a boolean value for plug-ins.

SetShowPreferences

Displays the RealPlayer Preferences dialog box.

SetShowPreferences(boolean set)
set
If set to true, the RealPlayer Preferences dialog box is displayed. Setting this parameter to false while the dialog box is displayed does nothing; you must close the display using the buttons available in the dialog box.

Returns a boolean value for plug-ins.

SetShowStatistics

Sets the RealPlayer Statistics dialog box to visible.

SetShowStatistics(boolean set)
set
If set to true, the RealPlayer Statistics dialog box is displayed. If set to false and the RealPlayer Statistics dialog box is visible, the dialog box will be closed.

Returns a boolean value for plug-ins.

SetShuffle

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.

For More Information: You can also use the SHUFFLE parameter to specify whether clip playback should be randomized, in the tag definition.

SetShuffle(boolean set)
set
If set to true, clip playback is randomized. If set to false, the clips are played back in the order in which they appear in the multiclip RAM file or SMIL file.

Returns a boolean value for plug-ins.

SetSource

SetSourceSpecifies the URL of the clip to play. This method is backward- compatible with Netscape plug-ins built with RealPlayer version 5.0 or later, but not compatible with version 5.0 ActiveX controls

For More Information: You can also use the SRC parameter to specify the URL of the presentation, in the tag definition.

SetSource(string source)
source
The URL of the clip to play. The source URL can begin with rtsp://, http://, pnm://, or file://.

Returns a boolean value for plug-ins.

SetTitle

Sets the current clip's title string, overriding any existing title information. GetTitle subsequently returns this new value.

SetTitle(string title)
title
The title string to be set. This title string overrides all subsequent title information in a multiclip presentation.

Returns a boolean value for plug-ins.

Netscape OnlySetVolume

Sets the volume level.

SetVolume(int16 volume)
volume
The volume level to be set. Valid values are 0 through 100.

Warning! The use of this method varies slightly between programming languages. In C++, this function requires an int16 parameter, while in Java, an int32 parameter is required. Either integer type may be used when developing in JavaScript or VBScript.

Returns void.

SetWantErrors

Sets the error sink.

SetWantErrors(boolean set)
set
If set to true, the errors are trapped and no error dialogs occur in the player. If set to false, error dialogs are displayed in the player.

Returns a boolean value for plug-ins.

SetWantKeyboardEvents

Sets whether or not keyboard events are to be sent (that is, it sets whether the OnKeyDown, OnKeyPress, and OnKeyUp callbacks are to be sent).

SetWantKeyboardEvents(boolean set)
set
If set to true, the keyboard events will be sent. If set to false (default), the keyboard events will not be sent.

Returns a boolean value for plug-ins.

SetWantMouseEvents

Sets whether or not mouse events are to be sent (that is, whether the OnLButtonDown, OnLButtonUp, OnMouseMove, OnRButtonDown, and OnRButtonUp callbacks are to be sent).

SetWantMouseEvents(boolean set)
set
If set to true, the mouse events are sent. If set to false (default), the mouse events are not sent.

Returns a boolean value for plug-ins.

Netscape OnlyNetscape OnlyNetscape OnlyNetscape Only


RealNetworks, Inc. ©2001 RealNetworks, Inc. All rights reserved.
For more information, visit RealNetworks
Click here if the Table of Contents frame is not visible at the left side of your screen.
previous next