From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 30 Sep 2022 12:00:14 +0000 (+0100) Subject: Update Events.md X-Git-Tag: 4.1-rc1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3913d9dd63f38e1963fb2b15e479855def403b5b;p=thirdparty%2Fshairport-sync.git Update Events.md --- diff --git a/ADVANCED TOPICS/Events.md b/ADVANCED TOPICS/Events.md index f7fe616b..c0ba868b 100644 --- a/ADVANCED TOPICS/Events.md +++ b/ADVANCED TOPICS/Events.md @@ -1,8 +1,8 @@ ## Events Shairport Sync can run programs when certain "events" occur. The events are: -1. When Shairport Sync become "active" or "inactive". Shairport Sync is normally in the "inactive" state when no audio is being played. When audio is sent to Shairport Sync, it will transition from the "inactive" state into the "active" state. When the audio stops, Shairport Sync will start a timer. If audio restarts before the timer reaches the value of the active_state_timeout (10 seconds by default), Shairport Sync will stay in the "active" state. However, if no more audio is received before the timer reaches the active_state_timeout value, Shairport Sync will transition to the "inactive" state. The overall effect of this is that Shairport Sync will go active when a track is played and will stay active during the interval between the track ends and a new track begins, so long as the interval is less than the active_state_timeout. +1. When Shairport Sync become `active` or `inactive`. Shairport Sync is normally in the `inactive` state when no audio is being played. When audio is sent to Shairport Sync, it will transition from `inactive` to `active`. When the audio stops, Shairport Sync will start a timer. If audio restarts before the timer reaches the value of the `active_state_timeout` configuration setting (10 seconds by default), Shairport Sync will stay `active`. However, if no more audio is received before the timer reaches the `active_state_timeout` value, Shairport Sync will transition to `inactive`. The overall effect of this is that Shairport Sync will go `active` when a track is played and will stay active in the interval between tracks, so long as the interval is less than the `active_state_timeout`. Shairport Sync can call an external program when it goes `active` and `inactive`. -3. When audio begins to play. +3. When audio begins to play. 4. When audio stops playing. 5. When the volume is adjusted.