settings-config.js 8.9 KB

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