previous next

Chapter 6: Embedded Player Methods

An application, applet, or control can use the methods described in this chapter to communicate with the embedded environment of the RealOne Player. The methods are listed here in alphabetical order and each description contains information about how to use the method in your Netscape 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 5.

Note: Many of the methods listed below return a boolean value for plug-ins. Plug-in developers can safely ignore the boolean value because 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.

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 RealOne Player 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.

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.

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.

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.

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 RealOne Player preferences.

GetConnectionBandwidth(void)

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

GetConsole

Indicates a console name used to link multiple control instances.

GetConsole(void)

Returns a string that contains the name of the RealOne Player 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 RealOne Player control.

GetControls(void)

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

For More Information: For valid control names, see "Embedded Controls".

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.

GetDRMInfo

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

GetDRMInfo (string identifier)

identifier

A four-letter string identifier for which the license will be returned. For example, the string RNBA is used for the RealNetworks Media Commerce Suite.

Returns a string in the following form (line breaks are for readability only):

ClientPubKey=<ClientPubKey>
&Challenge=<Challenge>
&ExtraInfo=<ExtraInfo>

Note: This method is available only in embedded player 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.

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.

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 SDK header file pnresult.h in the available at:

http://www.realnetworks.com/resources/server/

In normal operation, all components need to be able to handle the following basic codes that may be returned by Helix Server:

GetLastErrorRMACode(void)

Returns an int32 that contains the error code value.

GetLastErrorSeverity

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. RealOne Player 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. RealOne Player will shut down the presentation if necessary.
2 Critical Error that may require user intervention to correct. RealOne Player 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.

GetLastMessage

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.

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 a Netscape plug-in only. If you are coding an ActiveX control, use the GetLastMessage 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.

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 Helix 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 Helix 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 Helix 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 Helix 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 Helix 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 RealOne Player.

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.

GetPreFetch

Indicates whether or not PREFETCH is enabled.

GetPreFetch(void)

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

GetShowAbout

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 RealOne Player Statistics dialog box is visible.

GetShowStatistics(void)

Returns true if the RealOne Player 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 identifies the source protocol used for playback (local, 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.

GetVersionInfo

Indicates major and minor version information for the embedded RealOne Player (not the parent RealOne Player).

GetVersionInfo(void)

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

GetVolume

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.

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.

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.

SetAuthor

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.

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.

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.

SetBackgroundColor

Specifies the desired background color for the image window control.

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.

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

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.

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.

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.

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.

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.

For More Information: You can also use the CONSOLE parameter to specify whether your controls are linked in the tag definition.

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.

SetControls

Sets the visible components of the control.

SetControls(string controls)

controls

The name of the RealOne Player 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.

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

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.

SetFullScreen

Sets the image to full-screen mode.

SetFullScreen(void)

Returns a boolean value for plug-ins.

Note: The user presses the Esc 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.

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.

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.

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

SetMaintainAspect

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

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.

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

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.

SetNumLoop

Sets number of times to loop the clip.

SetNumLoop(int32 number_of_loops)

number_of_loops

The number of times for the clip to loop.

Returns a boolean value for plug-ins.

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

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.

Returns a boolean value for plug-ins.

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

SetShowAbout

Displays the RealOne Player About dialog box.

SetShowAbout(boolean set)

set

If set to true, the RealOne Player 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

Opens the RealOne Player environment and displays the RealOne Player Preferences dialog box.

SetShowPreferences(boolean set)

set

If set to true, the RealOne Player 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 RealOne Player Statistics dialog box to visible.

SetShowStatistics(boolean set)

set

If set to true, the RealOne Player Statistics dialog box is displayed. If set to false and the RealOne Player 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.

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.

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

SetSource

Specifies 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

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.

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

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.

SetVolume

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.


RealNetworks, Inc. ©2002 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