@azure/communication-react 1.5.1-alpha-202211250013.0 → 1.5.2-alpha-202301190014.0

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 (303) hide show
  1. package/CHANGELOG.beta.md +47 -1
  2. package/CHANGELOG.json +1554 -0
  3. package/CHANGELOG.stable.md +88 -2
  4. package/dist/communication-react.d.ts +468 -296
  5. package/dist/dist-cjs/communication-react/index.js +2904 -1694
  6. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/identifier.js +3 -47
  8. package/dist/dist-esm/acs-ui-common/src/identifier.js.map +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -0
  12. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -0
  13. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +21 -10
  15. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  16. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  17. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -7
  18. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +13 -4
  20. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +7 -0
  22. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +9 -0
  23. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +12 -0
  25. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +31 -6
  26. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +2 -13
  28. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  29. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -1
  30. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  31. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -1
  32. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +14 -0
  33. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  34. package/dist/dist-esm/calling-stateful-client/src/Converter.js +1 -1
  35. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/Logger.d.ts +1 -0
  37. package/dist/dist-esm/calling-stateful-client/src/Logger.js +1 -0
  38. package/dist/dist-esm/calling-stateful-client/src/Logger.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -1
  40. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +11 -4
  41. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  42. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +39 -12
  43. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  44. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +2 -2
  45. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  46. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.d.ts +19 -0
  47. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.js +43 -0
  48. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.js.map +1 -0
  49. package/dist/dist-esm/communication-react/src/index.d.ts +7 -5
  50. package/dist/dist-esm/communication-react/src/index.js +5 -3
  51. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +105 -0
  53. package/dist/dist-esm/react-components/src/components/DevicePermissions/{DomainPermissions.js → SitePermissions.js} +28 -22
  54. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +1 -0
  55. package/dist/dist-esm/react-components/src/components/DevicePermissions/{DomainPermissionsScaffolding.d.ts → SitePermissionsScaffolding.d.ts} +12 -12
  56. package/dist/dist-esm/react-components/src/components/DevicePermissions/{DomainPermissionsScaffolding.js → SitePermissionsScaffolding.js} +4 -4
  57. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +1 -0
  58. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +20 -9
  59. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.d.ts +1 -0
  61. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.js +18 -2
  62. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.js.map +1 -1
  63. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.d.ts +4 -0
  64. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +1 -1
  65. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
  66. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.d.ts +4 -0
  67. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js +1 -1
  68. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js.map +1 -1
  69. package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +8 -0
  70. package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
  71. package/dist/dist-esm/react-components/src/components/MessageThread.js +6 -4
  72. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  73. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +0 -2
  74. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +10 -12
  75. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  76. package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +4 -0
  77. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +25 -4
  78. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  79. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +10 -4
  80. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +79 -7
  81. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  82. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.d.ts +6 -6
  83. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +13 -21
  84. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  85. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.d.ts +37 -0
  86. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +27 -0
  87. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -0
  88. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.d.ts +41 -0
  89. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +32 -0
  90. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -0
  91. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.d.ts +32 -0
  92. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +25 -0
  93. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -0
  94. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +16 -0
  95. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +60 -0
  96. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -0
  97. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.d.ts +12 -0
  98. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +41 -0
  99. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -0
  100. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +25 -0
  101. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +76 -0
  102. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -0
  103. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +38 -0
  104. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js +4 -0
  105. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -0
  106. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +9 -0
  107. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +18 -0
  108. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +1 -0
  109. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.d.ts +14 -0
  110. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +19 -0
  111. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +1 -0
  112. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.d.ts +6 -0
  113. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.js +9 -0
  114. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.js.map +1 -0
  115. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +62 -0
  116. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +118 -0
  117. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -0
  118. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.d.ts +14 -0
  119. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.js +28 -0
  120. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.js.map +1 -0
  121. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.d.ts +6 -0
  122. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.js +9 -0
  123. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.js.map +1 -0
  124. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.d.ts +9 -0
  125. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.js +22 -0
  126. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.js.map +1 -0
  127. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.d.ts +10 -0
  128. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js +29 -0
  129. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js.map +1 -0
  130. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.d.ts +45 -0
  131. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +57 -0
  132. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -0
  133. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.d.ts +2 -2
  134. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js +7 -2
  135. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.d.ts +23 -0
  137. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +96 -0
  138. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -0
  139. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +27 -0
  140. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +121 -0
  141. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -0
  142. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +66 -0
  143. package/dist/dist-esm/react-components/src/components/VideoGallery.js +131 -124
  144. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  145. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +12 -17
  146. package/dist/dist-esm/react-components/src/components/VideoTile.js +71 -38
  147. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  148. package/dist/dist-esm/react-components/src/components/index.d.ts +8 -3
  149. package/dist/dist-esm/react-components/src/components/index.js +3 -2
  150. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  151. package/dist/dist-esm/react-components/src/components/styles/{DomainPermissions.styles.d.ts → SitePermissions.styles.d.ts} +1 -1
  152. package/dist/dist-esm/react-components/src/components/styles/{DomainPermissions.styles.js → SitePermissions.styles.js} +1 -1
  153. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +1 -0
  154. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js +2 -1
  155. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js.map +1 -1
  156. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +26 -0
  157. package/dist/dist-esm/react-components/src/components/styles/{UnsupportedBrowser.styles.js → UnsupportedEnvironment.styles.js} +25 -10
  158. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +1 -0
  159. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.d.ts +1 -95
  160. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +3 -138
  161. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
  162. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +1 -1
  163. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +11 -26
  164. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  165. package/dist/dist-esm/react-components/src/components/utils/useLongPress.d.ts +13 -10
  166. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +66 -37
  167. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
  168. package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -6
  169. package/dist/dist-esm/react-components/src/components/utils.js +4 -16
  170. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  171. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  172. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  173. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +31 -19
  174. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  175. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +1 -1
  176. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +1 -1
  177. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +49 -14
  178. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +1 -1
  179. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +1 -1
  180. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +1 -1
  181. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +1 -1
  182. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +1 -1
  183. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +1 -1
  184. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +1 -1
  185. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +1 -1
  186. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +1 -1
  187. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +1 -1
  188. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +1 -1
  189. package/dist/dist-esm/react-components/src/theming/icons.d.ts +11 -6
  190. package/dist/dist-esm/react-components/src/theming/icons.js +30 -20
  191. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  192. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +1 -1
  193. package/dist/dist-esm/react-components/src/theming/icons.styles.js +1 -1
  194. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -1
  195. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +2 -0
  196. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  197. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +24 -11
  198. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +9 -9
  199. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  200. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +56 -0
  201. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  202. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +16 -10
  203. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +89 -40
  204. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  205. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +11 -17
  206. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  207. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +2 -2
  208. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +1 -1
  209. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  210. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +1 -0
  211. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +19 -18
  212. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  213. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +5 -4
  214. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +68 -28
  215. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -1
  216. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +16 -0
  217. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageCameraDropdown.js → ConfigurationPageCameraDropdown.js} +4 -6
  218. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -0
  219. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageErrorBar.d.ts → ConfigurationPageErrorBar.d.ts} +3 -4
  220. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageErrorBar.js → ConfigurationPageErrorBar.js} +4 -6
  221. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -0
  222. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +16 -0
  223. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageMicDropdown.js → ConfigurationPageMicDropdown.js} +4 -8
  224. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -0
  225. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js +1 -0
  226. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js.map +1 -1
  227. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  228. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +16 -14
  229. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  230. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +8 -3
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +3 -0
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +26 -4
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +11 -3
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +4 -4
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +6 -2
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +3 -3
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +46 -27
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +2 -0
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +28 -7
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +1 -1
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +7 -0
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.js +9 -1
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.js.map +1 -1
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.d.ts +4 -0
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js +10 -0
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js.map +1 -1
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +29 -0
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +119 -0
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -0
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +20 -4
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +74 -21
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  262. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +16 -7
  263. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +22 -10
  264. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  265. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +2 -0
  266. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -0
  268. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +6 -0
  269. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +4 -0
  271. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  272. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -0
  273. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +7 -1
  274. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  275. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +8 -0
  276. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  277. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +4 -0
  278. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  279. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +26 -3
  280. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  281. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.d.ts +8 -0
  282. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js +40 -0
  283. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js.map +1 -0
  284. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +1 -1
  285. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  286. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +11 -6
  287. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js +1 -0
  288. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js.map +1 -1
  289. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js +2 -1
  290. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js.map +1 -1
  291. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +15 -1
  292. package/package.json +12 -11
  293. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.d.ts +0 -101
  294. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js.map +0 -1
  295. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.js.map +0 -1
  296. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js.map +0 -1
  297. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.d.ts +0 -22
  298. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.js.map +0 -1
  299. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.d.ts +0 -17
  300. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js.map +0 -1
  301. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js.map +0 -1
  302. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.d.ts +0 -17
  303. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js.map +0 -1
@@ -0,0 +1,23 @@
1
+ import { IContextualMenuProps } from '@fluentui/react';
2
+ import { VideoGalleryRemoteParticipant, ViewScalingMode } from '../../types';
3
+ /**
4
+ * @private
5
+ */
6
+ export declare const useVideoTileContextualMenuProps: (props: {
7
+ remoteParticipant: VideoGalleryRemoteParticipant;
8
+ strings?: {
9
+ fitRemoteParticipantToFrame?: string | undefined;
10
+ fillRemoteParticipantFrame?: string | undefined;
11
+ pinParticipantForMe?: string | undefined;
12
+ pinParticipantForMeLimitReached?: string | undefined;
13
+ unpinParticipantForMe?: string | undefined;
14
+ } | undefined;
15
+ view?: {
16
+ updateScalingMode: (scalingMode: ViewScalingMode) => Promise<void>;
17
+ } | undefined;
18
+ isPinned?: boolean | undefined;
19
+ onPinParticipant?: ((userId: string) => void) | undefined;
20
+ onUnpinParticipant?: ((userId: string) => void) | undefined;
21
+ disablePinMenuItem?: boolean | undefined;
22
+ }) => IContextualMenuProps | undefined;
23
+ //# sourceMappingURL=useVideoTileContextualMenuProps.d.ts.map
@@ -0,0 +1,96 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { useMemo } from 'react';
4
+ /**
5
+ * @private
6
+ */
7
+ export const useVideoTileContextualMenuProps = (props) => {
8
+ var _a;
9
+ const { view, strings, isPinned, onPinParticipant, onUnpinParticipant, disablePinMenuItem } = props;
10
+ const scalingMode = useMemo(() => {
11
+ var _a;
12
+ /* @conditional-compile-remove(pinned-participants) */
13
+ return (_a = props.remoteParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.scalingMode;
14
+ return undefined;
15
+ }, [
16
+ /* @conditional-compile-remove(pinned-participants) */
17
+ (_a = props.remoteParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.scalingMode
18
+ ]);
19
+ const contextualMenuProps = useMemo(() => {
20
+ const items = [];
21
+ if (isPinned !== undefined) {
22
+ if (isPinned && onUnpinParticipant && (strings === null || strings === void 0 ? void 0 : strings.unpinParticipantForMe)) {
23
+ items.push({
24
+ key: 'unpin',
25
+ text: strings.unpinParticipantForMe,
26
+ iconProps: {
27
+ iconName: 'UnpinParticipant',
28
+ styles: { root: { lineHeight: '1rem', textAlign: 'center' } }
29
+ },
30
+ onClick: () => onUnpinParticipant === null || onUnpinParticipant === void 0 ? void 0 : onUnpinParticipant(props.remoteParticipant.userId),
31
+ 'data-ui-id': 'video-tile-unpin-participant-button'
32
+ });
33
+ }
34
+ if (!isPinned && onPinParticipant && (strings === null || strings === void 0 ? void 0 : strings.pinParticipantForMe)) {
35
+ items.push({
36
+ key: 'pin',
37
+ text: disablePinMenuItem ? strings.pinParticipantForMeLimitReached : strings.pinParticipantForMe,
38
+ iconProps: {
39
+ iconName: 'PinParticipant',
40
+ styles: { root: { lineHeight: '1rem', textAlign: 'center' } }
41
+ },
42
+ onClick: () => onPinParticipant === null || onPinParticipant === void 0 ? void 0 : onPinParticipant(props.remoteParticipant.userId),
43
+ 'data-ui-id': 'video-tile-pin-participant-button',
44
+ disabled: disablePinMenuItem
45
+ });
46
+ }
47
+ }
48
+ if (scalingMode) {
49
+ if (scalingMode === 'Crop' && (strings === null || strings === void 0 ? void 0 : strings.fitRemoteParticipantToFrame)) {
50
+ items.push({
51
+ key: 'fitRemoteParticipantToFrame',
52
+ text: strings.fitRemoteParticipantToFrame,
53
+ iconProps: {
54
+ iconName: 'VideoTileScaleFit',
55
+ styles: { root: { lineHeight: '1rem', textAlign: 'center' } }
56
+ },
57
+ onClick: () => {
58
+ view === null || view === void 0 ? void 0 : view.updateScalingMode('Fit');
59
+ },
60
+ 'data-ui-id': 'video-tile-fit-to-frame'
61
+ });
62
+ }
63
+ else if (scalingMode === 'Fit' && (strings === null || strings === void 0 ? void 0 : strings.fillRemoteParticipantFrame)) {
64
+ {
65
+ items.push({
66
+ key: 'fillRemoteParticipantFrame',
67
+ text: strings.fillRemoteParticipantFrame,
68
+ iconProps: {
69
+ iconName: 'VideoTileScaleFill',
70
+ styles: { root: { lineHeight: '1rem', textAlign: 'center' } }
71
+ },
72
+ onClick: () => {
73
+ view === null || view === void 0 ? void 0 : view.updateScalingMode('Crop');
74
+ },
75
+ 'data-ui-id': 'video-tile-fill-frame'
76
+ });
77
+ }
78
+ }
79
+ }
80
+ if (items.length === 0) {
81
+ return undefined;
82
+ }
83
+ return { items, styles: {} };
84
+ }, [
85
+ scalingMode,
86
+ strings,
87
+ view,
88
+ isPinned,
89
+ onPinParticipant,
90
+ onUnpinParticipant,
91
+ props.remoteParticipant.userId,
92
+ disablePinMenuItem
93
+ ]);
94
+ return contextualMenuProps;
95
+ };
96
+ //# sourceMappingURL=useVideoTileContextualMenuProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useVideoTileContextualMenuProps.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,KAc/C,EAAoC,EAAE;;IACrC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC;IACpG,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE;;QAC/B,sDAAsD;QACtD,OAAO,MAAA,KAAK,CAAC,iBAAiB,CAAC,WAAW,0CAAE,WAAW,CAAC;QACxD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE;QACD,sDAAsD;QACtD,MAAA,KAAK,CAAC,iBAAiB,CAAC,WAAW,0CAAE,WAAW;KACjD,CAAC,CAAC;IAEH,MAAM,mBAAmB,GAAqC,OAAO,CAAC,GAAG,EAAE;QACzE,MAAM,KAAK,GAA0B,EAAE,CAAC;QAExC,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,IAAI,QAAQ,IAAI,kBAAkB,KAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,qBAAqB,CAAA,E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AAC7B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IContextualMenuItem, IContextualMenuProps } from '@fluentui/react';\nimport { useMemo } from 'react';\nimport { VideoGalleryRemoteParticipant, ViewScalingMode } from '../../types';\n\n/**\n * @private\n */\nexport const useVideoTileContextualMenuProps = (props: {\n remoteParticipant: VideoGalleryRemoteParticipant;\n strings?: {\n fitRemoteParticipantToFrame?: string;\n fillRemoteParticipantFrame?: string;\n pinParticipantForMe?: string;\n pinParticipantForMeLimitReached?: string;\n unpinParticipantForMe?: string;\n };\n view?: { updateScalingMode: (scalingMode: ViewScalingMode) => Promise<void> };\n isPinned?: boolean;\n onPinParticipant?: (userId: string) => void;\n onUnpinParticipant?: (userId: string) => void;\n disablePinMenuItem?: boolean;\n}): IContextualMenuProps | undefined => {\n const { view, strings, isPinned, onPinParticipant, onUnpinParticipant, disablePinMenuItem } = props;\n const scalingMode = useMemo(() => {\n /* @conditional-compile-remove(pinned-participants) */\n return props.remoteParticipant.videoStream?.scalingMode;\n return undefined;\n }, [\n /* @conditional-compile-remove(pinned-participants) */\n props.remoteParticipant.videoStream?.scalingMode\n ]);\n\n const contextualMenuProps: IContextualMenuProps | undefined = useMemo(() => {\n const items: IContextualMenuItem[] = [];\n\n if (isPinned !== undefined) {\n if (isPinned && onUnpinParticipant && strings?.unpinParticipantForMe) {\n items.push({\n key: 'unpin',\n text: strings.unpinParticipantForMe,\n iconProps: {\n iconName: 'UnpinParticipant',\n styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n },\n onClick: () => onUnpinParticipant?.(props.remoteParticipant.userId),\n 'data-ui-id': 'video-tile-unpin-participant-button'\n });\n }\n if (!isPinned && onPinParticipant && strings?.pinParticipantForMe) {\n items.push({\n key: 'pin',\n text: disablePinMenuItem ? strings.pinParticipantForMeLimitReached : strings.pinParticipantForMe,\n iconProps: {\n iconName: 'PinParticipant',\n styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n },\n onClick: () => onPinParticipant?.(props.remoteParticipant.userId),\n 'data-ui-id': 'video-tile-pin-participant-button',\n disabled: disablePinMenuItem\n });\n }\n }\n if (scalingMode) {\n if (scalingMode === 'Crop' && strings?.fitRemoteParticipantToFrame) {\n items.push({\n key: 'fitRemoteParticipantToFrame',\n text: strings.fitRemoteParticipantToFrame,\n iconProps: {\n iconName: 'VideoTileScaleFit',\n styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n },\n onClick: () => {\n view?.updateScalingMode('Fit');\n },\n 'data-ui-id': 'video-tile-fit-to-frame'\n });\n } else if (scalingMode === 'Fit' && strings?.fillRemoteParticipantFrame) {\n {\n items.push({\n key: 'fillRemoteParticipantFrame',\n text: strings.fillRemoteParticipantFrame,\n iconProps: {\n iconName: 'VideoTileScaleFill',\n styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n },\n onClick: () => {\n view?.updateScalingMode('Crop');\n },\n 'data-ui-id': 'video-tile-fill-frame'\n });\n }\n }\n }\n if (items.length === 0) {\n return undefined;\n }\n\n return { items, styles: {} };\n }, [\n scalingMode,\n strings,\n view,\n isPinned,\n onPinParticipant,\n onUnpinParticipant,\n props.remoteParticipant.userId,\n disablePinMenuItem\n ]);\n\n return contextualMenuProps;\n};\n"]}
@@ -0,0 +1,27 @@
1
+ import { VideoGalleryParticipant, VideoGalleryRemoteParticipant } from '../../../types';
2
+ /**
3
+ * Arguments used to determine a {@link OrganizedParticipantsResult}
4
+ * @private
5
+ */
6
+ export interface OrganizedParticipantsArgs {
7
+ remoteParticipants: VideoGalleryRemoteParticipant[];
8
+ dominantSpeakers?: string[];
9
+ maxRemoteVideoStreams?: number;
10
+ maxAudioDominantSpeakers?: number;
11
+ isScreenShareActive?: boolean;
12
+ pinnedParticipantUserIds?: string[];
13
+ }
14
+ /**
15
+ * A result that defines grid participants and horizontal participants in the VideoGallery
16
+ * @private
17
+ */
18
+ export interface OrganizedParticipantsResult {
19
+ gridParticipants: VideoGalleryParticipant[];
20
+ horizontalGalleryParticipants: VideoGalleryParticipant[];
21
+ }
22
+ /**
23
+ * Hook to determine which participants should be in grid and horizontal gallery and their order respectively
24
+ * @private
25
+ */
26
+ export declare const useOrganizedParticipants: (args: OrganizedParticipantsArgs) => OrganizedParticipantsResult;
27
+ //# sourceMappingURL=videoGalleryLayoutUtils.d.ts.map
@@ -0,0 +1,121 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { useCallback, useRef } from 'react';
4
+ import { smartDominantSpeakerParticipants } from '../../../gallery';
5
+ const DEFAULT_MAX_REMOTE_VIDEOSTREAMS = 4;
6
+ const DEFAULT_MAX_AUDIO_DOMINANT_SPEAKERS = 6;
7
+ const _useOrganizedParticipants = (props) => {
8
+ var _a, _b;
9
+ const visibleVideoParticipants = useRef([]);
10
+ const visibleAudioParticipants = useRef([]);
11
+ const { remoteParticipants, dominantSpeakers, maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEOSTREAMS, maxAudioDominantSpeakers = DEFAULT_MAX_AUDIO_DOMINANT_SPEAKERS, isScreenShareActive = false } = props;
12
+ visibleVideoParticipants.current = smartDominantSpeakerParticipants({
13
+ participants: (_a = remoteParticipants === null || remoteParticipants === void 0 ? void 0 : remoteParticipants.filter((p) => { var _a; return (_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable; })) !== null && _a !== void 0 ? _a : [],
14
+ dominantSpeakers,
15
+ lastVisibleParticipants: visibleVideoParticipants.current,
16
+ maxDominantSpeakers: maxRemoteVideoStreams
17
+ }).slice(0, maxRemoteVideoStreams);
18
+ const visibleVideoParticipantsSet = new Set(visibleVideoParticipants.current.map((p) => p.userId));
19
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
20
+ const callingParticipants = remoteParticipants.filter((p) => p.state === ('Connecting' || 'Ringing'));
21
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
22
+ const callingParticipantsSet = new Set(callingParticipants.map((p) => p.userId));
23
+ visibleAudioParticipants.current = smartDominantSpeakerParticipants({
24
+ participants: (_b = remoteParticipants === null || remoteParticipants === void 0 ? void 0 : remoteParticipants.filter((p) => !visibleVideoParticipantsSet.has(p.userId) &&
25
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !callingParticipantsSet.has(p.userId))) !== null && _b !== void 0 ? _b : [],
26
+ dominantSpeakers,
27
+ lastVisibleParticipants: visibleAudioParticipants.current,
28
+ maxDominantSpeakers: maxAudioDominantSpeakers
29
+ });
30
+ const getGridParticipants = useCallback(() => {
31
+ if (isScreenShareActive) {
32
+ return [];
33
+ }
34
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
35
+ return visibleVideoParticipants.current.length > 0
36
+ ? visibleVideoParticipants.current
37
+ : visibleAudioParticipants.current.concat(callingParticipants);
38
+ return visibleVideoParticipants.current.length > 0
39
+ ? visibleVideoParticipants.current
40
+ : visibleAudioParticipants.current;
41
+ }, [
42
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,
43
+ isScreenShareActive
44
+ ]);
45
+ const gridParticipants = getGridParticipants();
46
+ const getHorizontalGalleryRemoteParticipants = useCallback(() => {
47
+ if (isScreenShareActive) {
48
+ // If screen sharing is active, assign video and audio participants as horizontal gallery participants
49
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
50
+ return visibleVideoParticipants.current.concat(visibleAudioParticipants.current.concat(callingParticipants));
51
+ return visibleVideoParticipants.current.concat(visibleAudioParticipants.current);
52
+ }
53
+ else {
54
+ // If screen sharing is not active, then assign all video tiles as grid tiles.
55
+ // If there are no video tiles, then assign audio tiles as grid tiles.
56
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
57
+ return visibleVideoParticipants.current.length > 0
58
+ ? visibleAudioParticipants.current.concat(callingParticipants)
59
+ : [];
60
+ return visibleVideoParticipants.current.length > 0 ? visibleAudioParticipants.current : [];
61
+ }
62
+ }, [
63
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,
64
+ isScreenShareActive
65
+ ]);
66
+ const horizontalGalleryParticipants = getHorizontalGalleryRemoteParticipants();
67
+ return { gridParticipants, horizontalGalleryParticipants };
68
+ };
69
+ /* @conditional-compile-remove(pinned-participants) */
70
+ const _useOrganizedParticipantsWithPinnedParticipants = (props) => {
71
+ var _a;
72
+ // map remote participants by userId
73
+ const remoteParticipantMap = props.remoteParticipants.reduce((map, remoteParticipant) => {
74
+ map[remoteParticipant.userId] = remoteParticipant;
75
+ return map;
76
+ }, {});
77
+ // count pinned participants with video
78
+ let pinnedParticipantsWithVideoOnCount = 0;
79
+ // get pinned participants in the same order of pinned participant user ids using remoteParticipantMap
80
+ const pinnedParticipants = [];
81
+ (_a = props.pinnedParticipantUserIds) === null || _a === void 0 ? void 0 : _a.forEach((id) => {
82
+ var _a;
83
+ const pinnedParticipant = remoteParticipantMap[id];
84
+ if (pinnedParticipant) {
85
+ pinnedParticipants.push(pinnedParticipant);
86
+ if ((_a = pinnedParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) {
87
+ pinnedParticipantsWithVideoOnCount++;
88
+ }
89
+ }
90
+ });
91
+ // get unpinned participants by filtering all remote participants using a set of pinned participant user ids
92
+ const pinnedParticipantUserIdSet = new Set(props.pinnedParticipantUserIds);
93
+ const unpinnedParticipants = props.remoteParticipants.filter((p) => !pinnedParticipantUserIdSet.has(p.userId));
94
+ const useOrganizedParticipantsProps = Object.assign(Object.assign({}, props), {
95
+ // if there are pinned participants then we should only consider unpinned participants
96
+ remoteParticipants: unpinnedParticipants,
97
+ // if there is a maximum of remote video streams we need to subtract pinned participants with video
98
+ maxRemoteVideoStreams: props.maxRemoteVideoStreams
99
+ ? props.maxRemoteVideoStreams - pinnedParticipantsWithVideoOnCount
100
+ : undefined });
101
+ const useOrganizedParticipantsResult = _useOrganizedParticipants(useOrganizedParticipantsProps);
102
+ if (pinnedParticipants.length === 0) {
103
+ return useOrganizedParticipantsResult;
104
+ }
105
+ return {
106
+ gridParticipants: props.isScreenShareActive ? [] : pinnedParticipants,
107
+ horizontalGalleryParticipants: props.isScreenShareActive
108
+ ? pinnedParticipants.concat(useOrganizedParticipantsResult.horizontalGalleryParticipants)
109
+ : useOrganizedParticipantsResult.gridParticipants.concat(useOrganizedParticipantsResult.horizontalGalleryParticipants)
110
+ };
111
+ };
112
+ /**
113
+ * Hook to determine which participants should be in grid and horizontal gallery and their order respectively
114
+ * @private
115
+ */
116
+ export const useOrganizedParticipants = (args) => {
117
+ /* @conditional-compile-remove(pinned-participants) */
118
+ return _useOrganizedParticipantsWithPinnedParticipants(args);
119
+ return _useOrganizedParticipants(args);
120
+ };
121
+ //# sourceMappingURL=videoGalleryLayoutUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"videoGalleryLayoutUtils.js","sourceRoot":"","sources":["../../../../../../../../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;AAyBpE,MAAM,+BAA+B,GAAG,CAAC,CAAC;AAE1C,MAAM,mCAAmC,GAAG,CAAC,CAAC;AAE9C,MAAM,yBAAyB,GAAG,CAAC,KAAgC,EAA+B,EAAE;;IAClG,MAAM,wBAAwB,GAAG,MAAM,CAAkC,EAAE,CAAC,CAAC;IAC7E,MAAM,wBAAwB,GAAG,MAAM,CAAkC,EAAE,CAAC,CAAC;IAE7E,MAAM,EACJ,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,GAAG,+BAA+B,EACvD,wBAAwB,GAAG,mCAAmC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;IAC3E,MAAM,oBAAoB,GAAG,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,0BAA0B,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAE/G,MAAM,6BAA6B,mCAC9B,KAAK;QACR,sFAAsF;QACtF,kBAAkB,EAAE,oBAAoB;QACxC,mGAAmG;QACnG,qBAAqB,EAAE,KAAK,CAAC,qBAAqB;YAChD,CAAC,CAAC,KAAK,CAAC,qBAAqB,GAAG,kCAAkC;YAClE,CAAC,CAAC,SAAS,GACd,CAAC;IAEF,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,6BAA6B,CAAC,CAAC;IAEhG,IAAI,kBAAkB,CAAC,MAAM,KAAK,CAAC,EAAE;QACnC,OAAO,8BAA8B,CAAC;KACvC;IAED,OAAO;QACL,gBAAgB,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,kBAAkB;QACrE,6BAA6B,EAAE,KAAK,CAAC,mBAAmB;YACtD,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,8BAA8B,CAAC,6BAA6B,CAAC;YACzF,CAAC,CAAC,8BAA8B,CAAC,gBAAgB,CAAC,MAAM,CACpD,8BAA8B,CAAC,6BAA6B,CAC7D;KACN,CAAC;AACJ,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\n/**\n * Arguments used to determine a {@link OrganizedParticipantsResult}\n * @private\n */\nexport interface OrganizedParticipantsArgs {\n remoteParticipants: VideoGalleryRemoteParticipant[];\n dominantSpeakers?: string[];\n maxRemoteVideoStreams?: number;\n maxAudioDominantSpeakers?: number;\n isScreenShareActive?: boolean;\n /* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds?: string[];\n}\n\n/**\n * A result that defines grid participants and horizontal participants in the VideoGallery\n * @private\n */\nexport interface OrganizedParticipantsResult {\n gridParticipants: VideoGalleryParticipant[];\n horizontalGalleryParticipants: VideoGalleryParticipant[];\n}\n\nconst DEFAULT_MAX_REMOTE_VIDEOSTREAMS = 4;\n\nconst DEFAULT_MAX_AUDIO_DOMINANT_SPEAKERS = 6;\n\nconst _useOrganizedParticipants = (props: OrganizedParticipantsArgs): OrganizedParticipantsResult => {\n const visibleVideoParticipants = useRef<VideoGalleryRemoteParticipant[]>([]);\n const visibleAudioParticipants = useRef<VideoGalleryRemoteParticipant[]>([]);\n\n const {\n remoteParticipants,\n dominantSpeakers,\n maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEOSTREAMS,\n maxAudioDominantSpeakers = DEFAULT_MAX_AUDIO_DOMINANT_SPEAKERS,\n isScreenShareActive = false\n } = props;\n\n visibleVideoParticipants.current = smartDominantSpeakerParticipants({\n participants: remoteParticipants?.filter((p) => p.videoStream?.isAvailable) ?? [],\n dominantSpeakers,\n lastVisibleParticipants: visibleVideoParticipants.current,\n maxDominantSpeakers: maxRemoteVideoStreams\n }).slice(0, maxRemoteVideoStreams);\n\n const visibleVideoParticipantsSet = new Set(visibleVideoParticipants.current.map((p) => p.userId));\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const callingParticipants = remoteParticipants.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\n visibleAudioParticipants.current = smartDominantSpeakerParticipants({\n participants:\n remoteParticipants?.filter(\n (p) =>\n !visibleVideoParticipantsSet.has(p.userId) &&\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !callingParticipantsSet.has(\n p.userId\n )\n ) ?? [],\n dominantSpeakers,\n lastVisibleParticipants: visibleAudioParticipants.current,\n maxDominantSpeakers: maxAudioDominantSpeakers\n });\n\n const getGridParticipants = useCallback((): VideoGalleryRemoteParticipant[] => {\n if (isScreenShareActive) {\n return [];\n }\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return visibleVideoParticipants.current.length > 0\n ? visibleVideoParticipants.current\n : visibleAudioParticipants.current.concat(callingParticipants);\n return visibleVideoParticipants.current.length > 0\n ? visibleVideoParticipants.current\n : visibleAudioParticipants.current;\n }, [\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,\n isScreenShareActive\n ]);\n\n const gridParticipants = getGridParticipants();\n\n const getHorizontalGalleryRemoteParticipants = useCallback((): VideoGalleryRemoteParticipant[] => {\n if (isScreenShareActive) {\n // If screen sharing is active, assign video and audio participants as horizontal gallery participants\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return visibleVideoParticipants.current.concat(visibleAudioParticipants.current.concat(callingParticipants));\n return visibleVideoParticipants.current.concat(visibleAudioParticipants.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 /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return visibleVideoParticipants.current.length > 0\n ? visibleAudioParticipants.current.concat(callingParticipants)\n : [];\n return visibleVideoParticipants.current.length > 0 ? visibleAudioParticipants.current : [];\n }\n }, [\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,\n isScreenShareActive\n ]);\n\n const horizontalGalleryParticipants = getHorizontalGalleryRemoteParticipants();\n\n return { gridParticipants, horizontalGalleryParticipants };\n};\n\n/* @conditional-compile-remove(pinned-participants) */\nconst _useOrganizedParticipantsWithPinnedParticipants = (\n props: OrganizedParticipantsArgs\n): 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 // count pinned participants with video\n let pinnedParticipantsWithVideoOnCount = 0;\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 if (pinnedParticipant.videoStream?.isAvailable) {\n pinnedParticipantsWithVideoOnCount++;\n }\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\n const useOrganizedParticipantsProps = {\n ...props,\n // if there are pinned participants then we should only consider unpinned participants\n remoteParticipants: unpinnedParticipants,\n // if there is a maximum of remote video streams we need to subtract pinned participants with video\n maxRemoteVideoStreams: props.maxRemoteVideoStreams\n ? props.maxRemoteVideoStreams - pinnedParticipantsWithVideoOnCount\n : undefined\n };\n\n const useOrganizedParticipantsResult = _useOrganizedParticipants(useOrganizedParticipantsProps);\n\n if (pinnedParticipants.length === 0) {\n return useOrganizedParticipantsResult;\n }\n\n return {\n gridParticipants: props.isScreenShareActive ? [] : pinnedParticipants,\n horizontalGalleryParticipants: props.isScreenShareActive\n ? pinnedParticipants.concat(useOrganizedParticipantsResult.horizontalGalleryParticipants)\n : useOrganizedParticipantsResult.gridParticipants.concat(\n useOrganizedParticipantsResult.horizontalGalleryParticipants\n )\n };\n};\n\n/**\n * Hook to determine which participants should be in grid and horizontal 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};\n"]}
@@ -14,6 +14,18 @@ export declare const DEFAULT_MAX_REMOTE_VIDEO_STREAMS = 4;
14
14
  * Set aside only 6 dominant speakers for remaining audio participants
15
15
  */
16
16
  export declare const MAX_AUDIO_DOMINANT_SPEAKERS = 6;
17
+ /**
18
+ * @private
19
+ * Default remote video tile menu options
20
+ */
21
+ export declare const DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS: {
22
+ kind: string;
23
+ };
24
+ /**
25
+ * @private
26
+ * Maximum number of remote video tiles that can be pinned
27
+ */
28
+ export declare const MAX_PINNED_REMOTE_VIDEO_TILES = 4;
17
29
  /**
18
30
  * All strings that may be shown on the UI in the {@link VideoGallery}.
19
31
  *
@@ -34,6 +46,14 @@ export interface VideoGalleryStrings {
34
46
  localVideoSelectedDescription: string;
35
47
  /** placeholder text for participants who does not have a display name*/
36
48
  displayNamePlaceholder: string;
49
+ /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fit in frame */
50
+ fitRemoteParticipantToFrame: string;
51
+ /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fill the frame */
52
+ fillRemoteParticipantFrame: string;
53
+ /** Menu text shown in Video Tile contextual menu for pinning a remote participant's video tile */
54
+ pinParticipantForMe: string;
55
+ /** Menu text shown in Video Tile contextual menu for setting a remote participant's video tile */
56
+ unpinParticipantForMe: string;
37
57
  }
38
58
  /**
39
59
  * @public
@@ -112,6 +132,52 @@ export interface VideoGalleryProps {
112
132
  * Camera control information for button to switch cameras.
113
133
  */
114
134
  localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;
135
+ /**
136
+ * List of pinned participant userIds.
137
+ */
138
+ pinnedParticipants?: string[];
139
+ /**
140
+ * This callback will be called when a participant video tile is pinned.
141
+ */
142
+ onPinParticipant?: (userId: string) => void;
143
+ /**
144
+ * This callback will be called when a participant video tile is un-pinned.
145
+ */
146
+ onUnpinParticipant?: (userId: string) => void;
147
+ /**
148
+ * Options for showing the remote video tile menu.
149
+ *
150
+ * @defaultValue \{ kind: 'contextual' \}
151
+ */
152
+ remoteVideoTileMenuOptions?: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps;
153
+ }
154
+ /**
155
+ * Properties for showing contextual menu for remote {@link VideoTile} components in {@link VideoGallery}.
156
+ *
157
+ * @beta
158
+ */
159
+ export interface VideoTileContextualMenuProps {
160
+ /**
161
+ * The menu property kind
162
+ */
163
+ kind: 'contextual';
164
+ }
165
+ /**
166
+ * Properties for showing drawer menu on remote {@link VideoTile} long touch in {@link VideoGallery}.
167
+ *
168
+ * @beta
169
+ */
170
+ export interface VideoTileDrawerMenuProps {
171
+ /**
172
+ * The menu property kind
173
+ */
174
+ kind: 'drawer';
175
+ /**
176
+ * The optional id property provided on an element that the drawer menu should render within when a
177
+ * remote participant video tile Drawer is shown. If an id is not provided, then a drawer menu will
178
+ * render within the VideoGallery component.
179
+ */
180
+ hostId?: string;
115
181
  }
116
182
  /**
117
183
  * VideoGallery represents a layout of video tiles for a specific call.