settings-config.js 11 KB

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