您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

constants.ts 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. import { NativeToolbarButton, ToolbarButton } from './types';
  2. /**
  3. * Dummy toolbar threschold value for 9 buttons. It is used as a placeholder in THRESHOLDS that would work only when
  4. * this value is overiden.
  5. */
  6. export const DUMMY_9_BUTTONS_THRESHOLD_VALUE = Symbol('9_BUTTONS_THRESHOLD_VALUE');
  7. /**
  8. * Dummy toolbar threschold value for 10 buttons. It is used as a placeholder in THRESHOLDS that would work only when
  9. * this value is overiden.
  10. */
  11. export const DUMMY_10_BUTTONS_THRESHOLD_VALUE = Symbol('10_BUTTONS_THRESHOLD_VALUE');
  12. /**
  13. * Thresholds for displaying toolbox buttons.
  14. */
  15. export const THRESHOLDS = [
  16. // This entry won't be used unless the order is overridden trough the mainToolbarButtons config prop.
  17. {
  18. width: 675,
  19. order: DUMMY_10_BUTTONS_THRESHOLD_VALUE
  20. },
  21. // This entry won't be used unless the order is overridden trough the mainToolbarButtons config prop.
  22. {
  23. width: 625,
  24. order: DUMMY_9_BUTTONS_THRESHOLD_VALUE
  25. },
  26. {
  27. width: 565,
  28. order: [ 'microphone', 'camera', 'desktop', 'chat', 'raisehand', 'reactions', 'participants-pane', 'tileview' ]
  29. },
  30. {
  31. width: 520,
  32. order: [ 'microphone', 'camera', 'desktop', 'chat', 'raisehand', 'participants-pane', 'tileview' ]
  33. },
  34. {
  35. width: 470,
  36. order: [ 'microphone', 'camera', 'desktop', 'chat', 'raisehand', 'participants-pane' ]
  37. },
  38. {
  39. width: 420,
  40. order: [ 'microphone', 'camera', 'desktop', 'chat', 'participants-pane' ]
  41. },
  42. {
  43. width: 370,
  44. order: [ 'microphone', 'camera', 'chat', 'participants-pane' ]
  45. },
  46. {
  47. width: 225,
  48. order: [ 'microphone', 'camera', 'chat' ]
  49. },
  50. {
  51. width: 200,
  52. order: [ 'microphone', 'camera' ]
  53. }
  54. ];
  55. /**
  56. * Thresholds for displaying native toolbox buttons.
  57. */
  58. export const NATIVE_THRESHOLDS = [
  59. {
  60. width: 560,
  61. order: [ 'microphone', 'camera', 'chat', 'screensharing', 'raisehand', 'tileview', 'overflowmenu', 'hangup' ]
  62. },
  63. {
  64. width: 500,
  65. order: [ 'microphone', 'camera', 'chat', 'raisehand', 'tileview', 'overflowmenu', 'hangup' ]
  66. },
  67. {
  68. width: 440,
  69. order: [ 'microphone', 'camera', 'chat', 'raisehand', 'overflowmenu', 'hangup' ]
  70. },
  71. {
  72. width: 380,
  73. order: [ 'microphone', 'camera', 'chat', 'overflowmenu', 'hangup' ]
  74. },
  75. {
  76. width: 320,
  77. order: [ 'microphone', 'camera', 'overflowmenu', 'hangup' ]
  78. }
  79. ];
  80. /**
  81. * Main toolbar buttons priority used to determine which button should be picked to fill empty spaces for disabled
  82. * buttons.
  83. */
  84. export const MAIN_TOOLBAR_BUTTONS_PRIORITY = [
  85. 'microphone',
  86. 'camera',
  87. 'desktop',
  88. 'chat',
  89. 'raisehand',
  90. 'reactions',
  91. 'participants-pane',
  92. 'tileview',
  93. 'overflowmenu',
  94. 'hangup',
  95. 'invite',
  96. 'toggle-camera',
  97. 'videoquality',
  98. 'fullscreen',
  99. 'security',
  100. 'closedcaptions',
  101. 'recording',
  102. 'livestreaming',
  103. 'linktosalesforce',
  104. 'sharedvideo',
  105. 'shareaudio',
  106. 'noisesuppression',
  107. 'whiteboard',
  108. 'etherpad',
  109. 'select-background',
  110. 'stats',
  111. 'settings',
  112. 'shortcuts',
  113. 'profile',
  114. 'embedmeeting',
  115. 'feedback',
  116. 'download',
  117. 'help'
  118. ];
  119. export const TOOLBAR_TIMEOUT = 4000;
  120. export const DRAWER_MAX_HEIGHT = '80dvh - 64px';
  121. // Around 300 to be displayed above components like chat
  122. export const ZINDEX_DIALOG_PORTAL = 302;
  123. /**
  124. * Color for spinner displayed in the toolbar.
  125. */
  126. export const SPINNER_COLOR = '#929292';
  127. /**
  128. * The list of all possible UI buttons.
  129. *
  130. * @protected
  131. * @type Array<string>
  132. */
  133. export const TOOLBAR_BUTTONS: ToolbarButton[] = [
  134. 'camera',
  135. 'chat',
  136. 'closedcaptions',
  137. 'desktop',
  138. 'download',
  139. 'embedmeeting',
  140. 'etherpad',
  141. 'feedback',
  142. 'filmstrip',
  143. 'fullscreen',
  144. 'hangup',
  145. 'help',
  146. 'highlight',
  147. 'invite',
  148. 'linktosalesforce',
  149. 'livestreaming',
  150. 'microphone',
  151. 'mute-everyone',
  152. 'mute-video-everyone',
  153. 'participants-pane',
  154. 'profile',
  155. 'raisehand',
  156. 'recording',
  157. 'security',
  158. 'select-background',
  159. 'settings',
  160. 'shareaudio',
  161. 'noisesuppression',
  162. 'sharedvideo',
  163. 'shortcuts',
  164. 'stats',
  165. 'tileview',
  166. 'toggle-camera',
  167. 'videoquality',
  168. 'whiteboard'
  169. ];
  170. /**
  171. * The list of all possible native buttons.
  172. *
  173. * @protected
  174. * @type Array<string>
  175. */
  176. export const NATIVE_TOOLBAR_BUTTONS: NativeToolbarButton[] = [
  177. 'camera',
  178. 'chat',
  179. 'hangup',
  180. 'microphone',
  181. 'overflowmenu',
  182. 'raisehand',
  183. 'screensharing',
  184. 'tileview'
  185. ];
  186. /**
  187. * The toolbar buttons to show when in visitors mode.
  188. */
  189. export const VISITORS_MODE_BUTTONS: ToolbarButton[] = [
  190. 'chat',
  191. 'closedcaptions',
  192. 'fullscreen',
  193. 'hangup',
  194. 'raisehand',
  195. 'settings',
  196. 'stats',
  197. 'tileview',
  198. 'videoquality'
  199. ];