A.2. Notification Scripts Extensions

A.2.1. Types

TNotificationType = (...)

The type of a notification, determined by the GetNotificationMethod of the INotification interface. See Section A.2.4, “Notification Types” for a list of all notification types and their parameters.

TNotificationTypes = set of TNotificationType

A set of TNotificationType, used to specify the relevant notification types by calling the the SetNotificationTypes procedure.

A.2.2. Procedures and Functions

procedure SetNotificationTypes(iValue: TNotificationTypes)

Use this procedure to specify the notification types to be passed to this script, masking out any other notification type. Calling this procedure should be done on receiving the ntMask event, usually at program startup. Although optional, masking out notification types can reduce overhead, as each script is only called for the notifications relevant to it. By default, any notification is passed to the script.

function GetNotification: INotification

Returns the INotification interface of the current pending notification. This should be done right at the beginning of the script, in order to determine the notification type.

A.2.3. Interfaces

INotfication

The INotification interface represents a single notification. It is obtained by the GetNotification function, which should be done at the beginning of each notification script. Each notification has a type, and possibly goes along with a number of parameters and a number of interfaces. See Section A.2.4, “Notification Types” for the exact parameters and interfaces of each notification type.

The following methods are declared:

function GetNotificationType: TNotificationType

Returns the type of the notification.

function GetParameterCount: integer

Returns the number of parameters.

function GetParameter(iIndex: integer): variant

Returns a specific parameter. The “variant” type is automatically type-casted to the appropriate type inside the script.

function GetInterfaceCount: integer

Returns the number of interfaces.

function GetInterface(iIndex: integer): IInterface

Returns a specific interface. Note that you have to manually cast the IInterface result of this function into the correct interface type (e.g., IPlayer or IPlaybackControl).

A.2.4. Notification Types

ntMask

This notification is sent at program startup. The script should react by calling SetNotificationTypes and thus setting the set of notifications to be passed to it. No parameters.

ntStartup

Called when startup of mAirList has been finished, after loading of default playlist and event list files. No parameters.

ntPlayerStart

Called when a player is started.

Table A.1.  ntPlayerStart parameters and interfaces

Parameter/InterfaceTypeDescription
Interface 0IPlayerThe player which was started.
Interface 1IPlaylistItemThe item which is loaded in the player (and is now playing).

ntPlayerStop

Called when a player is stopped.

Table A.2.  ntPlayerStop parameters and interfaces

Parameter/InterfaceTypeDescription
Parameter 0int64 Effective broadcasted duration, in mAirList units (1/10,000,000 seconds).
Interface 0IPlayerThe player which was stopped.
Interface 1IPlaylistItemThe item which is loaded in the player.

ntEOFWarning

Called when a player reaches the configured amount of time before the fade out, cue out or end of file marker. EOF warning must be enabled for the player in the configuration.

Table A.3.  ntEOFWarning parameters and interfaces

Parameter/InterfaceTypeDescription
Interface 0IPlayerThe player which is warning about EOF.
Interface 1IPlaylistItemThe item which is loaded in the player.

ntCartPlayerStart

Called when a cart player is started.

Table A.4.  ntCartPlayerStart parameters and interfaces

Parameter/InterfaceTypeDescription
Interface 0IPlayerThe cart player which was started.
Interface 1IPlaylistItemThe item which is loaded in the player (and is now playing).

ntCartPlayerStop

Called when a cart player is stopped.

Table A.5.  ntCartPlayerStop parameters and interfaces

Parameter/InterfaceTypeDescription
Parameter 0int64 Effective broadcasted duration, in mAirList units (1/10,000,000 seconds).
Interface 0IPlayerThe cart player which was stopped.
Interface 1IPlaylistItemThe item which is loaded in the player.

ntCartEOFWarning

Called when a cart player reaches the configured amount of time before the fade out, cue out or end of file marker. EOF warning must be enabled for the cartwall in the configuration.

Table A.6.  ntCartEOFWarning parameters and interfaces

Parameter/InterfaceTypeDescription
Interface 0IPlayerThe cart player which is warning about EOF.
Interface 1IPlaylistItemThe item which is loaded in the cart player.

ntPlayerPFLOn

Called when a player (normal player, cart player or Extra PFL embedded player) goes into PFL mode.

Table A.7.  ntPlayerPFLOn parameters and interfaces

Parameter/InterfaceTypeDescription
Parameter 0integerThe number of players now in PFL mode.
Interface 0IPlayerThe player which is now in PFL mode.

ntPlayerPFLOff

Called when a player's (normal player, cart player or Extra PFL embedded player) PFL mode is deactivated.

Table A.8.  ntPlayerPFLOff parameters and interfaces

Parameter/InterfaceTypeDescription
Parameter 0integerThe number of players now in PFL mode.
Interface 0IPlayerThe player which is no longer in PFL mode.

ntPlaylistEmpty

This notification is sent when a playlist runs empty in automation mode. It is called as soon as the last item in the playlist is faded (or stopped, in case no fade out time has been specified). You could react on this notification by loading an emergency playlist with IPlaylist.Load.

Table A.9.  ntPlaylistEmpty parameters and interfaces

Parameter/InterfaceTypeDescription
Interface 0IPlaybackControlThe PlaybackControl whose playlist has run empty.
Interface 1IPlaylist The PlaybackControl's playlist, for convenience. It can also be obtained with IPlaybackControl.GetPlaylist