Introducing the ActiveX Control


RealAudio ActiveX Controls are programmable controls that can be seemlessly integrated into a Web page.

RealAudio ActiveX Control <OBJECT> Parameters:

SRC Sets the source of the RealAudio clip. The SRC location can be pnm:, file: or http: protocol.
CONTROLS Sets the visible components of the control. Valid CONTROLS include ALL, ControlPanel, InfoVolumePanel, InfoPanel, StatusBar, PlayButton, StopButton, VolumeSlider, PositionSlider, PositionField, and StatusField.
CONSOLE Sets the console name for this control. Consoles with the same name work in unison.
AUTOSTART Sets whether or not the control will automatically start playing once the source data is available. Valid values are TRUE or FALSE.
NOLABELS Sets the visibility of labels in the Information Panel of the control.
RESET Used to reset the RealAudio ActiveX Control playlist. Valid values are TRUE or FALSE.
AUTOGOTOURL Specifies how URL will be handled. Valid values are TRUE or FALSE. TRUE indicates that the RealAudio ActiveX Control will automatically forward the URL event to the browser. FALSE indicates that the OnGotoURL VBScript event will be sent instead.

An example of the RealAudio ActiveX Control <OBJECT> HTML:

<CENTER>
<OBJECT 
	ID=RAOCX 
	CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
	HEIGHT=140
	WIDTH=312>
	<PARAM NAME="SRC" VALUE="pnm://audio.realaudio.com/welcome.ra">
</OBJECT>
</CENTER>




RealAudio ActiveX Control Properties:

Source Returns/Sets the source of the RealAudio clip. The Source location can be pnm:, file: or http: protocol.
Controls Returns/Sets the visible components of the control. Valid CONTROLS include ALL, ControlPanel, InfoVolumePanel, InfoPanel, StatusBar, PlayButton, StopButton, VolumeSlider, PositionSlider, PositionField, and StatusField.
Console Returns/Sets the console name for this control. Consoles with the same name work in unison.
Autostart Returns/Sets whether or not the control will automatically start playing once the source data is available. Valid values are TRUE or FALSE.
NoLabels Returns/Sets the visibility of labels in the Information Panel of the control.
AutoGotoURL Specifies how URL will be handled. Valid values are TRUE or FALSE. TRUE indicates that the RealAudio ActiveX Control will automatically forward the URL event to the browser. FALSE indicates that the OnGotoURL VBScript event will be sent instead.



RealAudio ActiveX Control Methods:

DoPlayPause Play or Pause the RealAudio clip, as if the play/pause button was pressed. No return value. No parameters.
DoStop Stop the RealAudio clip, as if the stop button was pressed. No return value. No parameters.
DoNextItem Skip to the next RealAudio clip in a multi-part RealAudio play list. No return value. No parameters.
DoPrevItem Skip to the previous RealAudio clip in a multi-part RealAudio play list. No return value. No parameters.
CanPlayPause Determines whether the DoPlayPause method is valid for the control. Returns true or false. No parameters.
CanStop Determines whether the DoStop method is valid for the control. Returns true or false. No parameters.
HasNextItem Determines whether the DoNextItem method is valid for the control. Returns true or false. No parameters.
HasPrevItem Determines whether the DoPrevItem method is valid for the control. Returns true or false. No parameters.
AboutBox Show copyright information for the control. No return value. No parameters.
EditPreferences Show dialog to allow user modification of RealAudio preferences. No return value. No parameters.
HideShowStatistics Hide or Show the Statistics dialog box. No return value. No parameters.
IsStatisticsVisible Determines whether the Statistics dialog box is currently visible. Returns true or false. No parameters.
DoGotoURL(url, target) Cause the control to attempt a navigation to the specified URL in the specified frame target. The container must support URL browsing. No return value. Parameters: string URL, string target.


RealAudio ActiveX Events:

OnClipOpened(shortClipname,url) Sent when a clip has been opened by the control. Parameters: string shortClipName, string URL.
OnClipClosed() Sent to indicate that no clip is currently open by the control. No parameters.
OnShowStatus(statusText) Sent to indicate that the controls status text is changing. Parameters: string statusText
OnGotoURL(url,target) Sent when a URL event has been encountered for the currently playing RealAudio clip. This event will only occur if the AutoGotoURL property is FALSE. Parameters: string URL, string target.





VBScript examples using the RealAudio ActiveX Control:

<A id="AllControls" href="">Show all controls</A>
<SCRIPT language="VBS">

Sub PlayPause_OnClick()
	RAOCX.DoPlayPause
End Sub

Sub Stop_OnClick()
	RAOCX.DoStop
End Sub

Sub Edit_OnClick()
	RAOCX.EditPreferences
End Sub

Sub Stats_OnClick()
	RAOCX.HideShowStatistics
End Sub

Sub About_OnClick()
	RAOCX.AboutBox
End Sub
Sub RAOCX_OnShowStatus(byVal newText)
	StatusText.value = newText
End Sub

Sub RAOCX_OnClipOpened(byVal name, byVal url)
	currentClip.value = name
	currentUrl.value = url
End Sub

Sub RAOCX_OnClipClosed()
	currentClip.value = ""
	currentUrl.value = ""
End Sub

Sub RAOCX_OnGotoURL(byVal url, byVal target)
	alert "OnGotoURL(" + url + "," + target + ")"
End Sub

</script>

Control the music from script:


Control other methods from script:


These fields respond to events from the RealAudio ActiveX Control:




Copyright © Progressive Networks, 1996, all rights reserved. RealAudio is a trademark of Progressive Networks.