summaryrefslogtreecommitdiff
path: root/roles/jibri-install/templates/jibri.conf
blob: eb9b4cee8afd4c75731194b9f8c3223ef8c74dfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
jibri {
  // A unique identifier for this Jibri
  // TODO: eventually this will be required with no default
  id = "{{ inventory_hostname }}"
  // Whether or not Jibri should return to idle state after handling
  // (successfully or unsuccessfully) a request.  A value of 'true'
  // here means that a Jibri will NOT return back to the IDLE state
  // and will need to be restarted in order to be used again.
  single-use-mode = false
  api {
    http {
      external-api-port = 2222
      internal-api-port = 3333
    }
    xmpp {
      // See example_xmpp_envs.conf for an example of what is expected here
      environments = [
          {
            // A user-friendly name for this environment
            name = "prod env"

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

            // The base XMPP domain
            xmpp-domain = "{{ jitsi_server_host }}"

            // The MUC we'll join to announce our presence for
            // recording and streaming services
            control-muc {
                domain = "internal.auth.{{ jitsi_server_host }}"
                room-name = "JibriBrewery"
                nickname = "{{ inventory_hostname }}-nickname"
            }

            // The login information for the control MUC
            control-login {
                domain = "auth.{{ jitsi_server_host }}"
                // Optional port, defaults to 5222.
                // port = 6222
                username = "{{ jibri_user }}"
                password = "{{ jibri_password }}"
            }

            // An (optional) MUC configuration where we'll
            // join to announce SIP gateway services
           # sip-control-muc {
           #     domain = "domain"
           #     room-name = "room-name"
           #     nickname = "nickname"
           # }

            // The login information the selenium web client will use
            call-login {
                domain = "recorder.{{ jitsi_server_host }}"
                username = "{{ jibri_user }}-record"
                password = "{{ jibri_password }}"
            }

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

            // 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 = 1 hour

            // Whether or not we'll automatically trust any cert on
            // this XMPP domain
            trust-all-xmpp-certs = true
        }
      ]
    }
  }
  recording {
    recordings-directory = "/tmp/recordings"
    # TODO: make this an optional param and remove the default
    # finalize-script = "/path/to/finalize"
  }
  streaming {
    // A list of regex patterns for allowed RTMP URLs.  The RTMP URL used
    // when starting a stream must match at least one of the patterns in
    // this list.
    rtmp-allow-list = [
      // By default, all services are allowed
      ".*"
    ]
  }
  ffmpeg {
    resolution = "1280x720"
    // The audio source that will be used to capture audio on Linux
    audio-source = "alsa"
    // The audio device that will be used to capture audio on Linux
    audio-device = "plug:bsnoop"
  }
  chrome {
    // The flags which will be passed to chromium when launching
    flags = [
      {% if jitsi_cookie_enabled | default(false) %}
      "--load-extension=/opt/chrome-extension-cookie",
      {% endif %}
      "--use-fake-ui-for-media-stream",
      "--start-maximized",
      "--kiosk",
      "--enabled",
      "--disable-infobars",
      "--autoplay-policy=no-user-gesture-required"
    ]
  }
  stats {
    enable-stats-d = true
  }
  webhook {
    // A list of subscribers interested in receiving webhook events
    subscribers = []
  }
  jwt-info {
    // The path to a .pem file which will be used to sign JWT tokens used in webhook
    // requests.  If not set, no JWT will be added to webhook requests.
    # signing-key-path = "/path/to/key.pem"

    // The kid to use as part of the JWT
    # kid = "key-id"

    // The issuer of the JWT
    # issuer = "issuer"

    // The audience of the JWT
    # audience = "audience"

    // The TTL of each generated JWT.  Can't be less than 10 minutes.
    # ttl = 1 hour
  }
  call-status-checks {
    // 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 = 30 seconds

    // 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 = 10 minutes

    // 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 = 30 seconds
  }
}