You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

constants.js 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. // @flow
  2. /**
  3. * The height of the filmstrip in narrow aspect ratio, or width in wide.
  4. */
  5. export const FILMSTRIP_SIZE = 90;
  6. /**
  7. * The aspect ratio of a tile in tile view.
  8. */
  9. export const TILE_ASPECT_RATIO = 16 / 9;
  10. /**
  11. * The aspect ratio of a square tile in tile view.
  12. */
  13. export const SQUARE_TILE_ASPECT_RATIO = 1;
  14. /**
  15. * Width below which the overflow menu(s) will be displayed as drawer(s).
  16. */
  17. export const DISPLAY_DRAWER_THRESHOLD = 512;
  18. /**
  19. * Breakpoint past which a single column view is enforced in tile view.
  20. */
  21. export const SINGLE_COLUMN_BREAKPOINT = 300;
  22. /**
  23. * Breakpoint past which a two column view is enforced in tile view.
  24. */
  25. export const TWO_COLUMN_BREAKPOINT = 1000;
  26. /**
  27. * Breakpoint past which the aspect ratio is switched in tile view.
  28. * Also, past this breakpoint, if there are two participants in the conference, we enforce
  29. * single column view.
  30. * If this is to be modified, please also change the related media query from the tile_view scss file.
  31. */
  32. export const ASPECT_RATIO_BREAKPOINT = 500;
  33. /**
  34. * The default number of columns for tile view.
  35. */
  36. export const DEFAULT_MAX_COLUMNS = 5;
  37. /**
  38. * An extended number of columns for tile view.
  39. */
  40. export const ABSOLUTE_MAX_COLUMNS = 7;
  41. /**
  42. * An array of attributes of the video element that will be used for adding a listener for every event in the list.
  43. * The latest event will be stored in redux. This is currently used by torture only.
  44. */
  45. export const VIDEO_TEST_EVENTS = [
  46. 'onAbort',
  47. 'onCanPlay',
  48. 'onCanPlayThrough',
  49. 'onEmptied',
  50. 'onEnded',
  51. 'onError',
  52. 'onLoadedData',
  53. 'onLoadedMetadata',
  54. 'onLoadStart',
  55. 'onPause',
  56. 'onPlay',
  57. 'onPlaying',
  58. 'onRateChange',
  59. 'onStalled',
  60. 'onSuspend',
  61. 'onWaiting'
  62. ];
  63. /**
  64. * Display mode constant used when video is being displayed on the small video.
  65. * @type {number}
  66. * @constant
  67. */
  68. export const DISPLAY_VIDEO = 0;
  69. /**
  70. * Display mode constant used when the user's avatar is being displayed on
  71. * the small video.
  72. * @type {number}
  73. * @constant
  74. */
  75. export const DISPLAY_AVATAR = 1;
  76. /**
  77. * Display mode constant used when neither video nor avatar is being displayed
  78. * on the small video. And we just show the display name.
  79. * @type {number}
  80. * @constant
  81. */
  82. export const DISPLAY_BLACKNESS_WITH_NAME = 2;
  83. /**
  84. * Display mode constant used when video is displayed and display name
  85. * at the same time.
  86. * @type {number}
  87. * @constant
  88. */
  89. export const DISPLAY_VIDEO_WITH_NAME = 3;
  90. /**
  91. * Display mode constant used when neither video nor avatar is being displayed
  92. * on the small video. And we just show the display name.
  93. * @type {number}
  94. * @constant
  95. */
  96. export const DISPLAY_AVATAR_WITH_NAME = 4;
  97. /**
  98. * Maps the display modes to class name that will be applied on the thumbnail container.
  99. * @type {Array<string>}
  100. * @constant
  101. */
  102. export const DISPLAY_MODE_TO_CLASS_NAME = [
  103. 'display-video',
  104. 'display-avatar-only',
  105. 'display-name-on-black',
  106. 'display-name-on-video',
  107. 'display-avatar-with-name'
  108. ];
  109. /**
  110. * Maps the display modes to string.
  111. * @type {Array<string>}
  112. * @constant
  113. */
  114. export const DISPLAY_MODE_TO_STRING = [
  115. 'video',
  116. 'avatar',
  117. 'blackness-with-name',
  118. 'video-with-name',
  119. 'avatar-with-name'
  120. ];