Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The PLAYER object corresponds to the Audio Playerplayer system object.

Operator format to describe actions with audio player is following:

...

...

DoReact("PLAYER","_id_","_command_" [,"_parameters_"]);

List of commands and parameters for the the PLAYER object is presented in the table.

Command command description

Parameters

Description

"PLAY_WAV" plays back the audio file

file<>

Full path to the audio file in the .wav format (with the name of the file being played back. For example: C:\Program Files (x86)\Intellect\Wav\cam_alarm_1.wav)

from_macro<ID>

Response flag of the audio file being played back. The response is sent from the macro (specifying the ID of the existing macro, ID > 0).

Note. The parameter isn't mandatory if the voice notification channel is configured in the Audio Playerplayer object interface (see Setting up the voice notification using Audio player object)

"SETUP" sets the audio player parameters









board<>

Sound unit of the archive player

flags<>

Flags

h<>

Height of settings dialog (0 – 100)

name<>

Object name

voice<>

Sound notification

voice_board<>

Sound unit of notification

w<>

Width of settings dialog (0 – 100)

x<>

Left top corner of settings dialog (0 – 100)

y<>

Left top corner of settings dialog (0 – 100)

"STOP_WAV"   stops audio file playback--

...

Properties of the PLAYER object

Description of properties

ID<>

Object ID

PARENT_ID<>

Parent object ID

Examples of using the events and reactions of the Audio Player object:

Playback the audio file when the camera stops recording:

Code Block
OnEvent("CAM",N,"REC_STOP")
{
    DoReact("PLAYER","1","PLAY_WAV","file<C:\Program Files (x86)\Intellect\Wav\cam_alarm_"+N+".wav>,from_macro<1>");
}

Stop playing back the audio file when the camera starts recording:

...