====== Actions ====== Using "Actions", you can execute various tasks in mAirList, bound to (timed) events. Actions can be used in various places: * In the [[features:event-scheduler|Event Scheduler]] * As "Actions on Start" or "Actions on Stop" in the properties of any playlist item * Inside any Trigger in the [[features:cartwall|Cartwall]] * In any of the "standard action lists" (managed on the //Actions// page in the config app): * After Startup * Before Shutdown * When playlist runs empty during automation * When entering ON AIR mode * When entering OFF AIR mode * When PFL output is started * When PFL output if stopped * When non-player PFL output is started * When non-player PFL output if stopped * In the "Action Menu" in the playout window (also managed on the //Actions// page in the config app) -- a new button //Actions// will appear in the main toolbar as soon as you add actions to this list, with a dropdown menu that contains the actions you defined. * In the [[features:stream-monitor|Stream Monitor]] * etc. ===== Adding and Configuring Actions ===== All of the places that support actions, mentioned above, have a section in the GUI where you manage the list of actions to be executed. For example, this is how it looks in the Event Editor: {{ :features:pasted:20170518-103549.png?400 }} The toolbar contains buttons to add, delete and configure events, and to load/save the entire list from/to XML files. The configuration settings largely depend on the type of action -- see description below. But all actions have the same //Options// tab: {{ :features:pasted:20170518-103834.png?400 }} The following settings are found here: * **Custom Title:** Enter a custom title for the action if desired; particularly useful for the Action Menu. * **Enable substitution of variables:** If enabled, you can use [[reference:logging_variables|logging variables]], e.g. for the current date/time, in the action configuration. This setting applies to all actions that accept filenames. * **Show confirmation dialog when run manually:** Applies to the Action Menu which will request confirmation from the user before executing the action when this option is set. * **Time adjustment:** This setting allows you to change the current/date time (only for the scope of this action) while the action is executed. In particular, it will affect the date/time that is used for the substituation of logging variables. * **Affected playlist:** Select the playlist that this action should work on; mainly applies to all actions that manipulate the playlist (e.g. "Load and play playlist"). ===== Action Description ===== This section describes all available actions and their options. ==== Miscellaneous ==== === Execute command=== Executes any of the [[reference:remote_control_commands|remote control commands]]. === Work an action list === Serves as a container for other actions, can be used to nest actions for easier management. === Emergency actions === Normally, when an action fails due to an error, the execution of the entire action list is aborted. When you add an //Emergency actions// action to the end of the list however, the execution will jump to that emergency actions and execute all actions found inside it. If you are a developer, this is pretty much like a try..finally block. === No action === Just a dummy... === Download file === Downloads a file via HTTP or FTP and saves it under the given filename. Can be used together with the Event Scheduler to implement a very simple download manager. === Send e-mail === Send an e-mail. Enter the recipient, subject and body. Note: Sender address and name as well as the SMTP server must be configured in the config app first. === Run script === Runs a script (*.mls file). === Send data to serial port === Sends data to a serial port, which must already be open (e.g. by using a [[config:remotecontrol:serial|Serial Port Remote Control]]). The data is sent in ANSI encoding by default. In order to send binary data, enter a dollar sign followed by the hexadecimal data, e.g. ''$C0BA0003''. ==== File ==== === Insert File === Inserts the specified file at the top of the playlist, or below the currently playing item. You can use logging variables in the filename if substitution is enabled on the //Options// tab. === Play File === Inserts the specified file at the top of the playlist, or below the currently playing item, and starts it immediately. You can use logging variables in the filename if substitution is enabled on the //Options// tab. This action only works in AUTO mode, as it uses the ''AUTOMATION x NEXT'' command internally. In ASSIST mode, the file is only inserted but not played. === Insert/play network file === Same as above, but for files on HTTP/FTP servers. Enter a URL instead of a local filename. ==== Playlist ==== Note: All "Playlist" actions accept logging variables inside the filename if substitution is enabled on the //Options// tab. === Load playlist === Loads the specified playlist file. The current playlist content (except for any playing items) is discarded. === Load and play playlist === Loads the specified playlist file, and issues an AUTOMATION NEXT command so that the automation jumps to the first item. Only works in AUTO mode. === Insert playlist === Inserts a playlist file at the top of the current playlist, or below the currently active item. === Insert and play playlist === Inserts a playlist file at the top of the current playlist, or below the currently active item, then issues an AUTOMATION NEXT command so that the automation jumps to the first item. Only works in AUTO mode. === Append playlist === Appends the specified playlist file to the current playlist. === Shuffle playlist === Shuffles the current playlist content. ==== Automation ==== === Enable automation === Switches to AUTO mode. === Disable automation === Switches to ASSIST mode. === Start automation playback === Equivalent to clicking the //PLAY// button in the automation toolbar. === Fade to next item === Equivalent to clicking the //NEXT// button in the automation toolbar. === Stop automation playback === Equivalent to clicking the //STOP// button in the automation toolbar. ==== Stream ==== === Insert stream === Inserts a stream playlist item at the top of the playlist, or after the currently active item. Enter the URL and an optional title for the stream. Also specifiy whether this should be an infinite stream, or a stream item with a particular duration. === Play stream === Insert a stream playlist item, and issue an ''AUTOMATION x NEXT'' command so that it is played instantly. Only works in AUTO mode. ==== Database ==== === Load database playlist, Load and play database playlist, Insert database playlist, Insert and play database playlist, Append database playlist === Same as the actions for playlist files described above, but for playlists loaded from a database (e.g. mAirListDB). Select the database connection to load from (defaults to the first active connection) and the sub-playlist (defaults to the master playlist) to use. An optional postprocessing script can be specified that is run on the playlist before it is loaded/inserted/appended. The playlist can be accessed through ''CurrentPlaylist'' from the script. Several options are available: * **Load the playlist for the next hour (instead of the current hour):** Playlists are stored in an hourly grid in the database. Normally these actions would load the playlist for the current hour, which is perfectly fine if the action is run exactly at the top of the hour. But sometimes you run the action a few minutes before the top of the hour, in particular when using the //Append database playlist// action. In this case, check this option so the playlist for the next hour is used. You an also used the time adjustment on the //Options// tab if you need to move further ahead or back. * **Set fixed time on first element:** If checked, a fixed time (for the corresponding hour) will be set on the first item of the playlist, so that the automation jumps to that item at the given time. This is for database playlists that don't have any kind of "Start of hour" marker (with a fixed time) themselves. * **Use soft fixed time:** Used together with //Set fixed time on first element//, a soft fixed time is being used instead of a hard one. * **Use an extra Dummy element for fixed time:** Used together with the two aforementioned options, the fixed time is not applied to the first item of the playlist, but an extra dummy item is inserted that carries the fixed time; the first item remains untouched. * **Skip to current time:** Skip all items that have a planned playback time before the current time. Useful when using //Load database playlist// as an //Action after startup// to load the current database playlist when mAirList starts. Does **not** cue into the exact position of the first song! * **Update advertising:** Runs the //Update Advertising// function before loading the playlist. * **If advertising was updated, save playlist to database:** Stores any changes made by //Update Advertising// back into the database. * **Report an error if the playlist is empty:** If the database playlist is empty, an error is reported, execution of the action list is aborted, and any possible Emergency Actions are executed. * **Report an error if the postprocessing script fails:** Same as above, in case the postprocessing script raises an error. * **Report error and underrun count to System Log:** For debugging and monitoring purposes. ==== Mixer ==== These actions refer to the Windows Audio Mixer (not widely used anymore in Vista and later). === Mute Mixer Channel === Mutes the specified channel in the mixer. === Unmute Mixer Channel === Unmutes the specified channel in the mixer. ==== Encoder ==== These actions refer to the built-in [[features:encoder|Streaming Encoder]]. === Connect encoder === Establishes the encoder connection, equivalent to clicking the //Connect// button in the Encoder Status window. === Disconnect encoder === Terminates the encoder connection, equivalent to clicking the //Disconnect// button in the Encoder Status window. === Switch input on or off === Use this action to switch any of the encoder inputs (Mic, Line, Aux, ...) on or off. This is the same as clicking the //LINE// or //MIC// button in the Encoder Status window. === Enable local output === Unmutes the local audio output of the encoder (to the audio device set as encoder playback device in the config). === Disable local output === Mutes the local audio output. ==== Aircheck Recorder ==== The actions in this section are used to control any [[features:aircheck-recorder|Aircheck Recorder]]. The recorder must have a //Remote ID// set in the screen object properties, and you must enter the same ID in the action configuration. === Open output file === The same as clicking the //Open// button in the Aircheck Recorder window. The filename is selected automatically based on the recorder configuration. === Start/resume recording === Starts recording, or resumes it if it is paused. Equivalent to the //Record// button in the Aircheck Recorder window. === Pause recording === Equivalent to the //Pause// button in the Aircheck Recorder window. === Close output file === Equivalent to the //Close// button in the Aircheck Recorder window. ==== File Recorder ==== These actions refer to the [[features:file-recorder|File Recorder]]. === Start recording === Starts a new recording. See the [[features:file-recorder#timed_recordings|File Recorder documentation]] for a description of all options and settings. === Stop recording === Stops one or more recordings, based on the //Recording ID//. ==== SAS ==== These actions refer to the [[config:remotecontrol:sas|SAS Remote Control]] (Lawo/Studer/...). The documentation for the actions can be found [[config:remotecontrol:sas#actions|here]]. ==== DHD ==== These actions refer to the [[config:remotecontrol:dhd|remote control for DHD mixing consoles]]. The documentation of the actions can be found [[config:remotecontrol:dhd#actions|here]]. ==== REST ==== === Execute command via REST === Executes any fader start command on another mAirList instance, using [[config:remotecontrol:rest|REST Remote Control]] on the server side. Select the hostname, port and optionally path of the REST remote to send the command to. Authentication can be carried out via username/password, or an auth token. ==== MusicMaster ==== The actions in this section refer to the [[musicmaster:start|MusicMaster Nexus API binding]]. === Update unscheduled positions === Looks for any unscheduled positions in the current playlist, and checks if they have been scheduled meanwhile, and if yes, replaces the dummy item with the actual audio item. === Synchronize playlist === Syncs any changes made from the MusicMaster side in the current schedule. This is one-way synchronization from MusicMaster to mAirList! Local changes will be lost.