@azure/communication-react 1.9.0 → 1.10.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/dist/communication-react.d.ts +2403 -189
  2. package/dist/dist-cjs/communication-react/index.js +14191 -7849
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +2 -1
  7. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -0
  8. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +12 -0
  10. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +13 -1
  11. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +4 -0
  13. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +13 -3
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +18 -2
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +10 -0
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +15 -1
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +45 -0
  22. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +91 -0
  23. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -0
  24. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +4 -1
  25. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +19 -0
  26. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +6 -0
  28. package/dist/dist-esm/calling-component-bindings/src/index.js +8 -0
  29. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +1 -0
  31. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +16 -3
  32. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  33. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +4 -3
  34. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
  35. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +14 -2
  36. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +20 -1
  37. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
  38. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +7 -0
  39. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +12 -0
  40. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  41. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +4 -0
  42. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +11 -0
  43. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  44. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +2 -1
  45. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +8 -1
  46. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  47. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +8 -2
  48. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  49. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +6 -5
  50. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -1
  51. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +15 -1
  52. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
  53. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +2 -1
  54. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +5 -0
  55. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  56. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +60 -3
  57. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +8 -1
  59. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +62 -1
  60. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  61. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +41 -0
  62. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  63. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
  64. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +8 -0
  65. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  66. package/dist/dist-esm/calling-stateful-client/src/Converter.js +12 -0
  67. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  68. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.d.ts +1 -0
  69. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js +8 -0
  70. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js.map +1 -1
  71. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.d.ts +1 -0
  72. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js +8 -0
  73. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js.map +1 -1
  74. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +25 -1
  75. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +33 -2
  76. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  77. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +19 -0
  78. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +91 -0
  79. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +1 -0
  80. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +23 -0
  81. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +49 -0
  82. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -0
  83. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +2 -2
  84. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +8 -0
  85. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  86. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +3 -0
  87. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  88. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +4 -1
  89. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  90. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +119 -6
  91. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  92. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  93. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  94. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -1
  95. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  96. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +3 -1
  97. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  98. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +4 -1
  99. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
  100. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +1 -0
  101. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  102. package/dist/dist-esm/communication-react/src/index.d.ts +27 -0
  103. package/dist/dist-esm/communication-react/src/index.js +16 -0
  104. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  105. package/dist/dist-esm/react-components/src/components/Caption.js +1 -0
  106. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +22 -1
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +9 -2
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +2 -0
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +25 -16
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +22 -1
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +49 -15
  115. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  116. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +15 -0
  117. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +92 -2
  118. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +10 -0
  120. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +15 -0
  121. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +1 -0
  122. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +69 -0
  123. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +43 -0
  124. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +1 -0
  125. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +75 -0
  126. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +75 -0
  127. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +1 -0
  128. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +105 -0
  129. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +68 -0
  130. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +1 -0
  131. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +86 -0
  132. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +39 -0
  133. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +1 -0
  134. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +6 -0
  135. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +2 -2
  137. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
  138. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.d.ts +4 -0
  139. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +20 -19
  140. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
  141. package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +29 -1
  142. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +24 -2
  143. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  144. package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +49 -0
  145. package/dist/dist-esm/react-components/src/components/HoldButton.js +25 -0
  146. package/dist/dist-esm/react-components/src/components/HoldButton.js.map +1 -0
  147. package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +71 -0
  148. package/dist/dist-esm/react-components/src/components/ImageGallery.js +56 -0
  149. package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +1 -0
  150. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +3 -5
  151. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +22 -5
  152. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +1 -1
  154. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +121 -0
  155. package/dist/dist-esm/react-components/src/components/MentionPopover.js +117 -0
  156. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +1 -0
  157. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +51 -2
  158. package/dist/dist-esm/react-components/src/components/MessageThread.js +57 -8
  159. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  160. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +13 -0
  161. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +3 -0
  162. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  163. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +15 -0
  164. package/dist/dist-esm/react-components/src/components/ParticipantList.js +22 -4
  165. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  166. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -1
  167. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +3 -1
  168. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  169. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +41 -0
  170. package/dist/dist-esm/react-components/src/components/SendBox.js +32 -4
  171. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  172. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +41 -0
  173. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +573 -0
  174. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +1 -0
  175. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +152 -0
  176. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +816 -0
  177. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +1 -0
  178. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +2 -0
  179. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  180. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +2 -0
  181. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  182. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +24 -0
  183. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  184. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +2 -0
  185. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  186. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +7 -3
  187. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
  188. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +4 -0
  189. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +25 -15
  190. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
  191. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.d.ts +2 -2
  192. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.js +6 -4
  193. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.js.map +1 -1
  194. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +5 -0
  195. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +8 -3
  196. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  197. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.d.ts +1 -1
  198. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.d.ts +1 -1
  199. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.d.ts +5 -0
  200. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js +8 -3
  201. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js.map +1 -1
  202. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +15 -3
  203. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  204. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +13 -0
  205. package/dist/dist-esm/react-components/src/components/VideoGallery.js +15 -5
  206. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  207. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +7 -0
  208. package/dist/dist-esm/react-components/src/components/VideoTile.js +7 -1
  209. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  210. package/dist/dist-esm/react-components/src/components/index.d.ts +19 -0
  211. package/dist/dist-esm/react-components/src/components/index.js +12 -0
  212. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  213. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +58 -0
  214. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +144 -0
  215. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +1 -0
  216. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.d.ts +12 -0
  217. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +25 -2
  218. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
  219. package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js +2 -2
  220. package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js.map +1 -1
  221. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +68 -0
  222. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +205 -0
  223. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +1 -0
  224. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.d.ts +0 -4
  225. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js +0 -9
  226. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js.map +1 -1
  227. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +26 -0
  228. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +68 -0
  229. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +1 -0
  230. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +1 -1
  231. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +38 -0
  232. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +92 -0
  233. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +1 -0
  234. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +26 -0
  235. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +67 -0
  236. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +1 -0
  237. package/dist/dist-esm/react-components/src/components/utils/common.js +4 -0
  238. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  239. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +2 -1
  240. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  241. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +7 -0
  242. package/dist/dist-esm/react-components/src/components/utils/merge.js +16 -0
  243. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +1 -0
  244. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +4 -0
  245. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +5 -1
  246. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  247. package/dist/dist-esm/react-components/src/index.d.ts +1 -0
  248. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  249. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +63 -0
  250. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  251. package/dist/dist-esm/react-components/src/theming/icons.d.ts +87 -72
  252. package/dist/dist-esm/react-components/src/theming/icons.js +108 -0
  253. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  254. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +6 -0
  255. package/dist/dist-esm/react-components/src/theming/icons.styles.js +25 -0
  256. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -0
  257. package/dist/dist-esm/react-components/src/theming/themes.d.ts +21 -2
  258. package/dist/dist-esm/react-components/src/theming/themes.js +16 -0
  259. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  260. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +27 -1
  261. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  262. package/dist/dist-esm/react-components/src/types/OnRender.d.ts +8 -0
  263. package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
  264. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +6 -0
  265. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js +2 -0
  266. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +78 -0
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +87 -7
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +144 -0
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +75 -5
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +317 -50
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +130 -1
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +2 -1
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +7 -1
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +6 -0
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +2 -0
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  284. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +2 -0
  285. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +67 -10
  286. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  287. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +1 -0
  288. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +121 -12
  289. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  290. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +48 -0
  291. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +218 -0
  292. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -0
  293. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +2 -0
  294. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +27 -0
  295. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  296. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +20 -2
  297. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  298. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +2 -0
  299. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +27 -0
  300. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +12 -0
  302. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +93 -0
  303. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +1 -0
  304. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +1 -0
  305. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +33 -6
  306. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  307. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +0 -9
  308. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +21 -37
  309. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  310. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +0 -4
  311. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
  312. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +4 -2
  313. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  314. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +36 -2
  315. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  316. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +4 -2
  317. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  318. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +8 -0
  319. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +26 -0
  320. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +1 -0
  321. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +8 -1
  322. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  323. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +6 -2
  324. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  325. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +23 -6
  326. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  327. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +6 -0
  328. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +2 -0
  329. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  330. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +1 -2
  331. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +6 -3
  332. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  333. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +7 -0
  334. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +97 -6
  335. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  336. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +24 -0
  337. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +28 -0
  338. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -0
  339. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  340. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  341. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.d.ts +11 -0
  342. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +113 -0
  343. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -0
  344. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +15 -0
  345. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +54 -0
  346. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +1 -0
  347. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.d.ts +5 -0
  348. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.d.ts +5 -0
  349. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +9 -0
  350. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +10 -0
  351. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  352. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/callStatusSelector.d.ts +5 -0
  353. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/capabilitiesChangedInfoAndRoleSelector.d.ts +5 -0
  354. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/complianceBannerSelector.d.ts +5 -0
  355. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/deviceCountSelector.d.ts +5 -0
  356. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.d.ts +5 -0
  357. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.d.ts +5 -0
  358. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +4 -0
  359. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
  360. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.d.ts +5 -0
  361. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +5 -0
  362. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.d.ts +5 -0
  363. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.d.ts +5 -0
  364. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +10 -0
  365. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.d.ts +5 -0
  366. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.d.ts +5 -0
  367. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +32 -0
  368. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +81 -0
  369. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +1 -0
  370. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.d.ts +37 -0
  371. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js +73 -0
  372. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js.map +1 -0
  373. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +1 -80
  374. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
  375. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +15 -3
  376. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +88 -1
  377. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  378. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +68 -1
  379. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +35 -5
  380. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  381. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +32 -0
  382. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  383. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +30 -5
  384. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +111 -4
  385. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  386. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +64 -0
  387. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  388. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +10 -2
  389. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +40 -0
  390. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  391. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +13 -0
  392. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +37 -1
  393. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  394. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -0
  395. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
  396. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +24 -0
  397. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +11 -1
  398. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  399. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +20 -0
  400. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +4 -0
  401. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  402. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +133 -5
  403. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  404. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +18 -0
  405. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +18 -0
  406. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +1 -0
  407. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.d.ts +15 -0
  408. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js +23 -0
  409. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js.map +1 -0
  410. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +4 -0
  411. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  412. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +28 -2
  413. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +126 -4
  414. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  415. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +28 -0
  416. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +159 -1
  417. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
  418. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +17 -2
  419. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  420. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +2 -0
  421. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
  422. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js +8 -1
  423. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js.map +1 -1
  424. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +6 -0
  425. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +11 -0
  426. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +1 -0
  427. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +4 -0
  428. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  429. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +12 -0
  430. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +15 -0
  431. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -0
  432. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +34 -0
  433. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js +14 -0
  434. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js.map +1 -0
  435. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +5 -1
  436. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +11 -0
  437. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  438. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +22 -0
  439. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +107 -0
  440. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -0
  441. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +17 -0
  442. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +32 -0
  443. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +1 -0
  444. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +5 -0
  445. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +3 -2
  446. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
  447. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +22 -0
  448. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +74 -0
  449. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -0
  450. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +15 -0
  451. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +61 -0
  452. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +1 -0
  453. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +2 -0
  454. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +8 -2
  455. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
  456. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +2 -0
  457. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +14 -6
  458. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  459. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +84 -23
  460. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +13 -5
  461. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
  462. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +2 -0
  463. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +70 -1
  464. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  465. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +65 -3
  466. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  467. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +1 -0
  468. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  469. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +20 -3
  470. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  471. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.d.ts +1 -2
  472. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +3 -1
  473. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  474. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +21 -2
  475. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  476. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +17 -0
  477. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +50 -0
  478. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -0
  479. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.d.ts +11 -0
  480. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +40 -0
  481. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +1 -0
  482. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +103 -73
  483. package/dist/dist-esm/react-composites/src/composites/common/icons.js +18 -2
  484. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  485. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +21 -83
  486. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  487. package/dist/dist-esm/react-composites/src/composites/index.d.ts +1 -0
  488. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  489. package/dist/tsdoc-metadata.json +1 -1
  490. package/package.json +6 -74
  491. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -13
  492. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +0 -32
  493. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingLocalVideoLayout.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,mDAAmD;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,wCAAwC,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnN,mDAAmD;AACnD,OAAO,EAAE,8CAA8C,EAAE,wCAAwC,EAAE,MAA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E,MAAM,EAAE,qBAAqB;YAC7G,KAAK,CAAC,uBAAuB,KAAK,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,yCAAK;YAC7H,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAC,UAAU,IAAC,GAAG,EAAC,aAAa,EAAC,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,IAClG,SAAS,CACC;YACd,yBAAyB,CAAC,eAAe,EAAE,kDAAkD,CAAA,KAAK,CAAC,uBAAuB,CAAC,CACtH,CACF,CAAC;AACb,CAAC,CAAC;AACF,MAAM,yBAAyB,GAAG,CAAC,OAA2B,EAAE,eAAwE,EAAsB,EAAE;IAC9J,kDAAkD;IAClD,OAAO,eAAe,KAAK,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,yCAAK,CAAC;IAC7D,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { LayerHost, mergeStyles, Stack } from '@fluentui/react';\nimport { useId } from '@fluentui/react-hooks';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { useTheme } from '../../theming';\nimport { GridLayout } from '../GridLayout';\nimport { isNarrowWidth } from '../utils/responsive';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { isShortHeight } from '../utils/responsive';\nimport { FloatingLocalVideo } from './FloatingLocalVideo';\nimport { LayoutProps } from './Layout';\nimport { LARGE_FLOATING_MODAL_SIZE_REM, localVideoTileContainerStyle, localVideoTileWithControlsContainerStyle, LOCAL_VIDEO_TILE_ZINDEX, SMALL_FLOATING_MODAL_SIZE_REM } from './styles/FloatingLocalVideo.styles';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM, VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM } from './styles/FloatingLocalVideo.styles';\nimport { innerLayoutStyle, layerHostStyle, rootLayoutStyle } from './styles/FloatingLocalVideoLayout.styles';\nimport { videoGalleryLayoutGap } from './styles/Layout.styles';\nimport { useOrganizedParticipants } from './utils/videoGalleryLayoutUtils';\nimport { OverflowGallery } from './OverflowGallery';\n/**\n * Props for {@link FloatingLocalVideoLayout}.\n *\n * @private\n */\nexport interface FloatingLocalVideoLayoutProps extends LayoutProps {\n /**\n * Whether to display the local video camera switcher button\n */\n showCameraSwitcherInLocalPreview?: boolean;\n /**\n * Height of parent element\n */\n parentHeight?: number;\n}\n\n/**\n * FloatingLocalVideoLayout displays remote participants and a screen sharing component in\n * a grid and overflow gallery while floating the local video\n *\n * @private\n */\nexport const FloatingLocalVideoLayout = (props: FloatingLocalVideoLayoutProps): JSX.Element => {\n const {\n remoteParticipants = [],\n dominantSpeakers,\n localVideoComponent,\n screenShareComponent,\n onRenderRemoteParticipant,\n styles,\n maxRemoteVideoStreams,\n showCameraSwitcherInLocalPreview,\n parentWidth,\n parentHeight,\n /* @conditional-compile-remove(vertical-gallery) */overflowGalleryPosition = 'horizontalBottom',\n pinnedParticipantUserIds = []\n } = props;\n const theme = useTheme();\n const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;\n\n /* @conditional-compile-remove(vertical-gallery) */\n const isShort = parentHeight ? isShortHeight(parentHeight) : false;\n\n // This is for tracking the number of children in the first page of overflow gallery.\n // This number will be used for the maxOverflowGalleryDominantSpeakers when organizing the remote participants.\n const childrenPerPage = useRef(4);\n const {\n gridParticipants,\n overflowGalleryParticipants\n } = useOrganizedParticipants({\n remoteParticipants,\n dominantSpeakers,\n maxRemoteVideoStreams,\n isScreenShareActive: !!screenShareComponent,\n maxOverflowGalleryDominantSpeakers: screenShareComponent ? childrenPerPage.current - pinnedParticipantUserIds.length % childrenPerPage.current : childrenPerPage.current,\n /* @conditional-compile-remove(pinned-participants) */pinnedParticipantUserIds,\n /* @conditional-compile-remove(gallery-layouts) */layout: 'floatingLocalVideo'\n });\n let activeVideoStreams = 0;\n const gridTiles = gridParticipants.map(p => {\n return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0 ? p.videoStream?.isAvailable && activeVideoStreams++ < maxRemoteVideoStreams : p.videoStream?.isAvailable);\n });\n const shouldFloatLocalVideo = remoteParticipants.length > 0;\n if (!shouldFloatLocalVideo && localVideoComponent) {\n gridTiles.push(localVideoComponent);\n }\n\n /**\n * instantiate indexes available to render with indexes available that would be on first page\n *\n * For some components which do not strictly follow the order of the array, we might\n * re-render the initial tiles -> dispose them -> create new tiles, we need to take care of\n * this case when those components are here\n */\n const [indexesToRender, setIndexesToRender] = useState<number[]>([]);\n const overflowGalleryTiles = overflowGalleryParticipants.map((p, i) => {\n return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0 ? p.videoStream?.isAvailable && indexesToRender && indexesToRender.includes(i) && activeVideoStreams++ < maxRemoteVideoStreams : p.videoStream?.isAvailable);\n });\n const layerHostId = useId('layerhost');\n const localVideoSizeRem = useMemo(() => {\n if (isNarrow) {\n return SMALL_FLOATING_MODAL_SIZE_REM;\n }\n /* @conditional-compile-remove(vertical-gallery) */\n if ((overflowGalleryTiles.length > 0 || screenShareComponent) && overflowGalleryPosition === 'verticalRight') {\n return isNarrow ? SMALL_FLOATING_MODAL_SIZE_REM : isShort ? SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM : VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM;\n }\n return LARGE_FLOATING_MODAL_SIZE_REM;\n }, [overflowGalleryTiles.length, isNarrow, screenShareComponent, /* @conditional-compile-remove(vertical-gallery) */isShort, /* @conditional-compile-remove(vertical-gallery) */overflowGalleryPosition]);\n const wrappedLocalVideoComponent = localVideoComponent && shouldFloatLocalVideo || screenShareComponent && localVideoComponent ?\n // When we use showCameraSwitcherInLocalPreview it disables dragging to allow keyboard navigation.\n showCameraSwitcherInLocalPreview ? <Stack className={mergeStyles(localVideoTileWithControlsContainerStyle(theme, localVideoSizeRem), {\n boxShadow: theme.effects.elevation8,\n zIndex: LOCAL_VIDEO_TILE_ZINDEX\n })}>\n {localVideoComponent}\n </Stack> : overflowGalleryTiles.length > 0 || screenShareComponent ? <Stack className={mergeStyles(localVideoTileContainerStyle(theme, localVideoSizeRem, !!screenShareComponent, /* @conditional-compile-remove(gallery-layouts) */overflowGalleryPosition))}>\n {localVideoComponent}\n </Stack> : <FloatingLocalVideo localVideoComponent={localVideoComponent} layerHostId={layerHostId} localVideoSizeRem={localVideoSizeRem} parentWidth={parentWidth} parentHeight={parentHeight} /> : undefined;\n const overflowGallery = useMemo(() => {\n if (overflowGalleryTiles.length === 0 && !screenShareComponent) {\n return null;\n }\n return <OverflowGallery\n /* @conditional-compile-remove(vertical-gallery) */ isShort={isShort} onFetchTilesToRender={setIndexesToRender} isNarrow={isNarrow} shouldFloatLocalVideo={true} overflowGalleryElements={overflowGalleryTiles} horizontalGalleryStyles={styles?.horizontalGallery}\n /* @conditional-compile-remove(vertical-gallery) */ verticalGalleryStyles={styles?.verticalGallery}\n /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition={overflowGalleryPosition} onChildrenPerPageChange={(n: number) => {\n childrenPerPage.current = n;\n }} />;\n }, [isNarrow, /* @conditional-compile-remove(vertical-gallery) */isShort, screenShareComponent, overflowGalleryTiles, styles?.horizontalGallery, /* @conditional-compile-remove(vertical-gallery) */overflowGalleryPosition, setIndexesToRender, /* @conditional-compile-remove(vertical-gallery) */styles?.verticalGallery]);\n return <Stack styles={rootLayoutStyle}>\n {wrappedLocalVideoComponent}\n <LayerHost id={layerHostId} className={mergeStyles(layerHostStyle)} />\n <Stack\n /* @conditional-compile-remove(vertical-gallery) */ horizontal={overflowGalleryPosition === 'verticalRight'} styles={innerLayoutStyle} tokens={videoGalleryLayoutGap}>\n {/* @conditional-compile-remove(gallery-layouts) */props.overflowGalleryPosition === 'horizontalTop' ? overflowGallery : <></>}\n {screenShareComponent ? screenShareComponent : <GridLayout key=\"grid-layout\" styles={styles?.gridLayout}>\n {gridTiles}\n </GridLayout>}\n {overflowGalleryTrampoline(overflowGallery, /* @conditional-compile-remove(gallery-layouts) */props.overflowGalleryPosition)}\n </Stack>\n </Stack>;\n};\nconst overflowGalleryTrampoline = (gallery: JSX.Element | null, galleryPosition?: 'horizontalBottom' | 'verticalRight' | 'horizontalTop'): JSX.Element | null => {\n /* @conditional-compile-remove(gallery-layouts) */\n return galleryPosition !== 'horizontalTop' ? gallery : <></>;\n return gallery;\n};"]}
1
+ {"version":3,"file":"FloatingLocalVideoLayout.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,mDAAmD;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,wCAAwC,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnN,mDAAmD;AACnD,OAAO,EAAE,8CAA8C,EAAE,wCAAwC,EAAE,MAAM,oCAAoC,CAAC;AAC9I,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC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AAM,EAAE,eAAe;QAChC,0BAA0B;QAC3B,oBAAC,SAAS,IAAC,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC,GAAI;QACtE,oBAAC,KAAK;QACR,mDAAmD;YAAnD,mDAAmD,CAAC,UAAU,EAAE,uBAAuB,KAAK,eAAe,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,qBAAqB;YAC7G,KAAK,CAAC,uBAAuB,KAAK,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,yCAAK;YAC7H,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAC,UAAU,IAAC,GAAG,EAAC,aAAa,EAAC,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,IAClG,SAAS,CACC;YACd,yBAAyB,CAAC,eAAe,EAAE,kDAAkD,CAAA,KAAK,CAAC,uBAAuB,CAAC,CACtH,CACF,CAAC;AACb,CAAC,CAAC;AACF,MAAM,yBAAyB,GAAG,CAAC,OAA2B,EAAE,eAAwE,EAAsB,EAAE;IAC9J,kDAAkD;IAClD,OAAO,eAAe,KAAK,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,yCAAK,CAAC;IAC7D,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { LayerHost, mergeStyles, Stack } from '@fluentui/react';\nimport { useId } from '@fluentui/react-hooks';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { useTheme } from '../../theming';\nimport { GridLayout } from '../GridLayout';\nimport { isNarrowWidth } from '../utils/responsive';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { isShortHeight } from '../utils/responsive';\nimport { FloatingLocalVideo } from './FloatingLocalVideo';\nimport { LayoutProps } from './Layout';\nimport { LARGE_FLOATING_MODAL_SIZE_REM, localVideoTileContainerStyle, localVideoTileWithControlsContainerStyle, LOCAL_VIDEO_TILE_ZINDEX, SMALL_FLOATING_MODAL_SIZE_REM } from './styles/FloatingLocalVideo.styles';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM, VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM } from './styles/FloatingLocalVideo.styles';\nimport { innerLayoutStyle, layerHostStyle, rootLayoutStyle } from './styles/FloatingLocalVideoLayout.styles';\nimport { videoGalleryLayoutGap } from './styles/Layout.styles';\nimport { useOrganizedParticipants } from './utils/videoGalleryLayoutUtils';\nimport { OverflowGallery } from './OverflowGallery';\n/* @conditional-compile-remove(click-to-call) */\nimport { LocalVideoTileSize } from '../VideoGallery';\n\n/**\n * Props for {@link FloatingLocalVideoLayout}.\n *\n * @private\n */\nexport interface FloatingLocalVideoLayoutProps extends LayoutProps {\n /**\n * Whether to display the local video camera switcher button\n */\n showCameraSwitcherInLocalPreview?: boolean;\n /**\n * Height of parent element\n */\n parentHeight?: number;\n /* @conditional-compile-remove(click-to-call) */\n /**\n * Local video tile mode\n */\n localVideoTileSize?: LocalVideoTileSize;\n}\n\n/**\n * FloatingLocalVideoLayout displays remote participants and a screen sharing component in\n * a grid and overflow gallery while floating the local video\n *\n * @private\n */\nexport const FloatingLocalVideoLayout = (props: FloatingLocalVideoLayoutProps): JSX.Element => {\n const {\n remoteParticipants = [],\n dominantSpeakers,\n localVideoComponent,\n screenShareComponent,\n onRenderRemoteParticipant,\n styles,\n maxRemoteVideoStreams,\n showCameraSwitcherInLocalPreview,\n parentWidth,\n parentHeight,\n /* @conditional-compile-remove(vertical-gallery) */overflowGalleryPosition = 'horizontalBottom',\n pinnedParticipantUserIds = [],\n /* @conditional-compile-remove(click-to-call) */localVideoTileSize\n } = props;\n const theme = useTheme();\n const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;\n\n /* @conditional-compile-remove(vertical-gallery) */\n const isShort = parentHeight ? isShortHeight(parentHeight) : false;\n\n // This is for tracking the number of children in the first page of overflow gallery.\n // This number will be used for the maxOverflowGalleryDominantSpeakers when organizing the remote participants.\n const childrenPerPage = useRef(4);\n const {\n gridParticipants,\n overflowGalleryParticipants\n } = useOrganizedParticipants({\n remoteParticipants,\n dominantSpeakers,\n maxRemoteVideoStreams,\n isScreenShareActive: !!screenShareComponent,\n maxOverflowGalleryDominantSpeakers: screenShareComponent ? childrenPerPage.current - pinnedParticipantUserIds.length % childrenPerPage.current : childrenPerPage.current,\n /* @conditional-compile-remove(pinned-participants) */pinnedParticipantUserIds,\n /* @conditional-compile-remove(gallery-layouts) */layout: 'floatingLocalVideo'\n });\n let activeVideoStreams = 0;\n const gridTiles = gridParticipants.map(p => {\n return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0 ? p.videoStream?.isAvailable && activeVideoStreams++ < maxRemoteVideoStreams : p.videoStream?.isAvailable);\n });\n const shouldFloatLocalVideo = remoteParticipants.length > 0;\n if (!shouldFloatLocalVideo && localVideoComponent) {\n gridTiles.push(localVideoComponent);\n }\n\n /**\n * instantiate indexes available to render with indexes available that would be on first page\n *\n * For some components which do not strictly follow the order of the array, we might\n * re-render the initial tiles -> dispose them -> create new tiles, we need to take care of\n * this case when those components are here\n */\n const [indexesToRender, setIndexesToRender] = useState<number[]>([]);\n const overflowGalleryTiles = overflowGalleryParticipants.map((p, i) => {\n return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0 ? p.videoStream?.isAvailable && indexesToRender && indexesToRender.includes(i) && activeVideoStreams++ < maxRemoteVideoStreams : p.videoStream?.isAvailable);\n });\n const layerHostId = useId('layerhost');\n const localVideoSizeRem = useMemo(() => {\n if (isNarrow || /*@conditional-compile-remove(click-to-call) */localVideoTileSize === '9:16') {\n return SMALL_FLOATING_MODAL_SIZE_REM;\n }\n /* @conditional-compile-remove(vertical-gallery) */\n if ((overflowGalleryTiles.length > 0 || screenShareComponent) && overflowGalleryPosition === 'verticalRight') {\n return isNarrow ? SMALL_FLOATING_MODAL_SIZE_REM : isShort ? SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM : VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM;\n }\n /*@conditional-compile-remove(click-to-call) */\n if ((overflowGalleryTiles.length > 0 || screenShareComponent) && overflowGalleryPosition === 'horizontalBottom') {\n return localVideoTileSize === '16:9' || !isNarrow ? LARGE_FLOATING_MODAL_SIZE_REM : SMALL_FLOATING_MODAL_SIZE_REM;\n }\n return LARGE_FLOATING_MODAL_SIZE_REM;\n }, [overflowGalleryTiles.length, isNarrow, screenShareComponent, /* @conditional-compile-remove(vertical-gallery) */isShort, /* @conditional-compile-remove(vertical-gallery) */overflowGalleryPosition, /* @conditional-compile-remove(click-to-call) */localVideoTileSize]);\n const wrappedLocalVideoComponent = localVideoComponent && shouldFloatLocalVideo || screenShareComponent && localVideoComponent ?\n // When we use showCameraSwitcherInLocalPreview it disables dragging to allow keyboard navigation.\n showCameraSwitcherInLocalPreview ? <Stack className={mergeStyles(localVideoTileWithControlsContainerStyle(theme, localVideoSizeRem), {\n boxShadow: theme.effects.elevation8,\n zIndex: LOCAL_VIDEO_TILE_ZINDEX\n })}>\n {localVideoComponent}\n </Stack> : overflowGalleryTiles.length > 0 || screenShareComponent ? <Stack className={mergeStyles(localVideoTileContainerStyle(theme, localVideoSizeRem, !!screenShareComponent, /* @conditional-compile-remove(gallery-layouts) */overflowGalleryPosition))}>\n {localVideoComponent}\n </Stack> : <FloatingLocalVideo localVideoComponent={localVideoComponent} layerHostId={layerHostId} localVideoSizeRem={localVideoSizeRem} parentWidth={parentWidth} parentHeight={parentHeight} /> : undefined;\n const overflowGallery = useMemo(() => {\n if (overflowGalleryTiles.length === 0 && !screenShareComponent) {\n return null;\n }\n return <OverflowGallery\n /* @conditional-compile-remove(vertical-gallery) */ isShort={isShort} onFetchTilesToRender={setIndexesToRender} isNarrow={isNarrow} shouldFloatLocalVideo={true} overflowGalleryElements={overflowGalleryTiles} horizontalGalleryStyles={styles?.horizontalGallery}\n /* @conditional-compile-remove(vertical-gallery) */ verticalGalleryStyles={styles?.verticalGallery}\n /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition={overflowGalleryPosition} onChildrenPerPageChange={(n: number) => {\n childrenPerPage.current = n;\n }} />;\n }, [isNarrow, /* @conditional-compile-remove(vertical-gallery) */isShort, screenShareComponent, overflowGalleryTiles, styles?.horizontalGallery, /* @conditional-compile-remove(vertical-gallery) */overflowGalleryPosition, setIndexesToRender, /* @conditional-compile-remove(vertical-gallery) */styles?.verticalGallery]);\n return <Stack styles={rootLayoutStyle}>\n {wrappedLocalVideoComponent}\n <LayerHost id={layerHostId} className={mergeStyles(layerHostStyle)} />\n <Stack\n /* @conditional-compile-remove(vertical-gallery) */ horizontal={overflowGalleryPosition === 'verticalRight'} styles={innerLayoutStyle} tokens={videoGalleryLayoutGap}>\n {/* @conditional-compile-remove(gallery-layouts) */props.overflowGalleryPosition === 'horizontalTop' ? overflowGallery : <></>}\n {screenShareComponent ? screenShareComponent : <GridLayout key=\"grid-layout\" styles={styles?.gridLayout}>\n {gridTiles}\n </GridLayout>}\n {overflowGalleryTrampoline(overflowGallery, /* @conditional-compile-remove(gallery-layouts) */props.overflowGalleryPosition)}\n </Stack>\n </Stack>;\n};\nconst overflowGalleryTrampoline = (gallery: JSX.Element | null, galleryPosition?: 'horizontalBottom' | 'verticalRight' | 'horizontalTop'): JSX.Element | null => {\n /* @conditional-compile-remove(gallery-layouts) */\n return galleryPosition !== 'horizontalTop' ? gallery : <></>;\n return gallery;\n};"]}
@@ -7,5 +7,5 @@ import { VideoGalleryLocalParticipant } from '../../types';
7
7
  */
8
8
  export declare const LocalScreenShare: React.MemoExoticComponent<(props: {
9
9
  localParticipant: VideoGalleryLocalParticipant;
10
- }) => JSX.Element | null>;
10
+ }) => React.JSX.Element | null>;
11
11
  //# sourceMappingURL=LocalScreenShare.d.ts.map
@@ -15,5 +15,5 @@ export declare const RemoteScreenShare: React.MemoExoticComponent<(props: {
15
15
  isMuted?: boolean | undefined;
16
16
  isSpeaking?: boolean | undefined;
17
17
  renderElement?: HTMLElement | undefined;
18
- }) => JSX.Element>;
18
+ }) => React.JSX.Element>;
19
19
  //# sourceMappingURL=RemoteScreenShare.d.ts.map
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { LocalVideoTileSize } from '../VideoGallery';
2
3
  import { LayoutProps } from './Layout';
3
4
  /**
4
5
  * Props for {@link SpeakerVideoLayout}.
@@ -14,6 +15,10 @@ export interface SpeakerVideoLayoutProps extends LayoutProps {
14
15
  * Height of parent element
15
16
  */
16
17
  parentHeight?: number;
18
+ /**
19
+ * Local video tile mode
20
+ */
21
+ localVideoTileSize?: LocalVideoTileSize;
17
22
  }
18
23
  /**
19
24
  * Layout for the gallery mode to highlight the current dominant speaker
@@ -23,7 +23,8 @@ import { useId } from '@fluentui/react-hooks';
23
23
  export const SpeakerVideoLayout = (props) => {
24
24
  const { remoteParticipants = [], dominantSpeakers, localVideoComponent, screenShareComponent, onRenderRemoteParticipant, styles, maxRemoteVideoStreams, parentWidth,
25
25
  /* @conditional-compile-remove(vertical-gallery) */ parentHeight,
26
- /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition = 'horizontalBottom', pinnedParticipantUserIds = [] } = props;
26
+ /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition = 'horizontalBottom', pinnedParticipantUserIds = [],
27
+ /* @conditional-compile-remove(click-to-call) */ localVideoTileSize } = props;
27
28
  const theme = useTheme();
28
29
  const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;
29
30
  /* @conditional-compile-remove(vertical-gallery) */
@@ -63,15 +64,19 @@ export const SpeakerVideoLayout = (props) => {
63
64
  });
64
65
  const layerHostId = useId('layerhost');
65
66
  const localVideoSizeRem = useMemo(() => {
66
- if (isNarrow) {
67
+ if (isNarrow || /*@conditional-compile-remove(click-to-call) */ localVideoTileSize === '9:16') {
67
68
  return SMALL_FLOATING_MODAL_SIZE_REM;
68
69
  }
69
70
  /* @conditional-compile-remove(vertical-gallery) */
70
71
  if ((overflowGalleryTiles.length > 0 || screenShareComponent) && overflowGalleryPosition === 'verticalRight') {
71
72
  return isNarrow ? SMALL_FLOATING_MODAL_SIZE_REM : isShort ? SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM : VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM;
72
73
  }
74
+ /*@conditional-compile-remove(click-to-call) */
75
+ if ((overflowGalleryTiles.length > 0 || screenShareComponent) && overflowGalleryPosition === 'horizontalBottom') {
76
+ return localVideoTileSize === '16:9' || !isNarrow ? LARGE_FLOATING_MODAL_SIZE_REM : SMALL_FLOATING_MODAL_SIZE_REM;
77
+ }
73
78
  return LARGE_FLOATING_MODAL_SIZE_REM;
74
- }, [overflowGalleryTiles.length, isNarrow, screenShareComponent, /* @conditional-compile-remove(vertical-gallery) */ isShort, /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition]);
79
+ }, [overflowGalleryTiles.length, isNarrow, screenShareComponent, /* @conditional-compile-remove(vertical-gallery) */ isShort, /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition, /* @conditional-compile-remove(click-to-call) */ localVideoTileSize]);
75
80
  const wrappedLocalVideoComponent = localVideoComponent || screenShareComponent && localVideoComponent ? React.createElement(Stack, { className: mergeStyles(localVideoTileContainerStyle(theme, localVideoSizeRem, !!screenShareComponent, /* @conditional-compile-remove(gallery-layouts) */ overflowGalleryPosition)) }, localVideoComponent) : undefined;
76
81
  const overflowGallery = useMemo(() => {
77
82
  if (overflowGalleryTiles.length === 0 && !screenShareComponent) {
@@ -1 +1 @@
1
- {"version":3,"file":"SpeakerVideoLayout.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/VideoGallery/SpeakerVideoLayout.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAA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K,eAAe,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,qBAAqB;YAC7G,KAAK,CAAC,uBAAuB,KAAK,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,yCAAK;YAC7H,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAC,UAAU,IAAC,GAAG,EAAC,aAAa,EAAC,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,IAClG,SAAS,CACC;YACd,yBAAyB,CAAC,eAAe,EAAE,kDAAkD,CAAA,KAAK,CAAC,uBAAuB,CAAC,CACtH,CACF,CAAC;AACb,CAAC,CAAC;AACF,MAAM,yBAAyB,GAAG,CAAC,OAA2B,EAAE,eAAwE,EAAsB,EAAE;IAC9J,kDAAkD;IAClD,OAAO,eAAe,KAAK,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,yCAAK,CAAC;IAC7D,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { LayerHost, Stack, mergeStyles, useTheme } from '@fluentui/react';\nimport { LayoutProps } from './Layout';\nimport { isNarrowWidth } from '../utils/responsive';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { isShortHeight } from '../utils/responsive';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { OverflowGallery } from './OverflowGallery';\nimport { SMALL_FLOATING_MODAL_SIZE_REM, LARGE_FLOATING_MODAL_SIZE_REM, localVideoTileContainerStyle } from './styles/FloatingLocalVideo.styles';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM, SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM } from './styles/FloatingLocalVideo.styles';\nimport { useOrganizedParticipants } from './utils/videoGalleryLayoutUtils';\nimport { GridLayout } from '../GridLayout';\nimport { rootLayoutStyle } from './styles/FloatingLocalVideoLayout.styles';\nimport { layerHostStyle, innerLayoutStyle } from './styles/FloatingLocalVideoLayout.styles';\nimport { videoGalleryLayoutGap } from './styles/Layout.styles';\nimport { useId } from '@fluentui/react-hooks';\n\n/**\n * Props for {@link SpeakerVideoLayout}.\n *\n * @private\n */\nexport interface SpeakerVideoLayoutProps extends LayoutProps {\n /**\n * Whether to display the local video camera switcher button\n */\n showCameraSwitcherInLocalPreview?: boolean;\n /**\n * Height of parent element\n */\n parentHeight?: number;\n}\n\n/**\n * Layout for the gallery mode to highlight the current dominant speaker\n *\n * @private\n */\nexport const SpeakerVideoLayout = (props: SpeakerVideoLayoutProps): JSX.Element => {\n const {\n remoteParticipants = [],\n dominantSpeakers,\n localVideoComponent,\n screenShareComponent,\n onRenderRemoteParticipant,\n styles,\n maxRemoteVideoStreams,\n parentWidth,\n /* @conditional-compile-remove(vertical-gallery) */parentHeight,\n /* @conditional-compile-remove(vertical-gallery) */overflowGalleryPosition = 'horizontalBottom',\n pinnedParticipantUserIds = []\n } = props;\n const theme = useTheme();\n const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;\n\n /* @conditional-compile-remove(vertical-gallery) */\n const isShort = parentHeight ? isShortHeight(parentHeight) : false;\n\n // This is for tracking the number of children in the first page of overflow gallery.\n // This number will be used for the maxOverflowGalleryDominantSpeakers when organizing the remote participants.\n const childrenPerPage = useRef(4);\n const {\n gridParticipants,\n overflowGalleryParticipants\n } = useOrganizedParticipants({\n remoteParticipants,\n dominantSpeakers,\n maxRemoteVideoStreams,\n isScreenShareActive: !!screenShareComponent,\n maxOverflowGalleryDominantSpeakers: screenShareComponent ? childrenPerPage.current - pinnedParticipantUserIds.length % childrenPerPage.current : childrenPerPage.current,\n /* @conditional-compile-remove(pinned-participants) */pinnedParticipantUserIds,\n /* @conditional-compile-remove(gallery-layouts) */layout: 'speaker'\n });\n let activeVideoStreams = 0;\n const gridTiles = gridParticipants.map(p => {\n return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0 ? p.videoStream?.isAvailable && activeVideoStreams++ < maxRemoteVideoStreams : p.videoStream?.isAvailable);\n });\n const shouldFloatLocalVideo = remoteParticipants.length > 0;\n if (!shouldFloatLocalVideo && localVideoComponent) {\n gridTiles.push(localVideoComponent);\n }\n\n /**\n * instantiate indexes available to render with indexes available that would be on first page\n *\n * For some components which do not strictly follow the order of the array, we might\n * re-render the initial tiles -> dispose them -> create new tiles, we need to take care of\n * this case when those components are here\n */\n const [indexesToRender, setIndexesToRender] = useState<number[]>([]);\n const overflowGalleryTiles = overflowGalleryParticipants.map((p, i) => {\n return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0 ? p.videoStream?.isAvailable && indexesToRender && indexesToRender.includes(i) && activeVideoStreams++ < maxRemoteVideoStreams : p.videoStream?.isAvailable);\n });\n const layerHostId = useId('layerhost');\n const localVideoSizeRem = useMemo(() => {\n if (isNarrow) {\n return SMALL_FLOATING_MODAL_SIZE_REM;\n }\n /* @conditional-compile-remove(vertical-gallery) */\n if ((overflowGalleryTiles.length > 0 || screenShareComponent) && overflowGalleryPosition === 'verticalRight') {\n return isNarrow ? SMALL_FLOATING_MODAL_SIZE_REM : isShort ? SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM : VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM;\n }\n return LARGE_FLOATING_MODAL_SIZE_REM;\n }, [overflowGalleryTiles.length, isNarrow, screenShareComponent, /* @conditional-compile-remove(vertical-gallery) */isShort, /* @conditional-compile-remove(vertical-gallery) */overflowGalleryPosition]);\n const wrappedLocalVideoComponent = localVideoComponent || screenShareComponent && localVideoComponent ? <Stack className={mergeStyles(localVideoTileContainerStyle(theme, localVideoSizeRem, !!screenShareComponent, /* @conditional-compile-remove(gallery-layouts) */overflowGalleryPosition))}>\n {localVideoComponent}\n </Stack> : undefined;\n const overflowGallery = useMemo(() => {\n if (overflowGalleryTiles.length === 0 && !screenShareComponent) {\n return null;\n }\n return <OverflowGallery\n /* @conditional-compile-remove(vertical-gallery) */ isShort={isShort} onFetchTilesToRender={setIndexesToRender} isNarrow={isNarrow} shouldFloatLocalVideo={true} overflowGalleryElements={overflowGalleryTiles} horizontalGalleryStyles={styles?.horizontalGallery}\n /* @conditional-compile-remove(vertical-gallery) */ verticalGalleryStyles={styles?.verticalGallery}\n /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition={overflowGalleryPosition} onChildrenPerPageChange={(n: number) => {\n childrenPerPage.current = n;\n }} />;\n }, [isNarrow, /* @conditional-compile-remove(vertical-gallery) */isShort, screenShareComponent, overflowGalleryTiles, styles?.horizontalGallery, /* @conditional-compile-remove(vertical-gallery) */overflowGalleryPosition, setIndexesToRender, /* @conditional-compile-remove(vertical-gallery) */styles?.verticalGallery]);\n return <Stack styles={rootLayoutStyle}>\n {wrappedLocalVideoComponent}\n <LayerHost id={layerHostId} className={mergeStyles(layerHostStyle)} />\n <Stack\n /* @conditional-compile-remove(vertical-gallery) */ horizontal={overflowGalleryPosition === 'verticalRight'} styles={innerLayoutStyle} tokens={videoGalleryLayoutGap}>\n {/* @conditional-compile-remove(gallery-layouts) */props.overflowGalleryPosition === 'horizontalTop' ? overflowGallery : <></>}\n {screenShareComponent ? screenShareComponent : <GridLayout key=\"grid-layout\" styles={styles?.gridLayout}>\n {gridTiles}\n </GridLayout>}\n {overflowGalleryTrampoline(overflowGallery, /* @conditional-compile-remove(gallery-layouts) */props.overflowGalleryPosition)}\n </Stack>\n </Stack>;\n};\nconst overflowGalleryTrampoline = (gallery: JSX.Element | null, galleryPosition?: 'horizontalBottom' | 'verticalRight' | 'horizontalTop'): JSX.Element | null => {\n /* @conditional-compile-remove(gallery-layouts) */\n return galleryPosition !== 'horizontalTop' ? gallery : <></>;\n return gallery;\n};"]}
1
+ {"version":3,"file":"SpeakerVideoLayout.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/VideoGallery/SpeakerVideoLayout.tsx"],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E,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,iBAAiB,EAAE,mDAAmD,CAAA,uBAAuB,EAAE,kBAAkB,EAAE,mDAAmD,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,eAAe,CAAC,CAAC,CAAC;IAC9T,OAAO,oBAAC,KAAK,IAAC,MAAM,EAAE,eAAe;QAChC,0BAA0B;QAC3B,oBAAC,SAAS,IAAC,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC,GAAI;QACtE,oBAAC,KAAK;QACR,mDAAmD;YAAnD,mDAAmD,CAAC,UAAU,EAAE,uBAAuB,KAAK,eAAe,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,qBAAqB;YAC7G,KAAK,CAAC,uBAAuB,KAAK,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,yCAAK;YAC7H,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAC,UAAU,IAAC,GAAG,EAAC,aAAa,EAAC,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,IAClG,SAAS,CACC;YACd,yBAAyB,CAAC,eAAe,EAAE,kDAAkD,CAAA,KAAK,CAAC,uBAAuB,CAAC,CACtH,CACF,CAAC;AACb,CAAC,CAAC;AACF,MAAM,yBAAyB,GAAG,CAAC,OAA2B,EAAE,eAAwE,EAAsB,EAAE;IAC9J,kDAAkD;IAClD,OAAO,eAAe,KAAK,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,yCAAK,CAAC;IAC7D,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { LayerHost, Stack, mergeStyles, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(click-to-call) */\nimport { LocalVideoTileSize } from '../VideoGallery';\nimport { LayoutProps } from './Layout';\nimport { isNarrowWidth } from '../utils/responsive';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { isShortHeight } from '../utils/responsive';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { OverflowGallery } from './OverflowGallery';\nimport { SMALL_FLOATING_MODAL_SIZE_REM, LARGE_FLOATING_MODAL_SIZE_REM, localVideoTileContainerStyle } from './styles/FloatingLocalVideo.styles';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM, SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM } from './styles/FloatingLocalVideo.styles';\nimport { useOrganizedParticipants } from './utils/videoGalleryLayoutUtils';\nimport { GridLayout } from '../GridLayout';\nimport { rootLayoutStyle } from './styles/FloatingLocalVideoLayout.styles';\nimport { layerHostStyle, innerLayoutStyle } from './styles/FloatingLocalVideoLayout.styles';\nimport { videoGalleryLayoutGap } from './styles/Layout.styles';\nimport { useId } from '@fluentui/react-hooks';\n\n/**\n * Props for {@link SpeakerVideoLayout}.\n *\n * @private\n */\nexport interface SpeakerVideoLayoutProps extends LayoutProps {\n /**\n * Whether to display the local video camera switcher button\n */\n showCameraSwitcherInLocalPreview?: boolean;\n /**\n * Height of parent element\n */\n parentHeight?: number;\n /* @conditional-compile-remove(click-to-call) */\n /**\n * Local video tile mode\n */\n localVideoTileSize?: LocalVideoTileSize;\n}\n\n/**\n * Layout for the gallery mode to highlight the current dominant speaker\n *\n * @private\n */\nexport const SpeakerVideoLayout = (props: SpeakerVideoLayoutProps): JSX.Element => {\n const {\n remoteParticipants = [],\n dominantSpeakers,\n localVideoComponent,\n screenShareComponent,\n onRenderRemoteParticipant,\n styles,\n maxRemoteVideoStreams,\n parentWidth,\n /* @conditional-compile-remove(vertical-gallery) */parentHeight,\n /* @conditional-compile-remove(vertical-gallery) */overflowGalleryPosition = 'horizontalBottom',\n pinnedParticipantUserIds = [],\n /* @conditional-compile-remove(click-to-call) */localVideoTileSize\n } = props;\n const theme = useTheme();\n const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;\n\n /* @conditional-compile-remove(vertical-gallery) */\n const isShort = parentHeight ? isShortHeight(parentHeight) : false;\n\n // This is for tracking the number of children in the first page of overflow gallery.\n // This number will be used for the maxOverflowGalleryDominantSpeakers when organizing the remote participants.\n const childrenPerPage = useRef(4);\n const {\n gridParticipants,\n overflowGalleryParticipants\n } = useOrganizedParticipants({\n remoteParticipants,\n dominantSpeakers,\n maxRemoteVideoStreams,\n isScreenShareActive: !!screenShareComponent,\n maxOverflowGalleryDominantSpeakers: screenShareComponent ? childrenPerPage.current - pinnedParticipantUserIds.length % childrenPerPage.current : childrenPerPage.current,\n /* @conditional-compile-remove(pinned-participants) */pinnedParticipantUserIds,\n /* @conditional-compile-remove(gallery-layouts) */layout: 'speaker'\n });\n let activeVideoStreams = 0;\n const gridTiles = gridParticipants.map(p => {\n return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0 ? p.videoStream?.isAvailable && activeVideoStreams++ < maxRemoteVideoStreams : p.videoStream?.isAvailable);\n });\n const shouldFloatLocalVideo = remoteParticipants.length > 0;\n if (!shouldFloatLocalVideo && localVideoComponent) {\n gridTiles.push(localVideoComponent);\n }\n\n /**\n * instantiate indexes available to render with indexes available that would be on first page\n *\n * For some components which do not strictly follow the order of the array, we might\n * re-render the initial tiles -> dispose them -> create new tiles, we need to take care of\n * this case when those components are here\n */\n const [indexesToRender, setIndexesToRender] = useState<number[]>([]);\n const overflowGalleryTiles = overflowGalleryParticipants.map((p, i) => {\n return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0 ? p.videoStream?.isAvailable && indexesToRender && indexesToRender.includes(i) && activeVideoStreams++ < maxRemoteVideoStreams : p.videoStream?.isAvailable);\n });\n const layerHostId = useId('layerhost');\n const localVideoSizeRem = useMemo(() => {\n if (isNarrow || /*@conditional-compile-remove(click-to-call) */localVideoTileSize === '9:16') {\n return SMALL_FLOATING_MODAL_SIZE_REM;\n }\n /* @conditional-compile-remove(vertical-gallery) */\n if ((overflowGalleryTiles.length > 0 || screenShareComponent) && overflowGalleryPosition === 'verticalRight') {\n return isNarrow ? SMALL_FLOATING_MODAL_SIZE_REM : isShort ? SHORT_VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM : VERTICAL_GALLERY_FLOATING_MODAL_SIZE_REM;\n }\n /*@conditional-compile-remove(click-to-call) */\n if ((overflowGalleryTiles.length > 0 || screenShareComponent) && overflowGalleryPosition === 'horizontalBottom') {\n return localVideoTileSize === '16:9' || !isNarrow ? LARGE_FLOATING_MODAL_SIZE_REM : SMALL_FLOATING_MODAL_SIZE_REM;\n }\n return LARGE_FLOATING_MODAL_SIZE_REM;\n }, [overflowGalleryTiles.length, isNarrow, screenShareComponent, /* @conditional-compile-remove(vertical-gallery) */isShort, /* @conditional-compile-remove(vertical-gallery) */overflowGalleryPosition, /* @conditional-compile-remove(click-to-call) */localVideoTileSize]);\n const wrappedLocalVideoComponent = localVideoComponent || screenShareComponent && localVideoComponent ? <Stack className={mergeStyles(localVideoTileContainerStyle(theme, localVideoSizeRem, !!screenShareComponent, /* @conditional-compile-remove(gallery-layouts) */overflowGalleryPosition))}>\n {localVideoComponent}\n </Stack> : undefined;\n const overflowGallery = useMemo(() => {\n if (overflowGalleryTiles.length === 0 && !screenShareComponent) {\n return null;\n }\n return <OverflowGallery\n /* @conditional-compile-remove(vertical-gallery) */ isShort={isShort} onFetchTilesToRender={setIndexesToRender} isNarrow={isNarrow} shouldFloatLocalVideo={true} overflowGalleryElements={overflowGalleryTiles} horizontalGalleryStyles={styles?.horizontalGallery}\n /* @conditional-compile-remove(vertical-gallery) */ verticalGalleryStyles={styles?.verticalGallery}\n /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition={overflowGalleryPosition} onChildrenPerPageChange={(n: number) => {\n childrenPerPage.current = n;\n }} />;\n }, [isNarrow, /* @conditional-compile-remove(vertical-gallery) */isShort, screenShareComponent, overflowGalleryTiles, styles?.horizontalGallery, /* @conditional-compile-remove(vertical-gallery) */overflowGalleryPosition, setIndexesToRender, /* @conditional-compile-remove(vertical-gallery) */styles?.verticalGallery]);\n return <Stack styles={rootLayoutStyle}>\n {wrappedLocalVideoComponent}\n <LayerHost id={layerHostId} className={mergeStyles(layerHostStyle)} />\n <Stack\n /* @conditional-compile-remove(vertical-gallery) */ horizontal={overflowGalleryPosition === 'verticalRight'} styles={innerLayoutStyle} tokens={videoGalleryLayoutGap}>\n {/* @conditional-compile-remove(gallery-layouts) */props.overflowGalleryPosition === 'horizontalTop' ? overflowGallery : <></>}\n {screenShareComponent ? screenShareComponent : <GridLayout key=\"grid-layout\" styles={styles?.gridLayout}>\n {gridTiles}\n </GridLayout>}\n {overflowGalleryTrampoline(overflowGallery, /* @conditional-compile-remove(gallery-layouts) */props.overflowGalleryPosition)}\n </Stack>\n </Stack>;\n};\nconst overflowGalleryTrampoline = (gallery: JSX.Element | null, galleryPosition?: 'horizontalBottom' | 'verticalRight' | 'horizontalTop'): JSX.Element | null => {\n /* @conditional-compile-remove(gallery-layouts) */\n return galleryPosition !== 'horizontalTop' ? gallery : <></>;\n return gallery;\n};"]}
@@ -43,8 +43,12 @@ const _useOrganizedParticipants = (props) => {
43
43
  }
44
44
  const visibleGridParticipantsSet = new Set(visibleGridParticipants.current.map(p => p.userId));
45
45
  const remoteParticipantsOrdered = putVideoParticipantsFirst(remoteParticipants);
46
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
47
+ const callingParticipants = remoteParticipantsOrdered.filter(p => p.state === ('Connecting' || 'Ringing'));
48
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
49
+ const callingParticipantsSet = new Set(callingParticipants.map(p => p.userId));
46
50
  visibleOverflowGalleryParticipants.current = smartDominantSpeakerParticipants({
47
- participants: remoteParticipantsOrdered.filter(p => !visibleGridParticipantsSet.has(p.userId)),
51
+ participants: remoteParticipantsOrdered.filter(p => !visibleGridParticipantsSet.has(p.userId) && /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !callingParticipantsSet.has(p.userId)),
48
52
  dominantSpeakers: dominantSpeakers,
49
53
  lastVisibleParticipants: visibleOverflowGalleryParticipants.current,
50
54
  maxDominantSpeakers: maxOverflowGalleryDominantSpeakers
@@ -56,17 +60,23 @@ const _useOrganizedParticipants = (props) => {
56
60
  // if we have no grid participants we need to cap the max number of overflowGallery participants in the grid
57
61
  // we will use the max streams provided to the function to find the max participants that can go in the grid
58
62
  // if there are less participants than max streams then we will use all participants including joining in the grid
63
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
64
+ return visibleGridParticipants.current.length > 0 ? visibleGridParticipants.current : visibleOverflowGalleryParticipants.current.length > maxRemoteVideoStreamsToUse ? visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse) : visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse).concat(callingParticipants);
59
65
  return visibleGridParticipants.current.length > 0 ? visibleGridParticipants.current : visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse);
60
- }, [isScreenShareActive, maxRemoteVideoStreamsToUse]);
66
+ }, [/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants, isScreenShareActive, maxRemoteVideoStreamsToUse]);
61
67
  const gridParticipants = getGridParticipants();
62
68
  const getOverflowGalleryRemoteParticipants = useCallback(() => {
63
69
  if (isScreenShareActive && localParticipant) {
64
70
  const localParticipantPlusOverflow = [localParticipant].concat(visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current));
65
71
  // If screen sharing is active, assign video and audio participants as overflow gallery participants
72
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
73
+ return localParticipantPlusOverflow.concat(callingParticipants);
66
74
  return localParticipantPlusOverflow;
67
75
  }
68
76
  else if (isScreenShareActive) {
69
77
  // If screen sharing is active, assign video and audio participants as overflow gallery participants
78
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
79
+ return visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current.concat(callingParticipants));
70
80
  return visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current);
71
81
  }
72
82
  else {
@@ -74,9 +84,11 @@ const _useOrganizedParticipants = (props) => {
74
84
  // If there are no video tiles, then assign audio tiles as grid tiles.
75
85
  // if there are more overflow tiles than max streams then find the tiles that don't fit in the grid and put them in overflow
76
86
  // overflow should be empty if total participants including calling participants is less than max streams
87
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
88
+ return visibleGridParticipants.current.length > 0 ? visibleOverflowGalleryParticipants.current.concat(callingParticipants) : visibleOverflowGalleryParticipants.current.length > maxRemoteVideoStreamsToUse ? visibleOverflowGalleryParticipants.current.slice(maxRemoteVideoStreamsToUse).concat(callingParticipants) : [];
77
89
  return visibleGridParticipants.current.length > 0 ? visibleOverflowGalleryParticipants.current : visibleOverflowGalleryParticipants.current.slice(maxRemoteVideoStreamsToUse);
78
90
  }
79
- }, [isScreenShareActive, localParticipant, maxRemoteVideoStreamsToUse]);
91
+ }, [/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants, isScreenShareActive, localParticipant, maxRemoteVideoStreamsToUse]);
80
92
  const overflowGalleryParticipants = getOverflowGalleryRemoteParticipants();
81
93
  return {
82
94
  gridParticipants,
@@ -1 +1 @@
1
- {"version":3,"file":"videoGalleryLayoutUtils.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,O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K,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,kBAAkB;QACrE,2BAA2B,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,8BAA8B,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,8BAA8B,CAAC,gBAAgB,CAAC,MAAM,CAAC,8BAA8B,CAAC,2BAA2B,CAAC;KACpQ,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,yBAAyB,GAAG,CAAC,kBAAmD,EAAmC,EAAE;IACzH,MAAM,iBAAiB,GAAoC,EAAE,CAAC;IAC9D,MAAM,iBAAiB,GAAoC,EAAE,CAAC;IAC9D,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;;QAC7B,IAAI,MAAA,CAAC,CAAC,WAAW,0CAAE,WAAW,EAAE;YAC9B,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC3B;aAAM;YACL,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC3B;IACH,CAAC,CAAC,CAAC;IACH,MAAM,8BAA8B,GAAG,iBAAiB,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACnF,OAAO,8BAA8B,CAAC;AACxC,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,IAA+B,EAA+B,EAAE;IACvG,sDAAsD;IACtD,OAAO,+CAA+C,CAAC,IAAI,CAAC,CAAC;IAC7D,OAAO,yBAAyB,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { useCallback, useRef } from 'react';\nimport { smartDominantSpeakerParticipants } from '../../../gallery';\nimport { VideoGalleryParticipant, VideoGalleryRemoteParticipant } from '../../../types';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { VideoGalleryLayout } from '../../VideoGallery';\n\n/**\n * Arguments used to determine a {@link OrganizedParticipantsResult}\n * @private\n */\nexport interface OrganizedParticipantsArgs {\n remoteParticipants: VideoGalleryRemoteParticipant[];\n localParticipant?: VideoGalleryParticipant;\n dominantSpeakers?: string[];\n maxRemoteVideoStreams?: number;\n maxOverflowGalleryDominantSpeakers?: number;\n isScreenShareActive?: boolean;\n pinnedParticipantUserIds?: string[];\n /* @conditional-compile-remove(gallery-layouts) */\n layout?: VideoGalleryLayout;\n}\n\n/**\n * A result that defines grid participants and overflow gallery participants in the VideoGallery\n * @private\n */\nexport interface OrganizedParticipantsResult {\n gridParticipants: VideoGalleryParticipant[];\n overflowGalleryParticipants: VideoGalleryParticipant[];\n}\nconst DEFAULT_MAX_OVERFLOW_GALLERY_DOMINANT_SPEAKERS = 6;\nconst DEFAULT_MAX_VIDEO_SREAMS = 4;\n/* @conditional-compile-remove(gallery-layouts) */\nconst MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY = 9;\nconst _useOrganizedParticipants = (props: OrganizedParticipantsArgs): OrganizedParticipantsResult => {\n const visibleGridParticipants = useRef<VideoGalleryRemoteParticipant[]>([]);\n const visibleOverflowGalleryParticipants = useRef<VideoGalleryRemoteParticipant[]>([]);\n const {\n remoteParticipants = [],\n localParticipant,\n dominantSpeakers = [],\n maxRemoteVideoStreams = DEFAULT_MAX_VIDEO_SREAMS,\n maxOverflowGalleryDominantSpeakers = DEFAULT_MAX_OVERFLOW_GALLERY_DOMINANT_SPEAKERS,\n isScreenShareActive = false,\n pinnedParticipantUserIds = [],\n /* @conditional-compile-remove(gallery-layouts) */\n layout\n } = props;\n const calculateMaxRemoteVideoStreams = (): number => {\n /* @conditional-compile-remove(gallery-layouts) */\n if (maxRemoteVideoStreams > MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY) {\n return MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY;\n } else {\n return maxRemoteVideoStreams;\n }\n return maxRemoteVideoStreams;\n };\n const maxRemoteVideoStreamsToUse = calculateMaxRemoteVideoStreams();\n const videoParticipants = remoteParticipants.filter(p => p.videoStream?.isAvailable);\n const participantsToSortTrampoline = (): VideoGalleryRemoteParticipant[] => {\n /* @conditional-compile-remove(gallery-layouts) */\n return layout !== 'floatingLocalVideo' ? putVideoParticipantsFirst(remoteParticipants) : videoParticipants;\n return videoParticipants;\n };\n visibleGridParticipants.current = pinnedParticipantUserIds.length > 0 || isScreenShareActive ? [] : smartDominantSpeakerParticipants({\n participants: participantsToSortTrampoline(),\n dominantSpeakers,\n lastVisibleParticipants: visibleGridParticipants.current,\n maxDominantSpeakers: maxRemoteVideoStreamsToUse\n }).slice(0, maxRemoteVideoStreamsToUse);\n\n /* @conditional-compile-remove(gallery-layouts) */\n const dominantSpeakerToGrid = layout === 'speaker' ? dominantSpeakers && dominantSpeakers[0] ? visibleGridParticipants.current.filter(p => p.userId === dominantSpeakers[0]) : [visibleGridParticipants.current[0]] : [];\n /* @conditional-compile-remove(gallery-layouts) */\n if (dominantSpeakerToGrid[0]) {\n visibleGridParticipants.current = dominantSpeakerToGrid;\n }\n const visibleGridParticipantsSet = new Set(visibleGridParticipants.current.map(p => p.userId));\n const remoteParticipantsOrdered = putVideoParticipantsFirst(remoteParticipants);\n visibleOverflowGalleryParticipants.current = smartDominantSpeakerParticipants({\n participants: remoteParticipantsOrdered.filter(p => !visibleGridParticipantsSet.has(p.userId)),\n dominantSpeakers: dominantSpeakers,\n lastVisibleParticipants: visibleOverflowGalleryParticipants.current,\n maxDominantSpeakers: maxOverflowGalleryDominantSpeakers\n });\n const getGridParticipants = useCallback((): VideoGalleryRemoteParticipant[] => {\n if (isScreenShareActive) {\n return [];\n }\n // if we have no grid participants we need to cap the max number of overflowGallery participants in the grid\n // we will use the max streams provided to the function to find the max participants that can go in the grid\n // if there are less participants than max streams then we will use all participants including joining in the grid\n return visibleGridParticipants.current.length > 0 ? visibleGridParticipants.current : visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse);\n }, [isScreenShareActive, maxRemoteVideoStreamsToUse]);\n const gridParticipants = getGridParticipants();\n const getOverflowGalleryRemoteParticipants = useCallback((): (VideoGalleryParticipant | VideoGalleryRemoteParticipant)[] => {\n if (isScreenShareActive && localParticipant) {\n const localParticipantPlusOverflow = [localParticipant].concat(visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current));\n // If screen sharing is active, assign video and audio participants as overflow gallery participants\n return localParticipantPlusOverflow;\n } else if (isScreenShareActive) {\n // If screen sharing is active, assign video and audio participants as overflow gallery participants\n return visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current);\n } else {\n // If screen sharing is not active, then assign all video tiles as grid tiles.\n // If there are no video tiles, then assign audio tiles as grid tiles.\n // if there are more overflow tiles than max streams then find the tiles that don't fit in the grid and put them in overflow\n // overflow should be empty if total participants including calling participants is less than max streams\n return visibleGridParticipants.current.length > 0 ? visibleOverflowGalleryParticipants.current : visibleOverflowGalleryParticipants.current.slice(maxRemoteVideoStreamsToUse);\n }\n }, [isScreenShareActive, localParticipant, maxRemoteVideoStreamsToUse]);\n const overflowGalleryParticipants = getOverflowGalleryRemoteParticipants();\n return {\n gridParticipants,\n overflowGalleryParticipants: overflowGalleryParticipants\n };\n};\n\n/* @conditional-compile-remove(pinned-participants) */\nconst _useOrganizedParticipantsWithPinnedParticipants = (props: OrganizedParticipantsArgs): OrganizedParticipantsResult => {\n // map remote participants by userId\n const remoteParticipantMap = props.remoteParticipants.reduce((map, remoteParticipant) => {\n map[remoteParticipant.userId] = remoteParticipant;\n return map;\n }, {});\n\n // get pinned participants in the same order of pinned participant user ids using remoteParticipantMap\n const pinnedParticipants: VideoGalleryRemoteParticipant[] = [];\n props.pinnedParticipantUserIds?.forEach(id => {\n const pinnedParticipant = remoteParticipantMap[id];\n if (pinnedParticipant) {\n pinnedParticipants.push(pinnedParticipant);\n }\n });\n\n // get unpinned participants by filtering all remote participants using a set of pinned participant user ids\n const pinnedParticipantUserIdSet = new Set(props.pinnedParticipantUserIds);\n const unpinnedParticipants = props.remoteParticipants.filter(p => !pinnedParticipantUserIdSet.has(p.userId));\n const useOrganizedParticipantsProps = {\n ...props,\n // if there are pinned participants then we should only consider unpinned participants\n remoteParticipants: unpinnedParticipants\n };\n const useOrganizedParticipantsResult = _useOrganizedParticipants(useOrganizedParticipantsProps);\n if (pinnedParticipants.length === 0) {\n return useOrganizedParticipantsResult;\n }\n return {\n gridParticipants: props.isScreenShareActive ? [] : pinnedParticipants,\n overflowGalleryParticipants: props.isScreenShareActive ? pinnedParticipants.concat(useOrganizedParticipantsResult.overflowGalleryParticipants) : useOrganizedParticipantsResult.gridParticipants.concat(useOrganizedParticipantsResult.overflowGalleryParticipants)\n };\n};\nconst putVideoParticipantsFirst = (remoteParticipants: VideoGalleryRemoteParticipant[]): VideoGalleryRemoteParticipant[] => {\n const videoParticipants: VideoGalleryRemoteParticipant[] = [];\n const audioParticipants: VideoGalleryRemoteParticipant[] = [];\n remoteParticipants.forEach(p => {\n if (p.videoStream?.isAvailable) {\n videoParticipants.push(p);\n } else {\n audioParticipants.push(p);\n }\n });\n const remoteParticipantSortedByVideo = videoParticipants.concat(audioParticipants);\n return remoteParticipantSortedByVideo;\n};\n\n/**\n * Hook to determine which participants should be in grid and overflow gallery and their order respectively\n * @private\n */\nexport const useOrganizedParticipants = (args: OrganizedParticipantsArgs): OrganizedParticipantsResult => {\n /* @conditional-compile-remove(pinned-participants) */\n return _useOrganizedParticipantsWithPinnedParticipants(args);\n return _useOrganizedParticipants(args);\n};"]}
1
+ {"version":3,"file":"videoGalleryLayoutUtils.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,gCAAgC,EAAE,MAAM,kBAAkB,CAAC;AA6BpE,MAAM,8CAA8C,GAAG,CAAC,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MIT License.\n\nimport { useCallback, useRef } from 'react';\nimport { smartDominantSpeakerParticipants } from '../../../gallery';\nimport { VideoGalleryParticipant, VideoGalleryRemoteParticipant } from '../../../types';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { VideoGalleryLayout } from '../../VideoGallery';\n\n/**\n * Arguments used to determine a {@link OrganizedParticipantsResult}\n * @private\n */\nexport interface OrganizedParticipantsArgs {\n remoteParticipants: VideoGalleryRemoteParticipant[];\n localParticipant?: VideoGalleryParticipant;\n dominantSpeakers?: string[];\n maxRemoteVideoStreams?: number;\n maxOverflowGalleryDominantSpeakers?: number;\n isScreenShareActive?: boolean;\n pinnedParticipantUserIds?: string[];\n /* @conditional-compile-remove(gallery-layouts) */\n layout?: VideoGalleryLayout;\n}\n\n/**\n * A result that defines grid participants and overflow gallery participants in the VideoGallery\n * @private\n */\nexport interface OrganizedParticipantsResult {\n gridParticipants: VideoGalleryParticipant[];\n overflowGalleryParticipants: VideoGalleryParticipant[];\n}\nconst DEFAULT_MAX_OVERFLOW_GALLERY_DOMINANT_SPEAKERS = 6;\nconst DEFAULT_MAX_VIDEO_SREAMS = 4;\n/* @conditional-compile-remove(gallery-layouts) */\nconst MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY = 9;\nconst _useOrganizedParticipants = (props: OrganizedParticipantsArgs): OrganizedParticipantsResult => {\n const visibleGridParticipants = useRef<VideoGalleryRemoteParticipant[]>([]);\n const visibleOverflowGalleryParticipants = useRef<VideoGalleryRemoteParticipant[]>([]);\n const {\n remoteParticipants = [],\n localParticipant,\n dominantSpeakers = [],\n maxRemoteVideoStreams = DEFAULT_MAX_VIDEO_SREAMS,\n maxOverflowGalleryDominantSpeakers = DEFAULT_MAX_OVERFLOW_GALLERY_DOMINANT_SPEAKERS,\n isScreenShareActive = false,\n pinnedParticipantUserIds = [],\n /* @conditional-compile-remove(gallery-layouts) */\n layout\n } = props;\n const calculateMaxRemoteVideoStreams = (): number => {\n /* @conditional-compile-remove(gallery-layouts) */\n if (maxRemoteVideoStreams > MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY) {\n return MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY;\n } else {\n return maxRemoteVideoStreams;\n }\n return maxRemoteVideoStreams;\n };\n const maxRemoteVideoStreamsToUse = calculateMaxRemoteVideoStreams();\n const videoParticipants = remoteParticipants.filter(p => p.videoStream?.isAvailable);\n const participantsToSortTrampoline = (): VideoGalleryRemoteParticipant[] => {\n /* @conditional-compile-remove(gallery-layouts) */\n return layout !== 'floatingLocalVideo' ? putVideoParticipantsFirst(remoteParticipants) : videoParticipants;\n return videoParticipants;\n };\n visibleGridParticipants.current = pinnedParticipantUserIds.length > 0 || isScreenShareActive ? [] : smartDominantSpeakerParticipants({\n participants: participantsToSortTrampoline(),\n dominantSpeakers,\n lastVisibleParticipants: visibleGridParticipants.current,\n maxDominantSpeakers: maxRemoteVideoStreamsToUse\n }).slice(0, maxRemoteVideoStreamsToUse);\n\n /* @conditional-compile-remove(gallery-layouts) */\n const dominantSpeakerToGrid = layout === 'speaker' ? dominantSpeakers && dominantSpeakers[0] ? visibleGridParticipants.current.filter(p => p.userId === dominantSpeakers[0]) : [visibleGridParticipants.current[0]] : [];\n /* @conditional-compile-remove(gallery-layouts) */\n if (dominantSpeakerToGrid[0]) {\n visibleGridParticipants.current = dominantSpeakerToGrid;\n }\n const visibleGridParticipantsSet = new Set(visibleGridParticipants.current.map(p => p.userId));\n const remoteParticipantsOrdered = putVideoParticipantsFirst(remoteParticipants);\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const callingParticipants = remoteParticipantsOrdered.filter(p => p.state === ('Connecting' || 'Ringing'));\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const callingParticipantsSet = new Set(callingParticipants.map(p => p.userId));\n visibleOverflowGalleryParticipants.current = smartDominantSpeakerParticipants({\n participants: remoteParticipantsOrdered.filter(p => !visibleGridParticipantsSet.has(p.userId) && /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */!callingParticipantsSet.has(p.userId)),\n dominantSpeakers: dominantSpeakers,\n lastVisibleParticipants: visibleOverflowGalleryParticipants.current,\n maxDominantSpeakers: maxOverflowGalleryDominantSpeakers\n });\n const getGridParticipants = useCallback((): VideoGalleryRemoteParticipant[] => {\n if (isScreenShareActive) {\n return [];\n }\n // if we have no grid participants we need to cap the max number of overflowGallery participants in the grid\n // we will use the max streams provided to the function to find the max participants that can go in the grid\n // if there are less participants than max streams then we will use all participants including joining in the grid\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return visibleGridParticipants.current.length > 0 ? visibleGridParticipants.current : visibleOverflowGalleryParticipants.current.length > maxRemoteVideoStreamsToUse ? visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse) : visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse).concat(callingParticipants);\n return visibleGridParticipants.current.length > 0 ? visibleGridParticipants.current : visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse);\n }, [/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */callingParticipants, isScreenShareActive, maxRemoteVideoStreamsToUse]);\n const gridParticipants = getGridParticipants();\n const getOverflowGalleryRemoteParticipants = useCallback((): (VideoGalleryParticipant | VideoGalleryRemoteParticipant)[] => {\n if (isScreenShareActive && localParticipant) {\n const localParticipantPlusOverflow = [localParticipant].concat(visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current));\n // If screen sharing is active, assign video and audio participants as overflow gallery participants\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return localParticipantPlusOverflow.concat(callingParticipants);\n return localParticipantPlusOverflow;\n } else if (isScreenShareActive) {\n // If screen sharing is active, assign video and audio participants as overflow gallery participants\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current.concat(callingParticipants));\n return visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current);\n } else {\n // If screen sharing is not active, then assign all video tiles as grid tiles.\n // If there are no video tiles, then assign audio tiles as grid tiles.\n // if there are more overflow tiles than max streams then find the tiles that don't fit in the grid and put them in overflow\n // overflow should be empty if total participants including calling participants is less than max streams\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return visibleGridParticipants.current.length > 0 ? visibleOverflowGalleryParticipants.current.concat(callingParticipants) : visibleOverflowGalleryParticipants.current.length > maxRemoteVideoStreamsToUse ? visibleOverflowGalleryParticipants.current.slice(maxRemoteVideoStreamsToUse).concat(callingParticipants) : [];\n return visibleGridParticipants.current.length > 0 ? visibleOverflowGalleryParticipants.current : visibleOverflowGalleryParticipants.current.slice(maxRemoteVideoStreamsToUse);\n }\n }, [/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */callingParticipants, isScreenShareActive, localParticipant, maxRemoteVideoStreamsToUse]);\n const overflowGalleryParticipants = getOverflowGalleryRemoteParticipants();\n return {\n gridParticipants,\n overflowGalleryParticipants: overflowGalleryParticipants\n };\n};\n\n/* @conditional-compile-remove(pinned-participants) */\nconst _useOrganizedParticipantsWithPinnedParticipants = (props: OrganizedParticipantsArgs): OrganizedParticipantsResult => {\n // map remote participants by userId\n const remoteParticipantMap = props.remoteParticipants.reduce((map, remoteParticipant) => {\n map[remoteParticipant.userId] = remoteParticipant;\n return map;\n }, {});\n\n // get pinned participants in the same order of pinned participant user ids using remoteParticipantMap\n const pinnedParticipants: VideoGalleryRemoteParticipant[] = [];\n props.pinnedParticipantUserIds?.forEach(id => {\n const pinnedParticipant = remoteParticipantMap[id];\n if (pinnedParticipant) {\n pinnedParticipants.push(pinnedParticipant);\n }\n });\n\n // get unpinned participants by filtering all remote participants using a set of pinned participant user ids\n const pinnedParticipantUserIdSet = new Set(props.pinnedParticipantUserIds);\n const unpinnedParticipants = props.remoteParticipants.filter(p => !pinnedParticipantUserIdSet.has(p.userId));\n const useOrganizedParticipantsProps = {\n ...props,\n // if there are pinned participants then we should only consider unpinned participants\n remoteParticipants: unpinnedParticipants\n };\n const useOrganizedParticipantsResult = _useOrganizedParticipants(useOrganizedParticipantsProps);\n if (pinnedParticipants.length === 0) {\n return useOrganizedParticipantsResult;\n }\n return {\n gridParticipants: props.isScreenShareActive ? [] : pinnedParticipants,\n overflowGalleryParticipants: props.isScreenShareActive ? pinnedParticipants.concat(useOrganizedParticipantsResult.overflowGalleryParticipants) : useOrganizedParticipantsResult.gridParticipants.concat(useOrganizedParticipantsResult.overflowGalleryParticipants)\n };\n};\nconst putVideoParticipantsFirst = (remoteParticipants: VideoGalleryRemoteParticipant[]): VideoGalleryRemoteParticipant[] => {\n const videoParticipants: VideoGalleryRemoteParticipant[] = [];\n const audioParticipants: VideoGalleryRemoteParticipant[] = [];\n remoteParticipants.forEach(p => {\n if (p.videoStream?.isAvailable) {\n videoParticipants.push(p);\n } else {\n audioParticipants.push(p);\n }\n });\n const remoteParticipantSortedByVideo = videoParticipants.concat(audioParticipants);\n return remoteParticipantSortedByVideo;\n};\n\n/**\n * Hook to determine which participants should be in grid and overflow gallery and their order respectively\n * @private\n */\nexport const useOrganizedParticipants = (args: OrganizedParticipantsArgs): OrganizedParticipantsResult => {\n /* @conditional-compile-remove(pinned-participants) */\n return _useOrganizedParticipantsWithPinnedParticipants(args);\n return _useOrganizedParticipants(args);\n};"]}
@@ -99,6 +99,12 @@ export interface VideoGalleryStyles extends BaseCustomStyles {
99
99
  * @public
100
100
  */
101
101
  export declare type OverflowGalleryPosition = 'horizontalBottom' | 'verticalRight' | /* @conditional-compile-remove(gallery-layouts) */ 'horizontalTop';
102
+ /**
103
+ * different modes of the local video tile
104
+ *
105
+ * @beta
106
+ */
107
+ export declare type LocalVideoTileSize = '9:16' | '16:9' | 'hidden' | 'followDeviceOrientation';
102
108
  /**
103
109
  * Props for {@link VideoGallery}.
104
110
  *
@@ -191,6 +197,13 @@ export interface VideoGalleryProps {
191
197
  * @defaultValue 'horizontalBottom'
192
198
  */
193
199
  overflowGalleryPosition?: OverflowGalleryPosition;
200
+ /**
201
+ * Determines the aspect ratio of local video tile in the video gallery.
202
+ * @remarks 'followDeviceOrientation' will be responsive to the screen orientation and will change between 9:16 (portrait) and
203
+ * 16:9 (landscape) aspect ratios.
204
+ * @defaultValue 'followDeviceOrientation'
205
+ */
206
+ localVideoTileSize?: LocalVideoTileSize;
194
207
  }
195
208
  /**
196
209
  * Properties for showing contextual menu for remote {@link VideoTile} components in {@link VideoGallery}.
@@ -74,7 +74,9 @@ export const VideoGallery = (props) => {
74
74
  /* @conditional-compile-remove(pinned-participants) */
75
75
  remoteVideoTileMenu = DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS,
76
76
  /* @conditional-compile-remove(vertical-gallery) */
77
- overflowGalleryPosition = 'horizontalBottom' } = props;
77
+ overflowGalleryPosition = 'horizontalBottom',
78
+ /* @conditional-compile-remove(rooms) */
79
+ localVideoTileSize = 'followDeviceOrientation' } = props;
78
80
  const ids = useIdentifiers();
79
81
  const theme = useTheme();
80
82
  const localeStrings = useLocale().strings.videoGallery;
@@ -118,6 +120,10 @@ export const VideoGallery = (props) => {
118
120
  */
119
121
  const localVideoTile = useMemo(() => {
120
122
  var _a, _b;
123
+ /* @conditional-compile-remove(click-to-call) */
124
+ if (localVideoTileSize === 'hidden') {
125
+ return undefined;
126
+ }
121
127
  if (onRenderLocalVideoTile) {
122
128
  return onRenderLocalVideoTile(localParticipant);
123
129
  }
@@ -133,9 +139,10 @@ export const VideoGallery = (props) => {
133
139
  return isNarrow ? '' : strings.localVideoLabel;
134
140
  };
135
141
  return React.createElement(Stack, { styles: localVideoTileContainerStyles, key: "local-video-tile-key", tabIndex: 0, "aria-label": strings.localVideoMovementLabel, role: 'dialog' },
136
- React.createElement(_LocalVideoTile, { userId: localParticipant.userId, onCreateLocalStreamView: onCreateLocalStreamView, onDisposeLocalStreamView: onDisposeLocalStreamView, isAvailable: (_a = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable, isMuted: localParticipant.isMuted, renderElement: (_b = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _b === void 0 ? void 0 : _b.renderElement, displayName: showDisplayNameTrampoline(), initialsName: initialsName, localVideoViewOptions: localVideoViewOptions, onRenderAvatar: onRenderAvatar, showLabel: !(localTileNotInGrid && isNarrow) || /* @conditional-compile-remove(gallery-layouts) */ layout === 'default', showMuteIndicator: showMuteIndicator, showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: strings.localVideoCameraSwitcherLabel, localVideoSelectedDescription: strings.localVideoSelectedDescription, styles: localVideoTileStyles,
142
+ React.createElement(_LocalVideoTile, { userId: localParticipant.userId, onCreateLocalStreamView: onCreateLocalStreamView, onDisposeLocalStreamView: onDisposeLocalStreamView, isAvailable: (_a = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable, isMuted: localParticipant.isMuted, renderElement: (_b = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _b === void 0 ? void 0 : _b.renderElement, displayName: showDisplayNameTrampoline(), initialsName: initialsName, localVideoViewOptions: localVideoViewOptions, onRenderAvatar: onRenderAvatar, showLabel: !(localTileNotInGrid && isNarrow || /*@conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ localVideoTileSize === '9:16') || /* @conditional-compile-remove(gallery-layouts) */ layout === 'default', showMuteIndicator: showMuteIndicator, showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: strings.localVideoCameraSwitcherLabel, localVideoSelectedDescription: strings.localVideoSelectedDescription, styles: localVideoTileStyles,
137
143
  /* @conditional-compile-remove(raise-hand) */ raisedHand: localParticipant.raisedHand }));
138
144
  }, [isNarrow, localParticipant, localVideoCameraCycleButtonProps, localVideoViewOptions, onCreateLocalStreamView, onDisposeLocalStreamView, onRenderAvatar, onRenderLocalVideoTile, localTileNotInGrid, showCameraSwitcherInLocalPreview, showMuteIndicator, strings.localVideoCameraSwitcherLabel, strings.localVideoLabel, strings.localVideoMovementLabel, strings.localVideoSelectedDescription, styles === null || styles === void 0 ? void 0 : styles.localVideo, theme.effects.roundedCorner4,
145
+ localVideoTileSize,
139
146
  layout]);
140
147
  /* @conditional-compile-remove(pinned-participants) */
141
148
  const onPinParticipant = useCallback((userId) => {
@@ -186,7 +193,9 @@ export const VideoGallery = (props) => {
186
193
  } : remoteVideoViewOptions;
187
194
  return remoteVideoViewOptions;
188
195
  };
189
- return React.createElement(_RemoteVideoTile, { key: participant.userId, userId: participant.userId, remoteParticipant: participant, onCreateRemoteStreamView: isVideoParticipant ? onCreateRemoteStreamView : undefined, onDisposeRemoteStreamView: isVideoParticipant ? onDisposeRemoteVideoStreamView : undefined, isAvailable: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isAvailable : false, isReceiving: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isReceiving : false, renderElement: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.renderElement : undefined, remoteVideoViewOptions: isVideoParticipant && createViewOptions() ? createViewOptions() : undefined, onRenderAvatar: onRenderAvatar, showMuteIndicator: showMuteIndicator, strings: strings, menuKind: participant.userId === localParticipant.userId ? undefined : remoteVideoTileMenu ? remoteVideoTileMenu.kind === 'drawer' ? 'drawer' : 'contextual' : undefined,
196
+ return React.createElement(_RemoteVideoTile, { key: participant.userId, userId: participant.userId, remoteParticipant: participant, onCreateRemoteStreamView: isVideoParticipant ? onCreateRemoteStreamView : undefined, onDisposeRemoteStreamView: isVideoParticipant ? onDisposeRemoteVideoStreamView : undefined, isAvailable: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isAvailable : false, isReceiving: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isReceiving : false, renderElement: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.renderElement : undefined, remoteVideoViewOptions: isVideoParticipant && createViewOptions() ? createViewOptions() : undefined, onRenderAvatar: onRenderAvatar, showMuteIndicator: showMuteIndicator, strings: strings,
197
+ /* @conditional-compile-remove(PSTN-calls) */ participantState: participant.state,
198
+ /* @conditional-compile-remove(pinned-participants) */ menuKind: participant.userId === localParticipant.userId ? undefined : remoteVideoTileMenu ? remoteVideoTileMenu.kind === 'drawer' ? 'drawer' : 'contextual' : undefined,
190
199
  /* @conditional-compile-remove(pinned-participants) */ drawerMenuHostId: drawerMenuHostId,
191
200
  /* @conditional-compile-remove(pinned-participants) */ onPinParticipant: onPinParticipant,
192
201
  /* @conditional-compile-remove(pinned-participants) */ onUnpinParticipant: onUnpinParticipant,
@@ -212,8 +221,9 @@ export const VideoGallery = (props) => {
212
221
  parentWidth: containerWidth,
213
222
  parentHeight: containerHeight,
214
223
  /* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds: pinnedParticipants,
215
- /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition
216
- }), [remoteParticipants, localParticipant, screenShareComponent, showCameraSwitcherInLocalPreview, maxRemoteVideoStreams, dominantSpeakers, styles, localVideoTile, containerWidth, containerHeight, onRenderRemoteVideoTile, defaultOnRenderVideoTile, /* @conditional-compile-remove(pinned-participants) */ pinnedParticipants, /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition]);
224
+ /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition,
225
+ /* @conditional-compile-remove(click-to-call) */ localVideoTileSize
226
+ }), [remoteParticipants, localParticipant, screenShareComponent, showCameraSwitcherInLocalPreview, maxRemoteVideoStreams, dominantSpeakers, styles, localVideoTile, containerWidth, containerHeight, onRenderRemoteVideoTile, defaultOnRenderVideoTile, /* @conditional-compile-remove(pinned-participants) */ pinnedParticipants, /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition, /* @conditional-compile-remove(click-to-call) */ localVideoTileSize]);
217
227
  const videoGalleryLayout = useMemo(() => {
218
228
  /* @conditional-compile-remove(gallery-layouts) */
219
229
  if (screenShareParticipant && layout === 'focusedContent') {