settings-config.js 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. {{ $DEPLOYMENTINFO_USERREGION := .Env.DEPLOYMENTINFO_USERREGION | default "" -}}
  2. {{ $BRIDGE_CHANNEL := .Env.BRIDGE_CHANNEL | default "websocket" -}}
  3. {{ $ENABLE_AUDIO_PROCESSING := .Env.ENABLE_AUDIO_PROCESSING | default "true" | toBool -}}
  4. {{ $ENABLE_CALENDAR := .Env.ENABLE_CALENDAR | default "false" | toBool -}}
  5. {{ $ENABLE_FILE_RECORDING_SERVICE := .Env.ENABLE_FILE_RECORDING_SERVICE | default "false" | toBool -}}
  6. {{ $ENABLE_FILE_RECORDING_SERVICE_SHARING := .Env.ENABLE_FILE_RECORDING_SERVICE_SHARING | default "false" | toBool -}}
  7. {{ $ENABLE_IPV6 := .Env.ENABLE_IPV6 | default "true" | toBool -}}
  8. {{ $ENABLE_LIPSYNC := .Env.ENABLE_LIPSYNC | default "false" | toBool -}}
  9. {{ $ENABLE_NO_AUDIO_DETECTION := .Env.ENABLE_NO_AUDIO_DETECTION | default "false" | toBool -}}
  10. {{ $ENABLE_P2P := .Env.ENABLE_P2P | default "true" | toBool -}}
  11. {{ $ENABLE_RECORDING := .Env.ENABLE_RECORDING | default "false" | toBool -}}
  12. {{ $ENABLE_REMB := .Env.ENABLE_REMB | default "true" | toBool -}}
  13. {{ $ENABLE_REQUIRE_DISPLAY_NAME := .Env.ENABLE_REQUIRE_DISPLAY_NAME | default "false" | toBool -}}
  14. {{ $ENABLE_SIMULCAST := .Env.ENABLE_SIMULCAST | default "true" | toBool -}}
  15. {{ $ENABLE_STATS_ID := .Env.ENABLE_STATS_ID | default "false" | toBool -}}
  16. {{ $ENABLE_STEREO := .Env.ENABLE_STEREO | default "false" | toBool -}}
  17. {{ $ENABLE_TALK_WHILE_MUTED := .Env.ENABLE_TALK_WHILE_MUTED | default "false" | toBool -}}
  18. {{ $ENABLE_TCC := .Env.ENABLE_TCC | default "true" | toBool -}}
  19. {{ $ENABLE_TRANSCRIPTIONS := .Env.ENABLE_TRANSCRIPTIONS | default "false" | toBool -}}
  20. {{ $RESOLUTION := .Env.RESOLUTION | default "720" -}}
  21. {{ $RESOLUTION_MIN := .Env.RESOLUTION_MIN | default "180" -}}
  22. {{ $RESOLUTION_WIDTH := .Env.RESOLUTION_WIDTH | default "1280" -}}
  23. {{ $RESOLUTION_WIDTH_MIN := .Env.RESOLUTION_WIDTH_MIN | default "320" -}}
  24. {{ $START_AUDIO_ONLY := .Env.START_AUDIO_ONLY | default "false" | toBool -}}
  25. {{ $START_AUDIO_MUTED := .Env.START_AUDIO_MUTED | default 10 -}}
  26. {{ $START_VIDEO_MUTED := .Env.START_VIDEO_MUTED | default 10 -}}
  27. {{ $TESTING_OCTO_PROBABILITY := .Env.TESTING_OCTO_PROBABILITY | default "0" -}}
  28. {{ $TESTING_CAP_SCREENSHARE_BITRATE := .Env.TESTING_CAP_SCREENSHARE_BITRATE | default "1" -}}
  29. {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN -}}
  30. {{ $XMPP_RECORDER_DOMAIN := .Env.XMPP_RECORDER_DOMAIN -}}
  31. // Video configuration.
  32. //
  33. if (!config.hasOwnProperty('constraints')) config.constraints = {};
  34. if (!config.constraints.hasOwnProperty('video')) config.constraints.video = {};
  35. config.resolution = {{ $RESOLUTION }};
  36. config.constraints.video.height = { ideal: {{ $RESOLUTION }}, max: {{ $RESOLUTION }}, min: {{ $RESOLUTION_MIN }} };
  37. config.constraints.video.width = { ideal: {{ $RESOLUTION_WIDTH }}, max: {{ $RESOLUTION_WIDTH }}, min: {{ $RESOLUTION_WIDTH_MIN }}};
  38. config.disableSimulcast = {{ not $ENABLE_SIMULCAST }};
  39. config.startVideoMuted = {{ $START_VIDEO_MUTED }};
  40. {{ if .Env.START_BITRATE -}}
  41. config.startBitrate = '{{ .Env.START_BITRATE }}';
  42. {{ end -}}
  43. // Audio configuration.
  44. //
  45. config.enableNoAudioDetection = {{ $ENABLE_NO_AUDIO_DETECTION }};
  46. config.enableTalkWhileMuted = {{ $ENABLE_TALK_WHILE_MUTED }};
  47. config.disableAP = {{ not $ENABLE_AUDIO_PROCESSING }};
  48. config.stereo = {{ $ENABLE_STEREO }};
  49. config.startAudioOnly = {{ $START_AUDIO_ONLY }};
  50. config.startAudioMuted = {{ $START_AUDIO_MUTED }};
  51. // Peer-to-Peer options.
  52. //
  53. if (!config.hasOwnProperty('p2p')) config.p2p = {};
  54. config.p2p.enabled = {{ $ENABLE_P2P }};
  55. // Etherpad
  56. //
  57. {{ if .Env.ETHERPAD_PUBLIC_URL -}}
  58. config.etherpad_base = '{{ .Env.ETHERPAD_PUBLIC_URL }}';
  59. {{ else if .Env.ETHERPAD_URL_BASE -}}
  60. config.etherpad_base = '{{.Env.PUBLIC_URL}}/etherpad/p/';
  61. {{ end -}}
  62. // Recording.
  63. //
  64. {{ if $ENABLE_RECORDING -}}
  65. config.hiddenDomain = '{{ $XMPP_RECORDER_DOMAIN }}';
  66. // Whether to enable file recording or not
  67. config.fileRecordingsEnabled = true;
  68. // Whether to enable live streaming or not.
  69. config.liveStreamingEnabled = true;
  70. {{ if .Env.DROPBOX_APPKEY -}}
  71. // Enable the dropbox integration.
  72. if (!config.hasOwnProperty('dropbox')) config.dropbox = {};
  73. config.dropbox.appKey = '{{ .Env.DROPBOX_APPKEY }}';
  74. {{ if .Env.DROPBOX_REDIRECT_URI -}}
  75. // A URL to redirect the user to, after authenticating
  76. // by default uses:
  77. // 'https://jitsi-meet.example.com/static/oauth.html'
  78. config.dropbox.redirectURI = '{{ .Env.DROPBOX_REDIRECT_URI }}';
  79. {{ end -}}
  80. {{ end -}}
  81. {{ if $ENABLE_FILE_RECORDING_SERVICE -}}
  82. // When integrations like dropbox are enabled only that will be shown,
  83. // by enabling fileRecordingsServiceEnabled, we show both the integrations
  84. // and the generic recording service (its configuration and storage type
  85. // depends on jibri configuration)
  86. config.fileRecordingsServiceEnabled = true;
  87. {{ end -}}
  88. {{ if $ENABLE_FILE_RECORDING_SERVICE_SHARING -}}
  89. // Whether to show the possibility to share file recording with other people
  90. // (e.g. meeting participants), based on the actual implementation
  91. // on the backend.
  92. config.fileRecordingsServiceSharingEnabled = true;
  93. {{ end -}}
  94. {{ end -}}
  95. // Analytics.
  96. //
  97. if (!config.hasOwnProperty('analytics')) config.analytics = {};
  98. {{ if .Env.AMPLITUDE_ID -}}
  99. // The Amplitude APP Key:
  100. config.analytics.amplitudeAPPKey = '{{ .Env.AMPLITUDE_ID }}';
  101. {{ end -}}
  102. {{ if .Env.GOOGLE_ANALYTICS_ID -}}
  103. // The Google Analytics Tracking ID:
  104. config.analytics.googleAnalyticsTrackingId = '{{ .Env.GOOGLE_ANALYTICS_ID }}';
  105. {{ end -}}
  106. {{ if .Env.MATOMO_ENDPOINT -}}
  107. // Matomo endpoint:
  108. config.analytics.matomoEndpoint = '{{ .Env.MATOMO_ENDPOINT }}';
  109. {{ end -}}
  110. {{ if .Env.MATOMO_SITE_ID -}}
  111. // Matomo site ID:
  112. config.analytics.matomoSiteID = '{{ .Env.MATOMO_SITE_ID }}';
  113. {{ end -}}
  114. {{ if .Env.ANALYTICS_SCRIPT_URLS -}}
  115. // Array of script URLs to load as lib-jitsi-meet "analytics handlers".
  116. config.analytics.scriptURLs = [ '{{ join "','" (splitList "," .Env.ANALYTICS_SCRIPT_URLS) }}' ];
  117. {{ end -}}
  118. {{ if .Env.ANALYTICS_WHITELISTED_EVENTS -}}
  119. config.analytics.whiteListedEvents = [ '{{ join "','" (splitList "," .Env.ANALYTICS_WHITELISTED_EVENTS) }}' ];
  120. {{ end -}}
  121. {{ if .Env.CALLSTATS_CUSTOM_SCRIPT_URL -}}
  122. config.callStatsCustomScriptUrl = '{{ .Env.CALLSTATS_CUSTOM_SCRIPT_URL }}';
  123. {{ end -}}
  124. {{ if .Env.CALLSTATS_ID -}}
  125. // To enable sending statistics to callstats.io you must provide the
  126. // Application ID and Secret.
  127. config.callStatsID = '{{ .Env.CALLSTATS_ID }}';
  128. {{ end -}}
  129. {{ if .Env.CALLSTATS_ID -}}
  130. config.callStatsSecret = '{{ .Env.CALLSTATS_SECRET }}';
  131. {{ end -}}
  132. // Enables callstatsUsername to be reported as statsId and used
  133. // by callstats as repoted remote id.
  134. config.enableStatsID = {{ $ENABLE_STATS_ID }};
  135. // Dial in/out services.
  136. //
  137. {{ if .Env.CONFCODE_URL -}}
  138. config.dialInConfCodeUrl = '{{ .Env.CONFCODE_URL }}';
  139. {{ end -}}
  140. {{ if .Env.DIALIN_NUMBERS_URL -}}
  141. config.dialInNumbersUrl = '{{ .Env.DIALIN_NUMBERS_URL }}';
  142. {{ end -}}
  143. {{ if .Env.DIALOUT_AUTH_URL -}}
  144. config.dialOutAuthUrl = '{{ .Env.DIALOUT_AUTH_URL }}';
  145. {{ end -}}
  146. {{ if .Env.DIALOUT_CODES_URL -}}
  147. config.dialOutCodesUrl = '{{ .Env.DIALOUT_CODES_URL }}';
  148. {{ end -}}
  149. // Calendar service integration.
  150. //
  151. config.enableCalendarIntegration = {{ $ENABLE_CALENDAR }};
  152. {{ if .Env.GOOGLE_API_APP_CLIENT_ID -}}
  153. config.googleApiApplicationClientID = '{{ .Env.GOOGLE_API_APP_CLIENT_ID }}';
  154. {{ end -}}
  155. {{ if .Env.MICROSOFT_API_APP_CLIENT_ID -}}
  156. config.microsoftApiApplicationClientID = '{{ .Env.MICROSOFT_API_APP_CLIENT_ID }}';
  157. {{ end -}}
  158. // Invitation service.
  159. //
  160. {{ if .Env.INVITE_SERVICE_URL -}}
  161. config.inviteServiceUrl = '{{ .Env.INVITE_SERVICE_URL }}';
  162. {{ end -}}
  163. {{ if .Env.PEOPLE_SEARCH_URL -}}
  164. config.peopleSearchUrl = '{{ .Env.PEOPLE_SEARCH_URL }}';
  165. config.peopleSearchQueryTypes = ['user','conferenceRooms'];
  166. {{ end -}}
  167. // Miscellaneous.
  168. //
  169. // Require users to always specify a display name.
  170. config.requireDisplayName = {{ $ENABLE_REQUIRE_DISPLAY_NAME }};
  171. // Chrome extension banner.
  172. {{ if .Env.CHROME_EXTENSION_BANNER_JSON -}}
  173. config.chromeExtensionBanner = {{ .Env.CHROME_EXTENSION_BANNER_JSON }};
  174. {{ end -}}
  175. // Advanced.
  176. //
  177. // Lipsync hack in jicofo, may not be safe.
  178. config.enableLipSync = {{ $ENABLE_LIPSYNC }};
  179. config.enableRemb = {{ $ENABLE_REMB }};
  180. config.enableTcc = {{ $ENABLE_TCC }};
  181. config.openBridgeChannel = '{{ $BRIDGE_CHANNEL }}';
  182. // Enable IPv6 support.
  183. config.useIPv6 = {{ $ENABLE_IPV6 }};
  184. // Transcriptions (subtitles and buttons can be configured in interface_config)
  185. config.transcribingEnabled = {{ $ENABLE_TRANSCRIPTIONS }};
  186. {{ if .Env.BRANDING_DATA_URL -}}
  187. // External API url used to receive branding specific information.
  188. config.brandingDataUrl = '{{ .Env.BRANDING_DATA_URL }}';
  189. {{ end -}}
  190. // Deployment information.
  191. //
  192. if (!config.hasOwnProperty('deploymentInfo')) config.deploymentInfo = {};
  193. {{ if .Env.DEPLOYMENTINFO_ENVIRONMENT -}}
  194. config.deploymentInfo.environment = '{{ .Env.DEPLOYMENTINFO_ENVIRONMENT }}';
  195. {{ end -}}
  196. {{ if .Env.DEPLOYMENTINFO_ENVIRONMENT_TYPE -}}
  197. config.deploymentInfo.envType = '{{ .Env.DEPLOYMENTINFO_ENVIRONMENT_TYPE }}';
  198. {{ end -}}
  199. {{ if $DEPLOYMENTINFO_USERREGION -}}
  200. config.deploymentInfo.userRegion = '{{ $DEPLOYMENTINFO_USERREGION }}';
  201. {{ end -}}
  202. // Testing
  203. //
  204. if (!config.hasOwnProperty('testing')) config.testing = {};
  205. if (!config.testing.hasOwnProperty('octo')) config.testing.octo = {};
  206. config.testing.capScreenshareBitrate = {{ $TESTING_CAP_SCREENSHARE_BITRATE }};
  207. config.testing.octo.probability = {{ $TESTING_OCTO_PROBABILITY }};