Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

constants.js 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. // @flow
  2. import { BoxModel } from '../base/styles';
  3. /**
  4. * The size (height and width) of the small (not tile view) thumbnails.
  5. */
  6. export const SMALL_THUMBNAIL_SIZE = 80;
  7. /**
  8. * The height of the filmstrip in narrow aspect ratio, or width in wide.
  9. */
  10. export const FILMSTRIP_SIZE = SMALL_THUMBNAIL_SIZE + BoxModel.margin;
  11. /**
  12. * The aspect ratio of a tile in tile view.
  13. */
  14. export const TILE_ASPECT_RATIO = 16 / 9;
  15. /**
  16. * The aspect ratio of a square tile in tile view.
  17. */
  18. export const SQUARE_TILE_ASPECT_RATIO = 1;
  19. /**
  20. * Width below which the overflow menu(s) will be displayed as drawer(s).
  21. */
  22. export const DISPLAY_DRAWER_THRESHOLD = 512;
  23. /**
  24. * Breakpoint past which a single column view is enforced in tile view.
  25. */
  26. export const SINGLE_COLUMN_BREAKPOINT = 300;
  27. /**
  28. * Breakpoint past which a two column view is enforced in tile view.
  29. */
  30. export const TWO_COLUMN_BREAKPOINT = 1000;
  31. /**
  32. * Breakpoint past which the aspect ratio is switched in tile view.
  33. * Also, past this breakpoint, if there are two participants in the conference, we enforce
  34. * single column view.
  35. * If this is to be modified, please also change the related media query from the tile_view scss file.
  36. */
  37. export const ASPECT_RATIO_BREAKPOINT = 500;
  38. /**
  39. * The default number of columns for tile view.
  40. */
  41. export const DEFAULT_MAX_COLUMNS = 5;
  42. /**
  43. * An extended number of columns for tile view.
  44. */
  45. export const ABSOLUTE_MAX_COLUMNS = 7;
  46. /**
  47. * An array of attributes of the video element that will be used for adding a listener for every event in the list.
  48. * The latest event will be stored in redux. This is currently used by torture only.
  49. */
  50. export const VIDEO_TEST_EVENTS = [
  51. 'onAbort',
  52. 'onCanPlay',
  53. 'onCanPlayThrough',
  54. 'onEmptied',
  55. 'onEnded',
  56. 'onError',
  57. 'onLoadedData',
  58. 'onLoadedMetadata',
  59. 'onLoadStart',
  60. 'onPause',
  61. 'onPlay',
  62. 'onPlaying',
  63. 'onRateChange',
  64. 'onStalled',
  65. 'onSuspend',
  66. 'onWaiting'
  67. ];
  68. /**
  69. * Display mode constant used when video is being displayed on the small video.
  70. * @type {number}
  71. * @constant
  72. */
  73. export const DISPLAY_VIDEO = 0;
  74. /**
  75. * Display mode constant used when the user's avatar is being displayed on
  76. * the small video.
  77. * @type {number}
  78. * @constant
  79. */
  80. export const DISPLAY_AVATAR = 1;
  81. /**
  82. * Display mode constant used when neither video nor avatar is being displayed
  83. * on the small video. And we just show the display name.
  84. * @type {number}
  85. * @constant
  86. */
  87. export const DISPLAY_BLACKNESS_WITH_NAME = 2;
  88. /**
  89. * Display mode constant used when video is displayed and display name
  90. * at the same time.
  91. * @type {number}
  92. * @constant
  93. */
  94. export const DISPLAY_VIDEO_WITH_NAME = 3;
  95. /**
  96. * Display mode constant used when neither video nor avatar is being displayed
  97. * on the small video. And we just show the display name.
  98. * @type {number}
  99. * @constant
  100. */
  101. export const DISPLAY_AVATAR_WITH_NAME = 4;
  102. /**
  103. * Maps the display modes to class name that will be applied on the thumbnail container.
  104. * @type {Array<string>}
  105. * @constant
  106. */
  107. export const DISPLAY_MODE_TO_CLASS_NAME = [
  108. 'display-video',
  109. 'display-avatar-only',
  110. 'display-name-on-black',
  111. 'display-name-on-video',
  112. 'display-avatar-with-name'
  113. ];
  114. /**
  115. * Maps the display modes to string.
  116. * @type {Array<string>}
  117. * @constant
  118. */
  119. export const DISPLAY_MODE_TO_STRING = [
  120. 'video',
  121. 'avatar',
  122. 'blackness-with-name',
  123. 'video-with-name',
  124. 'avatar-with-name'
  125. ];
  126. /**
  127. * The vertical margin of a tile.
  128. *
  129. * @type {number}
  130. */
  131. export const TILE_VERTICAL_MARGIN = 4;
  132. /**
  133. * The horizontal margin of a tile.
  134. *
  135. * @type {number}
  136. */
  137. export const TILE_HORIZONTAL_MARGIN = 4;
  138. /**
  139. * The height of the whole toolbar.
  140. */
  141. export const TOOLBAR_HEIGHT = 72;
  142. /**
  143. * The size of the horizontal border of a thumbnail.
  144. *
  145. * @type {number}
  146. */
  147. export const STAGE_VIEW_THUMBNAIL_HORIZONTAL_BORDER = 4;
  148. /**
  149. * The size of the vertical border of a thumbnail.
  150. *
  151. * @type {number}
  152. */
  153. export const STAGE_VIEW_THUMBNAIL_VERTICAL_BORDER = 4;
  154. /**
  155. * The size of the scroll.
  156. *
  157. * @type {number}
  158. */
  159. export const SCROLL_SIZE = 7;
  160. /**
  161. * The total vertical space between the thumbnails container and the edges of the window.
  162. *
  163. * NOTE: This will include margins, paddings and the space for the 'hide filmstrip' icon.
  164. *
  165. * @type {number}
  166. */
  167. export const VERTICAL_FILMSTRIP_VERTICAL_MARGIN = 60;
  168. /**
  169. * The min horizontal space between the thumbnails container and the edges of the window.
  170. *
  171. * @type {number}
  172. */
  173. export const VERTICAL_FILMSTRIP_MIN_HORIZONTAL_MARGIN = 10;
  174. /**
  175. * The total horizontal space between the thumbnails container and the edges of the window.
  176. *
  177. * NOTE: This will include margins, paddings and the space for the 'hide filmstrip' icon.
  178. *
  179. * @type {number}
  180. */
  181. export const HORIZONTAL_FILMSTRIP_MARGIN = 39;
  182. /**
  183. * Sets after how many ms to show the thumbnail context menu on long touch on mobile.
  184. *
  185. * @type {number}
  186. */
  187. export const SHOW_TOOLBAR_CONTEXT_MENU_AFTER = 600;