• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

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?

1 Solution
What sorts of events does the ActiveX control give you?



milmilAuthor Commented:
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.


Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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

  DRealAudioEvents = dispinterface
    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;

(Sorry if the alignment is stuffed).

Im using RealPlayer G2.


Use events: OnPlayStateChange (lNewState = 2) and OnClipClose!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now