Real ActiveX Control Libaray 参数

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

Playback Commands
DoPlay()
Plays the current clip. Equivalent to clicking the Play button.

CanPlay()
Returns TRUE or FALSE. Returns TRUE if the player is currently paused or stopped, and current source file is valid.

DoStop()
Stops the clip. Equivalent to clicking the Stop button. This method is backwards-compatible with RealPlayer 5.0.

CanStop()
Returns TRUE if RealPlayer is currently playing a clip or is paused. This method is backwards-compatible with RealPlayer 5.0.

DoPause()
Pauses the current clip. Equivalent to clicking the Pause button.

CanPause()
Returns TRUE if the player is currently playing a clip.

CanPlayPause()
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.

DoPlayPause()
Plays or pauses the current clip. Backwards-compatible with RealPlayer 5.0. If supporting only RealPlayer G2, use DoPause() and DoPlay() instead.

PlayState Information
GetPlayState()
Returns the current state of the RealPlayer. values are numerical, with the following meanings:


0 Stopped1 Contacting2 Buffering3 Playing4 Paused5 Seeking

GetBufferingTimeElapsed()
Returns number of milliseconds of elapsed buffering time.

Note 
The GetBufferingtimeElapsed() method is not currently supported. It will be supported in an upcoming release. 


GetBufferingTimeRemaining()
Returns estimated remaining buffering time in milliseconds.

Attributes
GetPreFetch()
Returns whether or not PreFetch is enabled.

SetPreFetch()
Enables/disables PreFetch playback mode. Valid values are TRUE and FALSE with FALSE as the default.

Additional Information 
See "Using PREFETCH with " or "Using PREFETCH with". 


GetControls()
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. 


SetControls()
Sets the visible components of the control. Compatible only with RealPlayer G2.

SetControlString()
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.

GetConsole()
Returns a console name used to link multiple control instances. Call this function once for each instance of a control you want to link.

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.

SetConsoleName()
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.

SetAutoStart(boolean autoStart)
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.

GetAutoStart()
Returns whether or not playback will start automatically.

SetAutoGoToURL()
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  or tag. See "Handling URLs through " or "Handling URLs through ". 


GetAutoGotoURL()
Returns whether or not AutoGotoURL property is enabled.

DoGoToURL(url, target)
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

SetLoop()
Specifies whether the clip will loop or not. Valid values are TRUE (loops until play is interrupted) and FALSE (default).

GetLoop()
Returns whether the clip has been set to loop.

SetNumLoop()
Sets number of times to loop the clip. Takes an integer as its parameter.

GetNumLoop()
Returns number of loops set in SetNumLoop().

SetCenter()
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).

GetCenter()
Returns whether or not the visual datatype will be centered within the image window. Valid values are TRUE and FALSE.

SetMaintainAspect()
Maintains correct aspect ratio of source within image window when stretched. Valid values are TRUE and FALSE (default).

GetMaintainAspect()
Returns whether or not the aspect ratio of the visual datatype will be maintained.

SetBackgroundColor()
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) 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) 

GetBackgroundColor()
Returns hexadecimal value for current background color.

SetNoLogo()
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 an6nbsp;Use with RealPlayer G2 and 5.0. If supporting only RealPlayer G2, use HasNextEntry() instead.

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

DoNextItem()
Skips to the next clip in the RAM (.ram or .rpm) or SMIL file that contains multiple clips. In a SMIL file, a group is treated as a single clip. Use with RealPlayer G2 and 5.0. If supporting only RealPlayer G2, use DoNextEntry() instead.

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 group is treated as a single clip. Returns TRUE or FALSE.

HasPrevItem()
Tests if the previous clip function is available. The previous clip function is available when the connected source is a RAM (.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 group is treated as a single clip. Returns TRUE or FALSE. Use with RealPlayer G2 and 5.0. If supporting only RealPlayer G2, use HasPrevEntry() instead.

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

DoPrevItem()
Skips to the previous clip in a RAM (.ram or .rpm) or SMIL file that contains multiple clips. In a SMIL file, a group is treated as a single clip. Use with RealPlayer G2 and 5.0. If supporting only RealPlayer G2, use DoPrevEntry() instead.

GetCurrentEntry()
Returns the number of the entry currently playing.

GetNumEntries()
Returns the total number of entries in the playlist.

GetEntryTitle()
Returns the Title for the specified playlist entry.

GetEntryAuthor()
Returns the Author for the specified playlist entry.

GetEntryCopyright()
Returns the Copyright for the specified playlist entry.

GetEntryAbstract()
Returns the Abstract for the specified playlist entry.

Live Playback
GetLiveState()
Returns whether the current clip is live. Valid values are TRUE or FALSE.

User Interface Components
SetShowStatistics()
Sets the RealPlayer Statistics dialog box to visible. Valid values are TRUE or FALSE. 

GetShowStatistics()
Returns whether or not the RealPlayer Statistics dialog box is visible.

HideShowStatistics()
Sets the RealPlayer Statistics dialog box to visible. Valid values are TRUE (hidden) or FALSE. Use with RealPlayer G2 and 5.0. If supporting only RealPlayer G2, use SetShowStatistics() instead.

IsStatisticsVisible()
Returns whether or not the RealPlayer Statistics dialog box is visible. Use with RealPlayer G2 and 5.0. If supporting only RealPlayer G2, use GetShowStatistics() instead.

SetShowPreferences()
Displays the RealPlayer Preferences dialog box.

GetShowPreferences()
Returns whether or not the Preferences dialog box is visible.

EditPreferences()
Displays the RealPlayer Preferences dialog box. Use with RealPlayer G2 and 5.0. If supporting only RealPlayer G2, use SetShowPreferences() instead.

SetShowAbout()
Displays the RealPlayer About dialog box. Use with RealPlayer G2 only.

AboutBox()
Displays the RealPlayer About dialog box. Use with RealPlayer G2 and 5.0. If supporting only RealPlayer G2, use SetShowAbout() instead.

GetShowAbout()
Returns whether or not the About box is open.

Error Handling
SetWantErrors()
Sets error sink. Valid values are TRUE (errors trapped, no error dialogs in player) and FALSE (error dialogs in player).

GetWantErrors()
Returns whether error dialogs will be displayed.

GetLastErrorMoreInfoURL()
Returns the "more info" URL from the last error. May return nothing.

GetLastErrorRMACode()
Returns 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.real.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: 


PNR_FAIL-Operation failed. 

PNR_OK-Operation succeeded. 

PNR_UNEXPECTED-Call was unexpected or method is not implemented. 
GetLastErrorSeverity()
Returns error level for last error. 


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()
Returns user error code from last error.

GetLastErrorUserString()
Returns error string from last error dialog. May return nothing.

GetLastStatus()
Returns text of last status message.

Display State
SetOriginalSize()
Sets the image window to its original size.

GetOriginalSize()
Returns whether the image is currently in its original size. TRUE indicates original size.

SetDoubleSize()
Sets the image window to double size.

GetDoubleSize()
Returns whether or not image is currently in double-size mode. TRUE indicates double size.

SetFullScreen()
Sets the image to full-screen mode.

GetFullScreen()
Returns whether or not image is currently in full-screen mode. TRUE indicates full-screen mode.

Volume/Mute Control
SetVolume()
Sets the volume level. Valid values are 0-100. 

GetVolume()
Returns current volume level.

SetMute()
Sets the mute state. Valid values are TRUE and FALSE.

GetMute()
Returns whether or not the volume has been muted.

GetStereoState()
Returns whether the current clip is in stereo. Returns TRUE for stereo or FALSE for mono.

Context Menu
SetEnableContextMenu()
Specifies whether the control will display the default context menu when the right mouse button is clicked. Valid values are TRUE (enabled, default) and FALSE (disabled).

GetEnableContextMenu()
Returns whether or not contextual menu is currently enabled. Returns TRUE (enabled, default) or FALSE (disabled).

SetEnableOriginalSize()
Enables the original size option on contextual menu. Valid values are TRUE (default) and FALSE.

GetEnableOriginalSize()
Returns whether the original size option is enabled on the contextual menu. 

SetEnableDoubleSize()
Enables the double size option on contextual menu. Valid values are TRUE and FALSE (default).

GetEnableDoubleSize()
Returns whether or not the double size option is enabled on the contextual menu.

SetEnableFullScreen()
Enables the full screen option on contextual menu. Valid values are TRUE (default) and FALSE.

GetEnableFullScreen()
Returns whether or not the full screen option is enabled on the contextual menu.

SetImageStatus()
Sets whether Status text should be written to the image window.

GetImageStatus()
Returns whether Status text is written to the image window.

Network Information
GetSourceTransport()
Returns a string with the source protocol used for playback. Takes as value an integer from 1 to n, where n is the number of sources returned by GetNumSources().

GetNumSources()
Returns number of sources in the presentation.

GetPacketsTotal()
Returns total number of packets in the presentation.

GetPacketsReceived()
Returns the total packets received from the server.

GetPacketsOutofOrder()
Returns the total packets received from the server out of order.

GetPacketsMissing()
Returns the total packets not received from the server in time to play. 

GetPacketsEarly()
Returns the total packets received from the server before they are ready to play. 

GetPacketsLate()
Returns the total packets received from the server that are too late to play. 

GetBandwidthAverage()
Returns the average amount of bandwidth available. 

GetBandwidthCurrent()
Returns the current amount of bandwidth available. 

Version Information
GetVersionInfo()
Returns major and minor version information for the embedded RealPlayer (not the parent RealPlayer), such as 6.0.0.128.

GetIsPlus()
Returns whether the client is RealPlayer Plus.

Event Flags
SetWantKeyboardEvents()
Sets whether keyboard events will be sent. Valid values are TRUE and FALSE (default).

GetWantKeyboardEvents()
Returns whether keyboard events will be sent.

SetWantMouseEvents()
Sets whether mouse events will be sent. Valid values are TRUE and FALSE (default).

GetWantMouseEvents()
Returns whether mouse events will be sent.

User Preference Settings
GetConnectionBandwidth()
Returns the normal, maximum bandwidths settings as set by the user in the RealPlayer preferences.

GetPreferedLanguageString()
Returns the preferred language for content as set by the user in the RealPlayer preferences.

GetPreferedLanguageID()
Returns the preferred language ID. For a list of language codes, see the SMIL language codes appendix in RealSystem G2 Production Guide.

GetUserCountryID()
Returns the country that the user selected during electronic registration.

RealPlayer 5.0 Compatibility
The following methods are used with RealPlayer G2 and RealPlayer 5.0. To support both versions of RealPlayer, your application can issue only this set of commands:


DoStop() 

CanStop() 

CanPlayPause() 

DoPlayPause() 

DoGoToURL(url, target) (ActiveX control only) 

SetControlString() (Netscape Plug-in only) 

SetConsoleName() (Netscape Plug-in only) 

SetAutoStart(boolean autoStart) (Netscape Plug-in only) 

SetAutoGoToURL() 

SetNoLabels() (Netscape Plug-in only) 

SetSource(String Source) (Netscape Plug-in only) 

HasNextItem() 

DoPrevItem() 

HasPrevItem() 

DoPrevItem() 

AboutBox() 

EditPreferences() 

HideShowStatistics() 

IsStatisticsVisible() 

/

function GetSource: WideString;
procedure SetSource(const lpszNewvalue: WideString);
function GetConsole: WideString;
procedure SetConsole(const lpszNewvalue: WideString);
function GetControls: WideString;
procedure SetControls(const lpszNewvalue: WideString);
function GetNoLabels: WordBool;
procedure SetNoLabels(bNewvalue: WordBool);
function GetAutoStart: WordBool;
procedure SetAutoStart(bNewvalue: WordBool);
function GetAutoGotoURL: WordBool;
procedure SetAutoGotoURL(bNewvalue: WordBool);
function GetVolume: Smallint;
procedure SetVolume(nVol: Smallint);
function GetMute: WordBool;
procedure SetMute(bMute: WordBool);
function GetLoop: WordBool;
procedure SetLoop(bVal: WordBool);
function GetImageStatus: WordBool;
procedure SetImageStatus(bEnable: WordBool);
function GetPacketsTotal: Integer;
function GetPacketsReceived: Integer;
function GetPacketsOutOfOrder: Integer;
function GetPacketsMissing: Integer;
function GetPacketsEarly: Integer;
function GetPacketsLate: Integer;
function GetBandwidthAverage: Integer;
function GetBandwidthCurrent: Integer;
procedure DoPlayPause;
procedure DoStop;
procedure DoNextItem;
procedure DoPrevItem;
function CanPlayPause: WordBool;
function CanStop: WordBool;
function HasNextItem: WordBool;
function HasPrevItem: WordBool;
function HasNextEntry: WordBool;
function HasPrevEntry: WordBool;
procedure DoNextEntry;
procedure DoPrevEntry;
procedure AboutBox;
procedure EditPreferences;
procedure HideShowStatistics;
function IsStatisticsVisible: WordBool;
procedure DoGotoURL(const url: WideString; const target: WideString);
procedure DoPlay;
procedure DoPause;
function GetPosition: Integer;
function GetPlayState: Integer;
function GetLength: Integer;
function GetTitle: WideString;
function GetAuthor: WideString;
function GetCopyright: WideString;
function GetClipWidth: Integer;
function GetClipHeight: Integer;
function CanPlay: WordBool;
function CanPause: WordBool;
procedure SetPosition(lPosition: Integer);
function GetNumLoop: Integer;
procedure SetNumLoop(lVal: Integer);
function GetCenter: WordBool;
procedure SetCenter(bVal: WordBool);
function GetNoLogo: WordBool;
procedure SetNoLogo(bVal: WordBool);
function GetMaintainAspect: WordBool;
procedure SetMaintainAspect(bVal: WordBool);
function GetBackgroundColor: WideString;
procedure SetBackgroundColor(const pVal: WideString);
function GetStereoState: WordBool;
function GetLiveState: WordBool;
function GetShowStatistics: WordBool;
procedure SetShowStatistics(bVal: WordBool);
function GetShowPreferences: WordBool;
procedure SetShowPreferences(bVal: WordBool);
function GetShowabout: WordBool;
procedure SetShowAbout(bVal: WordBool);
function GetOriginalSize: WordBool;
procedure SetOriginalSize;
function GetDoubleSize: WordBool;
procedure SetDoubleSize;
function GetFullScreen: WordBool;
procedure SetFullScreen;
function GetEnableContextMenu: WordBool;
procedure SetEnableContextMenu(bVal: WordBool);
function GetEnableOriginalSize: WordBool;
procedure SetEnableOriginalSize(bVal: WordBool);
function GetEnableDoubleSize: WordBool;
procedure SetEnableDoubleSize(bVal: WordBool);
function GetEnableFullScreen: WordBool;
procedure SetEnableFullScreen(bVal: WordBool);
function GetEnableMessageBox: WordBool;
procedure SetEnableMessageBox(bVal: WordBool);
procedure SetTitle(const pVal: WideString);
procedure SetAuthor(const pVal: WideString);
procedure SetCopyright(const pVal: WideString);
function GetWantKeyboardEvents: WordBool;
procedure SetWantKeyboardEvents(bWantsEvents: WordBool);
function GetWantMouseEvents: WordBool;
procedure SetWantMouseEvents(bWantsEvents: WordBool);
function GetNumEntries: Smallint;
function GetCurrentEntry: Smallint;
function GetEntryTitle(uEntryIndex: Smallint): WideString;
function GetEntryAuthor(uEntryIndex: Smallint): WideString;
function GetEntryCopyright(uEntryIndex: Smallint): WideString;
function GetEntryAbstract(uEntryIndex: Smallint): WideString;
procedure SetCanSeek(bCanSeek: WordBool);
function GetCanSeek: WordBool;
function GetBufferingTimeElapsed: Integer;
function GetBufferingTimeRemaining: Integer;
function GetConnectionBandwidth: Integer;
function GetPreferedLanguageString: WideString;
function GetPreferedLanguageID: Integer;
function GetUserCountryID: Integer;
function GetNumSources: Smallint;
function GetSourceTransport(nSourceNum: Smallint): WideString;
function GetWantErrors: WordBool;
procedure SetWantErrors(bVal: WordBool);
function GetShuffle: WordBool;
procedure SetShuffle(bVal: WordBool);
function GetVersionInfo: WideString;
function GetLastMessage: WideString;
function GetLastErrorSeverity: Integer;
function GetLastErrorRMACode: Integer;
function GetLastErrorUserCode: Integer;
function GetLastErrorUserString: WideString;
function GetLastErrorMoreInfoURL: WideString;
procedure SetPreFetch(bVal: WordBool);
function GetPreFetch: WordBool;
procedure SetRegion(const pVal: WideString);
function GetRegion: WideString;
function GetIsPlus: WordBool;
function GetConsoleEvents: WordBool;
procedure SetConsoleEvents(bVal: WordBool);
function GetDRMInfo(const pVal: WideString): WideString;
property ControlInterface: IRealAudio read GetControlInterface;
property DefaultInterface: IRealAudio read GetControlInterface 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值