2
0

settings-config.js 10 KB

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