TRVCamReceiver.OnMediaAccessRequest, OnMediaAccessCancelRequest

<< Click to display table of contents >>

TRVCamReceiver.OnMediaAccessRequest, OnMediaAccessCancelRequest

Occurs in response to TRVCamSender.SendMediaAccessRequest and SendMediaCancelAccessRequest

type
  TRVMediaAccessRequestEvent = procedure(Sender: TRVCamReceiver;

    SessionKey: TRVSessionKey;
    const GUIDGroup, GUIDUser: TRVMAnsiStringvar Request: Boolean;

    ADataType: Word) of object;
  TRVMediaAccessCancelRequestEvent = procedure(

    Sender: TRVCamReceiver; SessionKey: TRVSessionKey;
    const GUIDGroup, GUIDUser: TRVMAnsiString;

    ADataType: Word) of object;
property OnMediaAccessRequest: TRVVideoAccessRequestEvent;
property OnMediaAccessCancelRequest: TRVVideoAccessCancelRequestEvent;

When another client calls SendMediaAccessRequest to this client, OnMediaAccessRequest occurs. In this event you can allow sending video and audio to that client by calling TRVCamSender.AllowMediaAccess.

When another client calls SendMediaAccessCancelRequest to this client, OnMediaAccessCancelRequest occurs. In this event you should disallow sending data (usually video and audio) to that client by calling TRVCamSender.CancelMediaAccess.

Note: these events help to manage a list of default receivers on a media server. This is a list of default addressees for data (not only video and audio, but all types of data) that are sent to unspecified addressees.

Parameters:

GUIDGroup – identifier of the group (if the request was made to a group)

GUIDUser – identifier of the client-requester.

ADataType – reserved for future use (planned: it will identify data types for which the request is made, see ***_DATA constants (this parameter may contain more than one constant, combined using "or" operator)

If you perform time consuming operations inside an event, it makes sense to compare values of SessionKey parameter and SessionKey property, to make sure that a connection was not closed or reopened.

Warning: Do not display modal forms in this event.