Link to home
Start Free TrialLog in
Avatar of milmil
milmil

asked on

About RealAudio in Delphi 4.0

Anybody can help me????????

I want to use RealAudio AciveX control in my program. I put this control on my form, but I have a problem. Are there any event when user press Play (Pause or Stop) button on RealAudio player, or if there are no event how can I detect in program that one of that button is pressed?

2nd Question:
Are there any way to detect that song (RA file) is finished?

Thank's
Avatar of rwilson032697
rwilson032697

What sorts of events does the ActiveX control give you?

Cheers,

Raymond.

Avatar of milmil

ASKER

I don't understend your question. Sorry, but I am not very good in English.
In the object inspector there are properties and events. Are there OnClick etc events? Perhaps some of those will do what you want.

Cheers,

Raymond.
Try the event
 DRealAudioEvents_OnKeyPress
 OnPlayStateChange
What version of the RealAudio Player are you using?  This is the events that I have:

  DRealAudioEvents = dispinterface
    ['{CFCDAA02-8BE4-11CF-B84B-0020AFBBCCFA}']
    procedure OnGotoURL(const url: WideString; const target: WideString); dispid 301;
    procedure OnClipOpened(const shortClipName: WideString; const url: WideString); dispid 302;
    procedure OnClipClosed; dispid 303;
    procedure OnShowStatus(const statusText: WideString); dispid 304;
    procedure OnPositionChange(lPos: Integer; lLen: Integer); dispid 1005;
    procedure OnVolumeChange(nVol: Smallint); dispid 1007;
    procedure OnMuteChange(bMute: Integer); dispid 1008;
    procedure OnTitleChange(const bstrTitle: WideString); dispid 1009;
    procedure OnAuthorChange(const bstrAuthor: WideString); dispid 1010;
    procedure OnCopyrightChange(const bstrCopyright: WideString); dispid 1011;
    procedure OnPlayStateChange(lNewState: Integer); dispid 1013;
    procedure OnErrorMessage(uSeverity: Smallint; uRMACode: Integer; uUserCode: Integer;
                             const pUserString: WideString; const pMoreInfoURL: WideString;
                             const pErrorString: WideString); dispid 1014;
    procedure OnStatsInfoChange(const bstrStats: WideString); dispid 1015;
    procedure OnContacting(const bstrContacting: WideString); dispid 1016;
    procedure OnPreSeek(lOldTime: Integer; lNewTime: Integer); dispid 1017;
    procedure OnPostSeek(lOldTime: Integer; lNewTime: Integer); dispid 1018;
    procedure OnPresentationOpened; dispid 1019;
    procedure OnPresentationClosed; dispid 1020;
    procedure OnPreFetchComplete; dispid 1021;
    procedure OnLButtonDown(nFlags: SYSINT; nX: SYSINT; nY: SYSINT); dispid 1031;
    procedure OnLButtonUp(nFlags: SYSINT; nX: SYSINT; nY: SYSINT); dispid 1032;
    procedure OnRButtonDown(nFlags: SYSINT; nX: SYSINT; nY: SYSINT); dispid 1034;
    procedure OnRButtonUp(nFlags: SYSINT; nX: SYSINT; nY: SYSINT); dispid 1035;
    procedure OnMouseMove(nFlags: SYSINT; nX: SYSINT; nY: SYSINT); dispid 1037;
    procedure OnKeyDown(nFlags: SYSINT; nKey: SYSINT); dispid 1038;
    procedure OnKeyUp(nFlags: SYSINT; nKey: SYSINT); dispid 1039;
    procedure OnKeyPress(nFlags: SYSINT; nKey: SYSINT); dispid 1040;
    procedure OnBuffering(lFlags: Integer; lPercentage: Integer); dispid 1041;
  end;

(Sorry if the alignment is stuffed).

Im using RealPlayer G2.

Stu.

ASKER CERTIFIED SOLUTION
Avatar of mmilan
mmilan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial