MistServer
2.5.3-Pro-19-gf5e75b1 ( Generic_64)
|
Listing of all available triggers and their payloads.
MistServer reports certain occurances as configurable triggers to a URL or executable. This page describes the triggers system in full.
Triggers are the preferred way of responding to server events. Each trigger has a name and a payload, and may be stream-specific or global.
Triggers may be handled by a URL or an executable. If the handler contains ://, a HTTP URL is assumed. Otherwise, an executable is assumed. If handled by an URL, a POST request is sent to the URL with an extra X-Trigger header containing the trigger name and the payload as the POST body. If handled by an executable, it's started with the trigger name as its only argument, and the payload is piped into the executable over standard input.
Currently, all triggers are handled asynchronously and responses (if any) are completely ignored. In the future this may change.
"STREAM_ADD"
trigger is stream-specific, and is ran whenever a new stream is added to the server configuration. "OUTPUT_START"
trigger is global, and is ran whenever a new protocol listener is started. It cannot be cancelled. Its payload is: "OUTPUT_STOP"
trigger is global, and is ran whenever a protocol listener is terminated. It cannot be cancelled. Its payload is: "STREAM_REMOVE"
trigger is stream-specific, and is ran whenever a stream is removed from the server configuration. "SYSTEM_START"
trigger is global, and is ran as soon as the server configuration is first stable. "SYSTEM_STOP"
trigger is global, and is ran when the controller shuts down. If cancelled, the controller does not shut down and will attempt to re-open the API socket. Its payload is: "STREAM_READY"
trigger is stream-specific, and is ran whenever an input finished loading and started serving a stream. If cancelled, the input is immediately shut down again. Its payload is: "STREAM_UNLOAD"
trigger is stream-specific, and is ran right before an input shuts down and stops serving a stream. If cancelled, the shut down is delayed. Its payload is: "STREAM_TRACK_REMOVE"
trigger is stream-specific, and is ran whenever a track is fully removed from a live strean buffer. "STREAM_BUFFER"
trigger is stream-specific, and is ran whenever the buffer changes state between playable (FULL) or not (EMPTY). "STREAM_TRACK_ADD"
trigger is stream-specific, and is ran whenever a new track is added to a live strean buffer. "CONN_PLAY"
trigger is stream-specific, and is ran when an active connection first opens a stream. "CONN_OPEN"
trigger is stream-specific, and is ran when a connection is made or passed to a new handler. "STREAM_PUSH"
trigger is stream-specific, and is ran right before an incoming push is accepted. If cancelled, the push is denied. Its payload is: "RTMP_PUSH_REWRITE"
trigger is global and ran right before an RTMP publish request is parsed. It cannot be cancelled, but an invalid URL can be returned; which is effectively equivalent to cancelling. This trigger is special: the response is used as RTMP URL override, and not handled as normal. If used, the handler for this trigger MUST return a valid RTMP URL to allow the push to go through. If used multiple times, the last defined handler overrides any and all previous handlers. Its payload is: "STREAM_LOAD"
trigger is stream-specific, and is ran right before launching an input for an inactive stream. If cancelled, the input is not launched. Its payload is: "STREAM_SOURCE"
trigger is stream-specific, and is ran right before launching an input for an inactive stream. It cannot be cancelled, but an invalid source can be returned; which is effectively equivalent to cancelling. This trigger is special: the response is used as source override for this stream, and not handled as normal. If used, the handler for this trigger MUST return a valid source to allow the stream input to load up at all. If used multiple times, the last defined handler overrides any and all previous handlers. Its payload is: