Skip to content

Commit

Permalink
jibri: expose the call-status-check settings to configuration via env…
Browse files Browse the repository at this point in the history
… vars
  • Loading branch information
benbz committed Dec 14, 2021
1 parent d250ad7 commit eabda59
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
4 changes: 3 additions & 1 deletion jibri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ services:
devices:
- /dev/snd:/dev/snd
environment:
- ALL_MUTED_TIMEOUT
- CHROMIUM_FLAGS
- DEFAULT_CALL_EMPTY_TIMEOUT
- DISPLAY=:0
- ENABLE_STATS_D
- JIBRI_FFMPEG_AUDIO_SOURCE
Expand All @@ -31,6 +33,7 @@ services:
- JIBRI_FINALIZE_RECORDING_SCRIPT_PATH
- JIBRI_STRIP_DOMAIN_JID
- JIBRI_LOGS_DIR
- NO_MEDIA_TIMEOUT
- PUBLIC_URL
- TZ
- XMPP_AUTH_DOMAIN
Expand All @@ -43,4 +46,3 @@ services:
- jicofo
networks:
meet.jitsi:

40 changes: 31 additions & 9 deletions jibri/rootfs/defaults/jibri.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,28 @@ jibri {
{
// A user-friendly name for this environment
name = "{{ .Env.XMPP_ENV_NAME }}"

// A list of XMPP server hosts to which we'll connect
xmpp-server-hosts = [
xmpp-server-hosts = [
"{{ .Env.XMPP_SERVER }}"
]

// The base XMPP domain
xmpp-domain = "{{ .Env.XMPP_DOMAIN }}"

{{ if .Env.PUBLIC_URL -}}
// An (optional) base url the Jibri will join if it is set
base-url = "{{ .Env.PUBLIC_URL }}"
{{ end -}}

// The MUC we'll join to announce our presence for
// recording and streaming services
control-muc {
domain = "{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}"
room-name = "{{ .Env.JIBRI_BREWERY_MUC }}"
nickname = "{{ .Env.JIBRI_INSTANCE_ID }}"
}

// The login information for the control MUC
control-login {
domain = "{{ .Env.XMPP_AUTH_DOMAIN }}"
Expand All @@ -58,16 +58,16 @@ jibri {
username = "{{ .Env.JIBRI_RECORDER_USER }}"
password = "{{ .Env.JIBRI_RECORDER_PASSWORD }}"
}

// The value we'll strip from the room JID domain to derive
// the call URL
strip-from-room-domain = "{{ .Env.JIBRI_STRIP_DOMAIN_JID }}."

// How long Jibri sessions will be allowed to last before
// they are stopped. A value of 0 allows them to go on
// indefinitely
usage-timeout = "{{ $JIBRI_USAGE_TIMEOUT }}"

// Whether or not we'll automatically trust any cert on
// this XMPP domain
trust-all-xmpp-certs = {{ $XMPP_TRUST_ALL_CERTS }}
Expand Down Expand Up @@ -108,4 +108,26 @@ jibri {
enable-stats-d = {{ .Env.ENABLE_STATS_D }}
}
{{ end -}}
}

call-status-checks {
{{ if .Env.NO_MEDIA_TIMEOUT -}}
// If all clients have their audio and video muted and if Jibri does not
// detect any data stream (audio or video) comming in, it will stop
// recording after NO_MEDIA_TIMEOUT expires.
no-media-timeout = {{ .Env.NO_MEDIA_TIMEOUT }}
{{ end -}}

{{ if .Env.ALL_MUTED_TIMEOUT -}}
// If all clients have their audio and video muted, Jibri consideres this
// as an empty call and stops the recording after ALL_MUTED_TIMEOUT expires.
all-muted-timeout = {{ .Env.ALL_MUTED_TIMEOUT }}
{{ end -}}

{{ if .Env.DEFAULT_CALL_EMPTY_TIMEOUT -}}
// When detecting if a call is empty, Jibri takes into consideration for how
// long the call has been empty already. If it has been empty for more than
// DEFAULT_CALL_EMPTY_TIMEOUT, it will consider it empty and stop the recording.
default-call-empty-timeout = {{ .Env.DEFAULT_CALL_EMPTY_TIMEOUT }}
{{ end -}}
}
}

0 comments on commit eabda59

Please sign in to comment.