@azure/communication-react 1.5.1-beta.1 → 1.5.1-beta.2

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 (253) hide show
  1. package/CHANGELOG.beta.md +76 -1
  2. package/CHANGELOG.json +621 -0
  3. package/dist/communication-react.d.ts +217 -7
  4. package/dist/dist-cjs/communication-react/index.js +2207 -1184
  5. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  8. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  10. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +4 -0
  11. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +37 -1
  12. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  13. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +22 -1
  14. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  15. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +14 -0
  16. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +44 -0
  17. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  18. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
  19. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +21 -0
  20. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  21. package/dist/dist-esm/calling-stateful-client/src/Converter.js +1 -0
  22. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  23. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.d.ts +13 -1
  24. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +8 -1
  25. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
  26. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +4 -0
  27. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +28 -0
  28. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
  29. package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.d.ts +29 -0
  30. package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js +54 -0
  31. package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js.map +1 -0
  32. package/dist/dist-esm/calling-stateful-client/src/Logger.d.ts +16 -29
  33. package/dist/dist-esm/calling-stateful-client/src/Logger.js +16 -29
  34. package/dist/dist-esm/calling-stateful-client/src/Logger.js.map +1 -1
  35. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  37. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +137 -370
  38. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.d.ts +17 -0
  40. package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.js +198 -0
  41. package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.js.map +1 -0
  42. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
  43. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  44. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +1 -1
  45. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  46. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +10 -2
  47. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  48. package/dist/dist-esm/communication-react/src/index.d.ts +2 -0
  49. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  50. package/dist/dist-esm/react-components/src/components/CameraButton.d.ts +16 -0
  51. package/dist/dist-esm/react-components/src/components/CameraButton.js +38 -1
  52. package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
  53. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +30 -0
  54. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +47 -0
  55. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -0
  56. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +6 -1
  57. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/components/ControlBarButton.js +1 -1
  59. package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts +1 -1
  61. package/dist/dist-esm/react-components/src/components/DevicesButton.js +79 -55
  62. package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
  63. package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +4 -0
  64. package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
  65. package/dist/dist-esm/react-components/src/components/HorizontalGallery.d.ts +4 -0
  66. package/dist/dist-esm/react-components/src/components/HorizontalGallery.js +29 -24
  67. package/dist/dist-esm/react-components/src/components/HorizontalGallery.js.map +1 -1
  68. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +2 -2
  69. package/dist/dist-esm/react-components/src/components/MessageThread.js +24 -11
  70. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  71. package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +12 -0
  72. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +29 -1
  73. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
  74. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +1 -1
  75. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  76. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -1
  77. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  78. package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.d.ts +4 -2
  79. package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js +6 -42
  80. package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js.map +1 -1
  81. package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.d.ts +35 -0
  82. package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js +32 -0
  83. package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js.map +1 -0
  84. package/dist/dist-esm/react-components/src/components/SendBox.js +5 -2
  85. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/components/VerticalGallery.d.ts +67 -0
  87. package/dist/dist-esm/react-components/src/components/VerticalGallery.js +113 -0
  88. package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -0
  89. package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.d.ts +21 -0
  90. package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.js +65 -0
  91. package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.js.map +1 -0
  92. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +75 -0
  93. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +44 -0
  94. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -0
  95. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +88 -0
  96. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +80 -0
  97. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -0
  98. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +1 -1
  99. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +55 -19
  100. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
  101. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.d.ts +10 -3
  102. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +11 -9
  103. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -1
  104. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +1 -1
  105. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +81 -24
  106. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +11 -1
  108. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
  109. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.d.ts +21 -0
  110. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +63 -0
  111. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -0
  112. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +2 -1
  113. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +8 -2
  114. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +1 -1
  115. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +32 -7
  116. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +28 -12
  117. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
  118. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js +2 -2
  119. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js.map +1 -1
  120. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.d.ts +4 -1
  121. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +8 -7
  122. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -1
  123. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.d.ts +64 -0
  124. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js +79 -0
  125. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js.map +1 -0
  126. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.d.ts +25 -0
  127. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.js +94 -0
  128. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.js.map +1 -0
  129. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +4 -4
  130. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +58 -49
  131. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +25 -0
  133. package/dist/dist-esm/react-components/src/components/VideoGallery.js +32 -4
  134. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  135. package/dist/dist-esm/react-components/src/components/VideoTile.js +9 -12
  136. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  137. package/dist/dist-esm/react-components/src/components/index.d.ts +8 -0
  138. package/dist/dist-esm/react-components/src/components/index.js +4 -0
  139. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  140. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.d.ts +13 -0
  141. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js +35 -0
  142. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js.map +1 -0
  143. package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js +1 -0
  144. package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js.map +1 -1
  145. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +2 -2
  146. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +30 -2
  147. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  148. package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.d.ts +32 -0
  149. package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.js +66 -0
  150. package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.js.map +1 -0
  151. package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.d.ts +11 -0
  152. package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.js +22 -0
  153. package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.js.map +1 -0
  154. package/dist/dist-esm/react-components/src/components/utils/responsive.d.ts +6 -0
  155. package/dist/dist-esm/react-components/src/components/utils/responsive.js +7 -0
  156. package/dist/dist-esm/react-components/src/components/utils/responsive.js.map +1 -1
  157. package/dist/dist-esm/react-components/src/components/utils.d.ts +5 -0
  158. package/dist/dist-esm/react-components/src/components/utils.js +20 -0
  159. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  160. package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js +6 -14
  161. package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js.map +1 -1
  162. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +10 -4
  163. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +7 -2
  164. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  165. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +5 -0
  166. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  167. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +14 -3
  168. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +14 -3
  169. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +14 -3
  170. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +14 -3
  171. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +14 -3
  172. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +14 -3
  173. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +14 -3
  174. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +14 -3
  175. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +14 -3
  176. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +14 -3
  177. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +14 -3
  178. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +14 -3
  179. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +14 -3
  180. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +14 -3
  181. package/dist/dist-esm/react-components/src/theming/icons.d.ts +7 -0
  182. package/dist/dist-esm/react-components/src/theming/icons.js +19 -7
  183. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  184. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  185. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +4 -0
  186. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +27 -2
  187. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  188. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +42 -0
  189. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  190. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +8 -2
  191. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  192. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +1 -1
  193. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  194. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +21 -3
  195. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  196. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +1 -1
  197. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
  198. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.d.ts +5 -4
  199. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +3 -1
  200. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  201. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -5
  202. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +1 -31
  203. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
  204. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +12 -0
  205. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  206. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -0
  207. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  208. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +1 -1
  209. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  210. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +1 -1
  211. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +3 -3
  212. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
  213. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +11 -1
  214. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  215. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +1 -0
  216. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +12 -8
  217. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
  218. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.d.ts +16 -3
  219. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js +49 -43
  220. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +1 -1
  221. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +4 -0
  222. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +24 -0
  223. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  224. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +19 -0
  225. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  226. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +4 -0
  227. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +18 -0
  228. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  229. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.d.ts +2 -0
  230. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +47 -26
  231. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +1 -1
  232. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js +4 -4
  233. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +1 -1
  234. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +1 -1
  235. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +5 -3
  236. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  237. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +16 -1
  238. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  239. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -1
  240. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +11 -0
  242. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +19 -0
  243. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -0
  244. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +7 -0
  245. package/dist/dist-esm/react-composites/src/composites/common/icons.js +4 -4
  246. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.d.ts +7 -0
  248. package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.js +9 -0
  249. package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.js.map +1 -0
  250. package/package.json +12 -12
  251. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.d.ts +0 -14
  252. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +0 -19
  253. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +0 -1
@@ -9,6 +9,7 @@ import React, { useMemo, useRef } from 'react';
9
9
  import { useCallback } from 'react';
10
10
  import { containerDivStyles } from '../../common/ContainerRectProps';
11
11
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
12
+ import { compositeMinWidthRem } from '../../common/styles/Composite.styles';
12
13
  import { useAdapter } from '../adapter/CallAdapterProvider';
13
14
  import { CallControls } from '../components/CallControls';
14
15
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
@@ -38,8 +39,13 @@ export const CallArrangement = (props) => {
38
39
  const isMobileWithActivePane = props.mobileView && activePane;
39
40
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
40
41
  const callCompositeContainerCSS = useMemo(() => {
41
- return { display: isMobileWithActivePane ? 'none' : 'flex', width: '100%', height: '100%' };
42
- }, [isMobileWithActivePane]);
42
+ return {
43
+ display: isMobileWithActivePane ? 'none' : 'flex',
44
+ minWidth: props.mobileView ? 'unset' : `${compositeMinWidthRem}rem`,
45
+ width: '100%',
46
+ height: '100%'
47
+ };
48
+ }, [isMobileWithActivePane, props.mobileView]);
43
49
  // To be removed once feature is out of beta, replace with callCompositeContainerCSS
44
50
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
45
51
  const callCompositeContainerFlex = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"CallArrangement.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites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C1B,mDAAmD;wBACnD,mBAAmB,EAAE,UAAU,KAAK,QAAQ;wBAC5C,mDAAmD;wBACnD,qBAAqB,EAAE,gBAAgB,IACvC,CACS,CACd;gBACH,oBAAC,KAAK,IAAC,UAAU,QAAC,IAAI;oBACpB,oBAAC,KAAK,CAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,0BAA0B,EAAE;wBAClD,oBAAC,KAAK,CAAC,IAAI,IAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,UACxC,KAAK,CAAC,sBAAsB,IAAI,CAC/B,oBAAC,KAAK,IAAC,YAAY,QAAC,MAAM,EAAE,2BAA2B,IACpD,KAAK,CAAC,sBAAsB,EAAE,CACzB,CACT,CACU,CACF;oBAEX,2FAA2F;oBAC3F,eAAe,EAAE,CAEb,CACF,CACF,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,2FAA2F;AAC3F,MAAM,6BAA6B,GAAG,CAAC,YAA2C,EAAW,EAAE;IAC7F,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE;QACvD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,kBAAkB,KAAK,KAAK,CAAC;AACnD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport {\n _ComplianceBanner,\n _ComplianceBannerProps,\n _useContainerHeight,\n _useContainerWidth,\n ErrorBar,\n ErrorBarProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo, useRef } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useCallback } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { containerDivStyles } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallControls, CallControlsProps } from '../components/CallControls';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useSidePaneState } from '../hooks/useSidePaneState';\nimport {\n callArrangementContainerStyles,\n callControlsContainerStyles,\n notificationsContainerStyles,\n containerStyleDesktop,\n containerStyleMobile,\n mediaGalleryContainerStyles,\n galleryParentContainerStyles,\n bannerNotificationStyles\n} from '../styles/CallPage.styles';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallControlOptions } from '../types/CallControlOptions';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallPane } from './CallPane';\nimport { MutedNotification, MutedNotificationProps } from './MutedNotification';\n\n/**\n * @private\n */\nexport interface CallArrangementProps {\n id?: string;\n complianceBannerProps: _ComplianceBannerProps;\n errorBarProps: ErrorBarProps | false;\n mutedNotificationProps?: MutedNotificationProps;\n callControlProps: CallControlsProps;\n onRenderGalleryContent: () => JSX.Element;\n dataUiId: string;\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n}\n\n/**\n * @private\n */\nexport const CallArrangement = (props: CallArrangementProps): JSX.Element => {\n const containerClassName = useMemo(() => {\n return props.mobileView ? containerStyleMobile : containerStyleDesktop;\n }, [props.mobileView]);\n\n const theme = useTheme();\n const callGalleryStyles = useMemo(\n () => galleryParentContainerStyles(theme.palette.neutralLighterAlt),\n [theme.palette.neutralLighterAlt]\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const { activePane, closePane, openPeoplePane, togglePeoplePane } = useSidePaneState();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const isMobileWithActivePane = props.mobileView && activePane;\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callCompositeContainerCSS = useMemo(() => {\n return { display: isMobileWithActivePane ? 'none' : 'flex', width: '100%', height: '100%' };\n }, [isMobileWithActivePane]);\n\n // To be removed once feature is out of beta, replace with callCompositeContainerCSS\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const callCompositeContainerFlex = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return callCompositeContainerCSS;\n return { display: 'flex', width: '100%', height: '100%' };\n };\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callPaneContent = useCallback((): JSX.Element => {\n if (adapter && activePane === 'people') {\n return (\n <CallPane\n callAdapter={adapter}\n onClose={closePane}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.callControlProps?.onFetchParticipantMenuItems}\n onPeopleButtonClicked={\n showShowPeopleTabHeaderButton(props.callControlProps.options) ? openPeoplePane : undefined\n }\n callControls={\n typeof props.callControlProps.options !== 'boolean' ? props.callControlProps.options : undefined\n }\n modalLayerHostId={props.modalLayerHostId}\n activePane={activePane}\n mobileView={props.mobileView}\n inviteLink={props.callControlProps.callInvitationURL}\n />\n );\n }\n return <></>;\n }, [\n activePane,\n adapter,\n closePane,\n props.callControlProps.callInvitationURL,\n props.callControlProps?.onFetchParticipantMenuItems,\n props.callControlProps.options,\n props.mobileView,\n props.modalLayerHostId,\n props.onFetchAvatarPersonaData,\n openPeoplePane\n ]);\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let canUnmute = true;\n /* @conditional-compile-remove(rooms) */\n canUnmute = rolePermissions.microphoneButton;\n\n let errorBarProps = props.errorBarProps;\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (!rolePermissions.cameraButton && props.errorBarProps) {\n errorBarProps = {\n ...props.errorBarProps,\n activeErrorMessages: props.errorBarProps.activeErrorMessages.filter(\n (e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari'\n )\n };\n }\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)} id={props.id}>\n <Stack verticalFill horizontalAlign=\"stretch\" className={containerClassName} data-ui-id={props.dataUiId}>\n <Stack grow styles={callArrangementContainerStyles}>\n <Stack.Item styles={notificationsContainerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <_ComplianceBanner {...props.complianceBannerProps} />\n </Stack>\n {errorBarProps !== false && (\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...errorBarProps} />\n </Stack>\n )}\n {canUnmute && !!props.mutedNotificationProps && <MutedNotification {...props.mutedNotificationProps} />}\n </Stack.Item>\n {props.callControlProps?.options !== false &&\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n !isMobileWithActivePane && (\n <Stack.Item className={callControlsContainerStyles}>\n <CallControls\n {...props.callControlProps}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n isMobile={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked={activePane === 'people'}\n /* @conditional-compile-remove(one-to-n-calling) */\n onPeopleButtonClicked={togglePeoplePane}\n />\n </Stack.Item>\n )}\n <Stack horizontal grow>\n <Stack.Item grow style={callCompositeContainerFlex()}>\n <Stack.Item styles={callGalleryStyles} grow>\n {props.onRenderGalleryContent && (\n <Stack verticalFill styles={mediaGalleryContainerStyles}>\n {props.onRenderGalleryContent()}\n </Stack>\n )}\n </Stack.Item>\n </Stack.Item>\n {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n callPaneContent()\n }\n </Stack>\n </Stack>\n </Stack>\n </div>\n );\n};\n\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.participantsButton !== false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallArrangement.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallArrangement.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EAER,QAAQ,EACT,4CAAmC;AACpC,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/C,2FAA2F;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,2FAA2F;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAqB,MAAM,4BAA4B,CAAC;AAC7E,2FAA2F;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAA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C;AAEF,2FAA2F;AAC3F,MAAM,6BAA6B,GAAG,CAAC,YAA2C,EAAW,EAAE;IAC7F,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE;QACvD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,kBAAkB,KAAK,KAAK,CAAC;AACnD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport {\n _ComplianceBanner,\n _ComplianceBannerProps,\n _useContainerHeight,\n _useContainerWidth,\n ErrorBar,\n ErrorBarProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo, useRef } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useCallback } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { containerDivStyles } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { compositeMinWidthRem } from '../../common/styles/Composite.styles';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallControls, CallControlsProps } from '../components/CallControls';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useSidePaneState } from '../hooks/useSidePaneState';\nimport {\n callArrangementContainerStyles,\n callControlsContainerStyles,\n notificationsContainerStyles,\n containerStyleDesktop,\n containerStyleMobile,\n mediaGalleryContainerStyles,\n galleryParentContainerStyles,\n bannerNotificationStyles\n} from '../styles/CallPage.styles';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallControlOptions } from '../types/CallControlOptions';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallPane } from './CallPane';\nimport { MutedNotification, MutedNotificationProps } from './MutedNotification';\n\n/**\n * @private\n */\nexport interface CallArrangementProps {\n id?: string;\n complianceBannerProps: _ComplianceBannerProps;\n errorBarProps: ErrorBarProps | false;\n mutedNotificationProps?: MutedNotificationProps;\n callControlProps: CallControlsProps;\n onRenderGalleryContent: () => JSX.Element;\n dataUiId: string;\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n}\n\n/**\n * @private\n */\nexport const CallArrangement = (props: CallArrangementProps): JSX.Element => {\n const containerClassName = useMemo(() => {\n return props.mobileView ? containerStyleMobile : containerStyleDesktop;\n }, [props.mobileView]);\n\n const theme = useTheme();\n const callGalleryStyles = useMemo(\n () => galleryParentContainerStyles(theme.palette.neutralLighterAlt),\n [theme.palette.neutralLighterAlt]\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const { activePane, closePane, openPeoplePane, togglePeoplePane } = useSidePaneState();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const isMobileWithActivePane = props.mobileView && activePane;\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callCompositeContainerCSS = useMemo(() => {\n return {\n display: isMobileWithActivePane ? 'none' : 'flex',\n minWidth: props.mobileView ? 'unset' : `${compositeMinWidthRem}rem`,\n width: '100%',\n height: '100%'\n };\n }, [isMobileWithActivePane, props.mobileView]);\n\n // To be removed once feature is out of beta, replace with callCompositeContainerCSS\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const callCompositeContainerFlex = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return callCompositeContainerCSS;\n return { display: 'flex', width: '100%', height: '100%' };\n };\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callPaneContent = useCallback((): JSX.Element => {\n if (adapter && activePane === 'people') {\n return (\n <CallPane\n callAdapter={adapter}\n onClose={closePane}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.callControlProps?.onFetchParticipantMenuItems}\n onPeopleButtonClicked={\n showShowPeopleTabHeaderButton(props.callControlProps.options) ? openPeoplePane : undefined\n }\n callControls={\n typeof props.callControlProps.options !== 'boolean' ? props.callControlProps.options : undefined\n }\n modalLayerHostId={props.modalLayerHostId}\n activePane={activePane}\n mobileView={props.mobileView}\n inviteLink={props.callControlProps.callInvitationURL}\n />\n );\n }\n return <></>;\n }, [\n activePane,\n adapter,\n closePane,\n props.callControlProps.callInvitationURL,\n props.callControlProps?.onFetchParticipantMenuItems,\n props.callControlProps.options,\n props.mobileView,\n props.modalLayerHostId,\n props.onFetchAvatarPersonaData,\n openPeoplePane\n ]);\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let canUnmute = true;\n /* @conditional-compile-remove(rooms) */\n canUnmute = rolePermissions.microphoneButton;\n\n let errorBarProps = props.errorBarProps;\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (!rolePermissions.cameraButton && props.errorBarProps) {\n errorBarProps = {\n ...props.errorBarProps,\n activeErrorMessages: props.errorBarProps.activeErrorMessages.filter(\n (e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari'\n )\n };\n }\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)} id={props.id}>\n <Stack verticalFill horizontalAlign=\"stretch\" className={containerClassName} data-ui-id={props.dataUiId}>\n <Stack grow styles={callArrangementContainerStyles}>\n <Stack.Item styles={notificationsContainerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <_ComplianceBanner {...props.complianceBannerProps} />\n </Stack>\n {errorBarProps !== false && (\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...errorBarProps} />\n </Stack>\n )}\n {canUnmute && !!props.mutedNotificationProps && <MutedNotification {...props.mutedNotificationProps} />}\n </Stack.Item>\n {props.callControlProps?.options !== false &&\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n !isMobileWithActivePane && (\n <Stack.Item className={callControlsContainerStyles}>\n <CallControls\n {...props.callControlProps}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n isMobile={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked={activePane === 'people'}\n /* @conditional-compile-remove(one-to-n-calling) */\n onPeopleButtonClicked={togglePeoplePane}\n />\n </Stack.Item>\n )}\n <Stack horizontal grow>\n <Stack.Item grow style={callCompositeContainerFlex()}>\n <Stack.Item styles={callGalleryStyles} grow>\n {props.onRenderGalleryContent && (\n <Stack verticalFill styles={mediaGalleryContainerStyles}>\n {props.onRenderGalleryContent()}\n </Stack>\n )}\n </Stack.Item>\n </Stack.Item>\n {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n callPaneContent()\n }\n </Stack>\n </Stack>\n </Stack>\n </div>\n );\n};\n\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.participantsButton !== false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
@@ -150,7 +150,7 @@ export const CallControls = (props) => {
150
150
  /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
151
151
  !props.isMobile && (React.createElement(Participants, { option: options === null || options === void 0 ? void 0 : options.participantsButton, callInvitationURL: props.callInvitationURL, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, isMobile: props.isMobile, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.participantsButton) })) && (
152
152
  /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
153
- React.createElement(People, { checked: props.peopleButtonChecked, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "call-composite-people-button", strings: peopleButtonStrings, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.participantsButton) })),
153
+ React.createElement(People, { checked: props.peopleButtonChecked, ariaLabel: peopleButtonStrings === null || peopleButtonStrings === void 0 ? void 0 : peopleButtonStrings.label, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "call-composite-people-button", strings: peopleButtonStrings, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.participantsButton) })),
154
154
  isEnabled(options === null || options === void 0 ? void 0 : options.devicesButton) && (React.createElement(Devices, { displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.devicesButton) })),
155
155
  /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
156
156
  isEnabled(options === null || options === void 0 ? void 0 : options.moreButton) && moreButtonContextualMenuItems().length > 0 && (React.createElement(MoreButton, { strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems() }, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact' })),
@@ -1 +1 @@
1
- {"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallControls.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGnE,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAgC,4CAAmC;AACtF,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,UAAU,EAAE,4CAAmC;AACxD,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,+DAA+D;AAC/D,OAAO,EAAE,+BAA+B,EAAE,kCAAkC,EAAE,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,2FAA2F;AAC3F,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,2FAA2F;AAC3F,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,sBAA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O,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,MAAK,SAAS,GAC7C,CACH;gBAE8D,aAAa,CAAC,SAAS,CAAC;gBACxF,SAAS,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC,IAAI,oBAAC,OAAO,IAAC,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,GAAI,CACzE,CACF,CACP,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC;AAEjE,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAY,EAAE;IACjD,wCAAwC;IACxC,MAAM,eAAe,GAAG,eAAe,EAAE,CAAC;IAC1C,wCAAwC;IACxC,OAAO,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC;IAE9B,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { memoizeFunction, Stack, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { IContextualMenuItem } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useState } from 'react';\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBar, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { Camera } from './buttons/Camera';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { generateCustomControlBarButtons, onFetchCustomButtonPropsTrampoline } from './buttons/Custom';\nimport { Devices } from './buttons/Devices';\nimport { EndCall } from './buttons/EndCall';\nimport { Microphone } from './buttons/Microphone';\nimport { Participants } from './buttons/Participants';\nimport { ScreenShare } from './buttons/ScreenShare';\nimport { ContainerRectProps } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { People } from './buttons/People';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { MoreButton } from '../../common/MoreButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { usePropsFor } from '../hooks/usePropsFor';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\n\n/**\n * @private\n */\nexport type CallControlsProps = {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n peopleButtonChecked?: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onPeopleButtonClicked?: () => void;\n callInvitationURL?: string;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: boolean | CallControlOptions;\n /**\n * Option to increase the height of the button flyout menu items from 36px to 48px.\n * Recommended for mobile devices.\n */\n increaseFlyoutItemSize?: boolean;\n isMobile?: boolean;\n};\n\n// Enforce a background color on control bar to ensure it matches the composite background color.\nconst controlBarStyles = memoizeFunction((background: string) => ({ root: { background: background } }));\n\n/**\n * @private\n */\nexport const CallControls = (props: CallControlsProps & ContainerRectProps): JSX.Element => {\n const options = useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const localeStrings = useLocale();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const peopleButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.peopleButtonLabel,\n tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,\n tooltipOnContent: localeStrings.strings.call.peopleButtonTooltipClose\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const moreButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.moreButtonCallingLabel,\n tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const dialpadStrings = useMemo(\n () => ({\n dialpadModalAriaLabel: localeStrings.strings.call.dialpadModalAriaLabel,\n dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel,\n placeholderText: localeStrings.strings.call.dtmfDialpadPlaceholderText\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const holdButtonProps = usePropsFor(HoldButton);\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n const moreButtonContextualMenuItems = (): IContextualMenuItem[] => {\n const items: IContextualMenuItem[] = [];\n\n if (props.isMobile && props.onPeopleButtonClicked && isEnabled(options?.participantsButton)) {\n items.push({\n key: 'peopleButtonKey',\n text: localeStrings.component.strings.participantsButton.label,\n onClick: () => {\n if (props.onPeopleButtonClicked) {\n props.onPeopleButtonClicked();\n }\n },\n iconProps: { iconName: 'ControlButtonParticipantsContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.participantsButton),\n ['data-ui-id']: 'call-composite-more-menu-people-button'\n });\n }\n\n if (!isRoomsCallTrampoline()) {\n items.push({\n key: 'holdButtonKey',\n text: localeStrings.component.strings.holdButton.tooltipOffContent,\n onClick: () => {\n holdButtonProps.onToggleHold();\n },\n iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.holdButton),\n ['data-ui-id']: 'hold-button'\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n // dtmf tone sending only works for 1:1 PSTN call\n if (alternateCallerId) {\n items.push({\n key: 'showDialpadKey',\n text: localeStrings.strings.call.openDtmfDialpadLabel,\n onClick: () => {\n setShowDialpad(true);\n },\n iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n }\n });\n }\n\n return items;\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDialpad, setShowDialpad] = useState(false);\n\n const theme = useTheme();\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n const customButtons = useMemo(\n () => generateCustomControlBarButtons(onFetchCustomButtonPropsTrampoline(options), options?.displayType),\n [options]\n );\n\n // when props.options is false then we want to hide the whole control bar.\n if (props.options === false) {\n return <></>;\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n /* @conditional-compile-remove(rooms) */\n screenShareButtonIsEnabled = rolePermissions.screenShare && screenShareButtonIsEnabled;\n\n let microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n /* @conditional-compile-remove(rooms) */\n microphoneButtonIsEnabled = rolePermissions.microphoneButton && microphoneButtonIsEnabled;\n\n let cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n /* @conditional-compile-remove(rooms) */\n cameraButtonIsEnabled = rolePermissions.cameraButton && cameraButtonIsEnabled;\n\n return (\n <Stack horizontalAlign=\"center\">\n {\n /* @conditional-compile-remove(PSTN-calls) */\n <SendDtmfDialpad\n isMobile={!!props.isMobile}\n strings={dialpadStrings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n />\n }\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <ControlBar layout=\"horizontal\" styles={controlBarStyles(theme.semanticColors.bodyBackground)}>\n {microphoneButtonIsEnabled && (\n <Microphone displayType={options?.displayType} disabled={isDisabled(options?.microphoneButton)} />\n )}\n {cameraButtonIsEnabled && (\n <Camera displayType={options?.displayType} disabled={isDisabled(options?.cameraButton)} />\n )}\n {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options?.screenShareButton}\n displayType={options?.displayType}\n disabled={isDisabled(options?.screenShareButton)}\n />\n )}\n {isEnabled(options?.participantsButton) &&\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n !props.isMobile && (\n <Participants\n option={options?.participantsButton}\n callInvitationURL={props.callInvitationURL}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n isMobile={props.isMobile}\n disabled={isDisabled(options?.participantsButton)}\n />\n ) && (\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n <People\n checked={props.peopleButtonChecked}\n showLabel={options?.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"call-composite-people-button\"\n strings={peopleButtonStrings}\n disabled={isDisabled(options?.participantsButton)}\n />\n )}\n {isEnabled(options?.devicesButton) && (\n <Devices\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n disabled={isDisabled(options?.devicesButton)}\n />\n )}\n {\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n isEnabled(options?.moreButton) && moreButtonContextualMenuItems().length > 0 && (\n <MoreButton\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{ items: moreButtonContextualMenuItems() }}\n showLabel={options?.displayType !== 'compact'}\n />\n )\n }\n {/* @conditional-compile-remove(control-bar-button-injection) */ customButtons['primary']}\n {isEnabled(options?.endCallButton) && <EndCall displayType={options?.displayType} />}\n </ControlBar>\n </Stack.Item>\n </Stack>\n );\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\n/** @private */\nexport const isRoomsCallTrampoline = (): boolean => {\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n /* @conditional-compile-remove(rooms) */\n return !!rolePermissions.role;\n\n return false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallControls.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGnE,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAgC,4CAAmC;AACtF,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,UAAU,EAAE,4CAAmC;AACxD,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM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IACxC,OAAO,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC;IAE9B,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { memoizeFunction, Stack, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { IContextualMenuItem } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useState } from 'react';\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBar, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { Camera } from './buttons/Camera';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { generateCustomControlBarButtons, onFetchCustomButtonPropsTrampoline } from './buttons/Custom';\nimport { Devices } from './buttons/Devices';\nimport { EndCall } from './buttons/EndCall';\nimport { Microphone } from './buttons/Microphone';\nimport { Participants } from './buttons/Participants';\nimport { ScreenShare } from './buttons/ScreenShare';\nimport { ContainerRectProps } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { People } from './buttons/People';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { MoreButton } from '../../common/MoreButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { usePropsFor } from '../hooks/usePropsFor';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\n\n/**\n * @private\n */\nexport type CallControlsProps = {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n peopleButtonChecked?: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onPeopleButtonClicked?: () => void;\n callInvitationURL?: string;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: boolean | CallControlOptions;\n /**\n * Option to increase the height of the button flyout menu items from 36px to 48px.\n * Recommended for mobile devices.\n */\n increaseFlyoutItemSize?: boolean;\n isMobile?: boolean;\n};\n\n// Enforce a background color on control bar to ensure it matches the composite background color.\nconst controlBarStyles = memoizeFunction((background: string) => ({ root: { background: background } }));\n\n/**\n * @private\n */\nexport const CallControls = (props: CallControlsProps & ContainerRectProps): JSX.Element => {\n const options = useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const localeStrings = useLocale();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const peopleButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.peopleButtonLabel,\n tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,\n tooltipOnContent: localeStrings.strings.call.peopleButtonTooltipClose\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const moreButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.moreButtonCallingLabel,\n tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const dialpadStrings = useMemo(\n () => ({\n dialpadModalAriaLabel: localeStrings.strings.call.dialpadModalAriaLabel,\n dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel,\n placeholderText: localeStrings.strings.call.dtmfDialpadPlaceholderText\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const holdButtonProps = usePropsFor(HoldButton);\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n const moreButtonContextualMenuItems = (): IContextualMenuItem[] => {\n const items: IContextualMenuItem[] = [];\n\n if (props.isMobile && props.onPeopleButtonClicked && isEnabled(options?.participantsButton)) {\n items.push({\n key: 'peopleButtonKey',\n text: localeStrings.component.strings.participantsButton.label,\n onClick: () => {\n if (props.onPeopleButtonClicked) {\n props.onPeopleButtonClicked();\n }\n },\n iconProps: { iconName: 'ControlButtonParticipantsContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.participantsButton),\n ['data-ui-id']: 'call-composite-more-menu-people-button'\n });\n }\n\n if (!isRoomsCallTrampoline()) {\n items.push({\n key: 'holdButtonKey',\n text: localeStrings.component.strings.holdButton.tooltipOffContent,\n onClick: () => {\n holdButtonProps.onToggleHold();\n },\n iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.holdButton),\n ['data-ui-id']: 'hold-button'\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n // dtmf tone sending only works for 1:1 PSTN call\n if (alternateCallerId) {\n items.push({\n key: 'showDialpadKey',\n text: localeStrings.strings.call.openDtmfDialpadLabel,\n onClick: () => {\n setShowDialpad(true);\n },\n iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n }\n });\n }\n\n return items;\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDialpad, setShowDialpad] = useState(false);\n\n const theme = useTheme();\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n const customButtons = useMemo(\n () => generateCustomControlBarButtons(onFetchCustomButtonPropsTrampoline(options), options?.displayType),\n [options]\n );\n\n // when props.options is false then we want to hide the whole control bar.\n if (props.options === false) {\n return <></>;\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n /* @conditional-compile-remove(rooms) */\n screenShareButtonIsEnabled = rolePermissions.screenShare && screenShareButtonIsEnabled;\n\n let microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n /* @conditional-compile-remove(rooms) */\n microphoneButtonIsEnabled = rolePermissions.microphoneButton && microphoneButtonIsEnabled;\n\n let cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n /* @conditional-compile-remove(rooms) */\n cameraButtonIsEnabled = rolePermissions.cameraButton && cameraButtonIsEnabled;\n\n return (\n <Stack horizontalAlign=\"center\">\n {\n /* @conditional-compile-remove(PSTN-calls) */\n <SendDtmfDialpad\n isMobile={!!props.isMobile}\n strings={dialpadStrings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n />\n }\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <ControlBar layout=\"horizontal\" styles={controlBarStyles(theme.semanticColors.bodyBackground)}>\n {microphoneButtonIsEnabled && (\n <Microphone displayType={options?.displayType} disabled={isDisabled(options?.microphoneButton)} />\n )}\n {cameraButtonIsEnabled && (\n <Camera displayType={options?.displayType} disabled={isDisabled(options?.cameraButton)} />\n )}\n {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options?.screenShareButton}\n displayType={options?.displayType}\n disabled={isDisabled(options?.screenShareButton)}\n />\n )}\n {isEnabled(options?.participantsButton) &&\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n !props.isMobile && (\n <Participants\n option={options?.participantsButton}\n callInvitationURL={props.callInvitationURL}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n isMobile={props.isMobile}\n disabled={isDisabled(options?.participantsButton)}\n />\n ) && (\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n <People\n checked={props.peopleButtonChecked}\n ariaLabel={peopleButtonStrings?.label}\n showLabel={options?.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"call-composite-people-button\"\n strings={peopleButtonStrings}\n disabled={isDisabled(options?.participantsButton)}\n />\n )}\n {isEnabled(options?.devicesButton) && (\n <Devices\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n disabled={isDisabled(options?.devicesButton)}\n />\n )}\n {\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n isEnabled(options?.moreButton) && moreButtonContextualMenuItems().length > 0 && (\n <MoreButton\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{ items: moreButtonContextualMenuItems() }}\n showLabel={options?.displayType !== 'compact'}\n />\n )\n }\n {/* @conditional-compile-remove(control-bar-button-injection) */ customButtons['primary']}\n {isEnabled(options?.endCallButton) && <EndCall displayType={options?.displayType} />}\n </ControlBar>\n </Stack.Item>\n </Stack>\n );\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\n/** @private */\nexport const isRoomsCallTrampoline = (): boolean => {\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n /* @conditional-compile-remove(rooms) */\n return !!rolePermissions.role;\n\n return false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
@@ -1,7 +1,11 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
4
+ /* @conditional-compile-remove(vertical-gallery) */
5
+ import { useRef } from 'react';
4
6
  import { VideoGallery, Announcer } from "../../../../../react-components/src";
7
+ /* @conditional-compile-remove(vertical-gallery) */
8
+ import { _useContainerWidth, _useContainerHeight } from "../../../../../react-components/src";
5
9
  import { usePropsFor } from '../hooks/usePropsFor';
6
10
  import { AvatarPersona } from '../../common/AvatarPersona';
7
11
  import { mergeStyles, Stack } from '@fluentui/react';
@@ -34,6 +38,12 @@ export const MediaGallery = (props) => {
34
38
  const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);
35
39
  const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);
36
40
  const announcerString = useParticipantChangedAnnouncement();
41
+ /* @conditional-compile-remove(vertical-gallery) */
42
+ const containerRef = useRef(null);
43
+ /* @conditional-compile-remove(vertical-gallery) */
44
+ const containerWidth = _useContainerWidth(containerRef);
45
+ /* @conditional-compile-remove(vertical-gallery) */
46
+ const containerHeight = _useContainerHeight(containerRef);
37
47
  const cameraSwitcherProps = useMemo(() => {
38
48
  return Object.assign(Object.assign({}, cameraSwitcherCallback), cameraSwitcherCameras);
39
49
  }, [cameraSwitcherCallback, cameraSwitcherCameras]);
@@ -52,18 +62,25 @@ export const MediaGallery = (props) => {
52
62
  ? { kind: 'drawer', hostId: props.drawerMenuHostId }
53
63
  : { kind: 'contextual' };
54
64
  }, [(_a = props.remoteVideoTileMenuOptions) === null || _a === void 0 ? void 0 : _a.isHidden, props.isMobile, props.drawerMenuHostId]);
65
+ /* @conditional-compile-remove(vertical-gallery) */
66
+ const overflowGalleryPosition = useMemo(() => containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9
67
+ ? 'VerticalRight'
68
+ : 'HorizontalBottom', [containerWidth, containerHeight]);
55
69
  const VideoGalleryMemoized = useMemo(() => {
56
70
  return (React.createElement(VideoGallery, Object.assign({}, videoGalleryProps, { localVideoViewOptions: localVideoViewOptions, remoteVideoViewOptions: remoteVideoViewOptions, styles: VideoGalleryStyles, layout: "floatingLocalVideo", showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar,
57
71
  /* @conditional-compile-remove(pinned-participants) */
58
- remoteVideoTileMenuOptions: remoteVideoTileMenuOptions })));
72
+ remoteVideoTileMenuOptions: remoteVideoTileMenuOptions,
73
+ /* @conditional-compile-remove(vertical-gallery) */
74
+ overflowGalleryPosition: overflowGalleryPosition })));
59
75
  }, [
60
76
  videoGalleryProps,
61
77
  props.isMobile,
62
78
  onRenderAvatar,
63
79
  cameraSwitcherProps,
64
- /* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions
80
+ /* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions,
81
+ /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition
65
82
  ]);
66
- return (React.createElement(React.Fragment, null,
83
+ return (React.createElement("div", { ref: containerRef, style: mediaGalleryContainerStyles },
67
84
  React.createElement(Announcer, { announcementString: announcerString, ariaLive: 'polite' }),
68
85
  VideoGalleryMemoized));
69
86
  };
@@ -93,4 +110,5 @@ export const useLocalVideoStartTrigger = (isLocalVideoAvailable, shouldTransitio
93
110
  }
94
111
  }, [shouldTransition, isButtonStatusSynced, isPreviewCameraOn, isLocalVideoAvailable, mediaGalleryHandlers]);
95
112
  };
113
+ const mediaGalleryContainerStyles = { width: '100%', height: '100%' };
96
114
  //# sourceMappingURL=MediaGallery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/MediaGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EACL,YAAY,EAIZ,SAAS,EACV,4CAAmC;AAGpC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAA6B,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAC1F,OAAO,EAAE,2BAA2B,EAAE,4CAAmC;AAEzE,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAI/E,MAAM,kBAAkB,GAAG;IACzB,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,OAAO;QAClB,QAAQ,EAAE,MAAM;KACjB;CACF,CAAC;AAEF,MAAM,qBAAqB,GAAG;IAC5B,WAAW,EAAE,MAAM;IACnB,UAAU,EAAE,IAAI;CACK,CAAC;AAExB,MAAM,sBAAsB,GAAG;IAC7B,WAAW,EAAE,MAAM;CACE,CAAC;AAiBxB;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAe,EAAE;;IACpE,MAAM,iBAAiB,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACpD,MAAM,qBAAqB,GAAG,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AI,iBAAiB,IAAI,CAAC,qBAAqB,IAAI,CAAC,oBAAoB,EAAE;gBACxE,oBAAoB,CAAC,iBAAiB,EAAE,CAAC;aAC1C;YACD,uBAAuB,CAAC,IAAI,CAAC,CAAC;SAC/B;IACH,CAAC,EAAE,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAC/G,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n VideoGallery,\n VideoStreamOptions,\n OnRenderAvatarCallback,\n CustomAvatarOptions,\n Announcer\n} from '@internal/react-components';\n/* @conditional-compile-remove(pinned-participants) */\nimport { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from '@internal/react-components';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { AvatarPersona, AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { getIsPreviewCameraOn } from '../selectors/baseSelectors';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { useSelector } from '../hooks/useSelector';\nimport { localVideoCameraCycleButtonSelector } from '../selectors/LocalVideoTileSelector';\nimport { LocalVideoCameraCycleButton } from '@internal/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useParticipantChangedAnnouncement } from '../utils/MediaGalleryUtils';\n/* @conditional-compile-remove(pinned-participants) */\nimport { RemoteVideoTileMenuOptions } from '../CallComposite';\n\nconst VideoGalleryStyles = {\n root: {\n height: '100%',\n minHeight: '10rem', // space affordance to ensure media gallery is never collapsed\n minWidth: '6rem'\n }\n};\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\nconst remoteVideoViewOptions = {\n scalingMode: 'Crop'\n} as VideoStreamOptions;\n\n/**\n * @private\n */\nexport interface MediaGalleryProps {\n isVideoStreamOn?: boolean;\n isMicrophoneChecked?: boolean;\n onStartLocalVideo: () => Promise<void>;\n onRenderAvatar?: OnRenderAvatarCallback;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n isMobile?: boolean;\n drawerMenuHostId?: string;\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;\n}\n\n/**\n * @private\n */\nexport const MediaGallery = (props: MediaGalleryProps): JSX.Element => {\n const videoGalleryProps = usePropsFor(VideoGallery);\n const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);\n const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);\n const announcerString = useParticipantChangedAnnouncement();\n\n const cameraSwitcherProps = useMemo(() => {\n return {\n ...cameraSwitcherCallback,\n ...cameraSwitcherCameras\n };\n }, [cameraSwitcherCallback, cameraSwitcherCameras]);\n\n const onRenderAvatar = useCallback(\n (userId?: string, options?: CustomAvatarOptions) => {\n return (\n <Stack className={mergeStyles({ position: 'absolute', height: '100%', width: '100%' })}>\n <Stack styles={{ root: { margin: 'auto', maxHeight: '100%' } }}>\n <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />\n </Stack>\n </Stack>\n );\n },\n [props.onFetchAvatarPersonaData]\n );\n\n useLocalVideoStartTrigger(!!props.isVideoStreamOn);\n\n /* @conditional-compile-remove(pinned-participants) */\n const remoteVideoTileMenuOptions: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps = useMemo(() => {\n return props.remoteVideoTileMenuOptions?.isHidden\n ? false\n : props.isMobile\n ? { kind: 'drawer', hostId: props.drawerMenuHostId }\n : { kind: 'contextual' };\n }, [props.remoteVideoTileMenuOptions?.isHidden, props.isMobile, props.drawerMenuHostId]);\n\n const VideoGalleryMemoized = useMemo(() => {\n return (\n <VideoGallery\n {...videoGalleryProps}\n localVideoViewOptions={localVideoViewOptions}\n remoteVideoViewOptions={remoteVideoViewOptions}\n styles={VideoGalleryStyles}\n layout=\"floatingLocalVideo\"\n showCameraSwitcherInLocalPreview={props.isMobile}\n localVideoCameraCycleButtonProps={cameraSwitcherProps}\n onRenderAvatar={onRenderAvatar}\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions={remoteVideoTileMenuOptions}\n />\n );\n }, [\n videoGalleryProps,\n props.isMobile,\n onRenderAvatar,\n cameraSwitcherProps,\n /* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions\n ]);\n\n return (\n <>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n {VideoGalleryMemoized}\n </>\n );\n};\n\n/**\n * @private\n *\n * `shouldTransition` is an extra predicate that controls whether this hooks actually transitions the call.\n * The rule of hooks disallows calling the hook conditionally, so this predicate can be used to make the decision.\n */\nexport const useLocalVideoStartTrigger = (isLocalVideoAvailable: boolean, shouldTransition?: boolean): void => {\n // Once a call is joined, we need to transition the local preview camera setting into the call.\n // This logic is needed on any screen that we might join a call from:\n // - The Media gallery\n // - The lobby page\n // - The networkReconnect interstitial that may show at the start of a call.\n //\n // @TODO: Can we simply have the callHandlers handle this transition logic.\n const [isButtonStatusSynced, setIsButtonStatusSynced] = useState(false);\n const isPreviewCameraOn = useSelector(getIsPreviewCameraOn);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n useEffect(() => {\n if (shouldTransition !== false) {\n if (isPreviewCameraOn && !isLocalVideoAvailable && !isButtonStatusSynced) {\n mediaGalleryHandlers.onStartLocalVideo();\n }\n setIsButtonStatusSynced(true);\n }\n }, [shouldTransition, isButtonStatusSynced, isPreviewCameraOn, isLocalVideoAvailable, mediaGalleryHandlers]);\n};\n\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/MediaGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,SAAS,EAA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AC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,qBAA8B,EAAE,gBAA0B,EAAQ,EAAE;IAC5G,+FAA+F;IAC/F,qEAAqE;IACrE,sBAAsB;IACtB,mBAAmB;IACnB,4EAA4E;IAC5E,EAAE;IACF,2EAA2E;IAC3E,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxE,MAAM,iBAAiB,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAC5D,MAAM,oBAAoB,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACvD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,gBAAgB,KAAK,KAAK,EAAE;YAC9B,IAAI,iBAAiB,IAAI,CAAC,qBAAqB,IAAI,CAAC,oBAAoB,EAAE;gBACxE,oBAAoB,CAAC,iBAAiB,EAAE,CAAC;aAC1C;YACD,uBAAuB,CAAC,IAAI,CAAC,CAAC;SAC/B;IACH,CAAC,EAAE,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAC/G,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { CSSProperties, useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { useRef } from 'react';\nimport {\n VideoGallery,\n VideoStreamOptions,\n OnRenderAvatarCallback,\n CustomAvatarOptions,\n Announcer\n} from '@internal/react-components';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { _useContainerWidth, _useContainerHeight } from '@internal/react-components';\n/* @conditional-compile-remove(pinned-participants) */\nimport { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from '@internal/react-components';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { AvatarPersona, AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { getIsPreviewCameraOn } from '../selectors/baseSelectors';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { useSelector } from '../hooks/useSelector';\nimport { localVideoCameraCycleButtonSelector } from '../selectors/LocalVideoTileSelector';\nimport { LocalVideoCameraCycleButton } from '@internal/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useParticipantChangedAnnouncement } from '../utils/MediaGalleryUtils';\n/* @conditional-compile-remove(pinned-participants) */\nimport { RemoteVideoTileMenuOptions } from '../CallComposite';\n\nconst VideoGalleryStyles = {\n root: {\n height: '100%',\n minHeight: '10rem', // space affordance to ensure media gallery is never collapsed\n minWidth: '6rem'\n }\n};\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\nconst remoteVideoViewOptions = {\n scalingMode: 'Crop'\n} as VideoStreamOptions;\n\n/**\n * @private\n */\nexport interface MediaGalleryProps {\n isVideoStreamOn?: boolean;\n isMicrophoneChecked?: boolean;\n onStartLocalVideo: () => Promise<void>;\n onRenderAvatar?: OnRenderAvatarCallback;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n isMobile?: boolean;\n drawerMenuHostId?: string;\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;\n}\n\n/**\n * @private\n */\nexport const MediaGallery = (props: MediaGalleryProps): JSX.Element => {\n const videoGalleryProps = usePropsFor(VideoGallery);\n const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);\n const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);\n const announcerString = useParticipantChangedAnnouncement();\n\n /* @conditional-compile-remove(vertical-gallery) */\n const containerRef = useRef<HTMLDivElement>(null);\n /* @conditional-compile-remove(vertical-gallery) */\n const containerWidth = _useContainerWidth(containerRef);\n /* @conditional-compile-remove(vertical-gallery) */\n const containerHeight = _useContainerHeight(containerRef);\n\n const cameraSwitcherProps = useMemo(() => {\n return {\n ...cameraSwitcherCallback,\n ...cameraSwitcherCameras\n };\n }, [cameraSwitcherCallback, cameraSwitcherCameras]);\n\n const onRenderAvatar = useCallback(\n (userId?: string, options?: CustomAvatarOptions) => {\n return (\n <Stack className={mergeStyles({ position: 'absolute', height: '100%', width: '100%' })}>\n <Stack styles={{ root: { margin: 'auto', maxHeight: '100%' } }}>\n <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />\n </Stack>\n </Stack>\n );\n },\n [props.onFetchAvatarPersonaData]\n );\n\n useLocalVideoStartTrigger(!!props.isVideoStreamOn);\n\n /* @conditional-compile-remove(pinned-participants) */\n const remoteVideoTileMenuOptions: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps = useMemo(() => {\n return props.remoteVideoTileMenuOptions?.isHidden\n ? false\n : props.isMobile\n ? { kind: 'drawer', hostId: props.drawerMenuHostId }\n : { kind: 'contextual' };\n }, [props.remoteVideoTileMenuOptions?.isHidden, props.isMobile, props.drawerMenuHostId]);\n\n /* @conditional-compile-remove(vertical-gallery) */\n const overflowGalleryPosition = useMemo(\n () =>\n containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9\n ? 'VerticalRight'\n : 'HorizontalBottom',\n [containerWidth, containerHeight]\n );\n\n const VideoGalleryMemoized = useMemo(() => {\n return (\n <VideoGallery\n {...videoGalleryProps}\n localVideoViewOptions={localVideoViewOptions}\n remoteVideoViewOptions={remoteVideoViewOptions}\n styles={VideoGalleryStyles}\n layout=\"floatingLocalVideo\"\n showCameraSwitcherInLocalPreview={props.isMobile}\n localVideoCameraCycleButtonProps={cameraSwitcherProps}\n onRenderAvatar={onRenderAvatar}\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions={remoteVideoTileMenuOptions}\n /* @conditional-compile-remove(vertical-gallery) */\n overflowGalleryPosition={overflowGalleryPosition}\n />\n );\n }, [\n videoGalleryProps,\n props.isMobile,\n onRenderAvatar,\n cameraSwitcherProps,\n /* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions,\n /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition\n ]);\n\n return (\n <div /* @conditional-compile-remove(vertical-gallery) */ ref={containerRef} style={mediaGalleryContainerStyles}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n {VideoGalleryMemoized}\n </div>\n );\n};\n\n/**\n * @private\n *\n * `shouldTransition` is an extra predicate that controls whether this hooks actually transitions the call.\n * The rule of hooks disallows calling the hook conditionally, so this predicate can be used to make the decision.\n */\nexport const useLocalVideoStartTrigger = (isLocalVideoAvailable: boolean, shouldTransition?: boolean): void => {\n // Once a call is joined, we need to transition the local preview camera setting into the call.\n // This logic is needed on any screen that we might join a call from:\n // - The Media gallery\n // - The lobby page\n // - The networkReconnect interstitial that may show at the start of a call.\n //\n // @TODO: Can we simply have the callHandlers handle this transition logic.\n const [isButtonStatusSynced, setIsButtonStatusSynced] = useState(false);\n const isPreviewCameraOn = useSelector(getIsPreviewCameraOn);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n useEffect(() => {\n if (shouldTransition !== false) {\n if (isPreviewCameraOn && !isLocalVideoAvailable && !isButtonStatusSynced) {\n mediaGalleryHandlers.onStartLocalVideo();\n }\n setIsButtonStatusSynced(true);\n }\n }, [shouldTransition, isButtonStatusSynced, isPreviewCameraOn, isLocalVideoAvailable, mediaGalleryHandlers]);\n};\n\nconst mediaGalleryContainerStyles: CSSProperties = { width: '100%', height: '100%' };\n\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
@@ -24,7 +24,7 @@ export const NetworkReconnectTile = (props) => {
24
24
  useLocalVideoStartTrigger(!!props.localParticipantVideoStream.isAvailable);
25
25
  return (React.createElement(ExpandedLocalVideoTile, Object.assign({ localParticipantVideoStream: props.localParticipantVideoStream, overlayContent: React.createElement(Stack, { verticalFill: true, horizontalAlign: "center", verticalAlign: "center", className: mergeStyles(containerStyle), "aria-atomic": true },
26
26
  React.createElement(Stack, { horizontal: true, className: mergeStyles(titleContainerStyle) },
27
- React.createElement(CallCompositeIcon, { iconName: "NetworkReconnectIcon", className: mergeStyles(titleStyle) }),
27
+ React.createElement(CallCompositeIcon, { iconName: "NetworkReconnectIcon", className: mergeStyles(titleStyle(palette, isVideoReady)) }),
28
28
  React.createElement(Text, { className: mergeStyles(titleStyle(palette, isVideoReady)), "aria-live": 'assertive' }, strings.networkReconnectTitle)),
29
29
  React.createElement(Text, { className: mergeStyles(moreDetailsStyle(palette, isVideoReady)), "aria-live": 'assertive' }, strings.networkReconnectMoreDetails)) }, handlers)));
30
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkReconnectTile.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/NetworkReconnectTile.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAsB,QAAQ,EAAE,4CAAmC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACX,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AASvD;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;;IACpF,MAAM,WAAW,GAAG,KAAK,CAAC,2BAA2B,CAAC;IACtD,MAAM,YAAY,GAAG,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,mCAAI,KAAK,CAAC;IACvD,MAAM,OAAO,GAAG,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnC,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAEzC,MAAM,QAAQ,GAAG,WAAW,CAAC,sBAAsB,CAAC,CAAC;IACrD,qDAAqD;IACrD,oDAAoD;IACpD,yBAAyB,CAAC,CAAC,CAAC,KAAK,CAAC,2BAA2B,CAAC,WAAW,CAAC,CAAC;IAE3E,OAAO,CACL,oBAAC,sBAAsB,kBACrB,2BAA2B,EAAE,KAAK,CAAC,2BAA2B,EAC9D,cAAc,EACZ,oBAAC,KAAK,IACJ,YAAY,QACZ,eAAe,EAAC,QAAQ,EACxB,aAAa,EAAC,QAAQ,EACtB,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC;YAGtC,oBAAC,KAAK,IAAC,UAAU,QAAC,SAAS,EAAE,WAAW,CAAC,mBAAmB,CAAC;gBAC3D,oBAAC,iBAAiB,IAAC,QAAQ,EAAC,sBAAsB,EAAC,SAAS,EAAE,WAAW,CAAC,UAAU,CAAC,GAAI;gBACzF,oBAAC,IAAI,IAAC,SAAS,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,eAAa,WAAW,IACpF,OAAO,CAAC,qBAAqB,CACzB,CACD;YACR,oBAAC,IAAI,IAAC,SAAS,EAAE,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,eAAa,WAAW,IAC1F,OAAO,CAAC,2BAA2B,CAC/B,CACD,IAEN,QAAQ,EACZ,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\nimport { VideoGalleryStream, useTheme } from '@internal/react-components';\nimport { ExpandedLocalVideoTile } from './ExpandedLocalVideoTile';\nimport { mergeStyles, Stack, Text } from '@fluentui/react';\nimport { useLocale } from '../../localization';\nimport {\n containerStyle,\n moreDetailsStyle,\n titleContainerStyle,\n titleStyle\n} from '../styles/NetworkReconnectTile.styles';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { useLocalVideoStartTrigger } from './MediaGallery';\nimport { CallCompositeIcon } from '../../common/icons';\n\n/**\n * @private\n */\nexport interface NetworkReconnectTileProps {\n localParticipantVideoStream: VideoGalleryStream;\n}\n\n/**\n * @private\n */\nexport const NetworkReconnectTile = (props: NetworkReconnectTileProps): JSX.Element => {\n const videoStream = props.localParticipantVideoStream;\n const isVideoReady = videoStream?.isAvailable ?? false;\n const palette = useTheme().palette;\n const strings = useLocale().strings.call;\n\n const handlers = useHandlers(ExpandedLocalVideoTile);\n // This tile may be shown at the beginning of a call.\n // So we need to transition local video to the call.\n useLocalVideoStartTrigger(!!props.localParticipantVideoStream.isAvailable);\n\n return (\n <ExpandedLocalVideoTile\n localParticipantVideoStream={props.localParticipantVideoStream}\n overlayContent={\n <Stack\n verticalFill\n horizontalAlign=\"center\"\n verticalAlign=\"center\"\n className={mergeStyles(containerStyle)}\n aria-atomic\n >\n <Stack horizontal className={mergeStyles(titleContainerStyle)}>\n <CallCompositeIcon iconName=\"NetworkReconnectIcon\" className={mergeStyles(titleStyle)} />\n <Text className={mergeStyles(titleStyle(palette, isVideoReady))} aria-live={'assertive'}>\n {strings.networkReconnectTitle}\n </Text>\n </Stack>\n <Text className={mergeStyles(moreDetailsStyle(palette, isVideoReady))} aria-live={'assertive'}>\n {strings.networkReconnectMoreDetails}\n </Text>\n </Stack>\n }\n {...handlers}\n />\n );\n};\n\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"NetworkReconnectTile.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/NetworkReconnectTile.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAA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AAC,UAAU,QAAC,SAAS,EAAE,WAAW,CAAC,mBAAmB,CAAC;gBAC3D,oBAAC,iBAAiB,IAChB,QAAQ,EAAC,sBAAsB,EAC/B,SAAS,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,GACzD;gBACF,oBAAC,IAAI,IAAC,SAAS,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,eAAa,WAAW,IACpF,OAAO,CAAC,qBAAqB,CACzB,CACD;YACR,oBAAC,IAAI,IAAC,SAAS,EAAE,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,eAAa,WAAW,IAC1F,OAAO,CAAC,2BAA2B,CAC/B,CACD,IAEN,QAAQ,EACZ,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\nimport { VideoGalleryStream, useTheme } from '@internal/react-components';\nimport { ExpandedLocalVideoTile } from './ExpandedLocalVideoTile';\nimport { mergeStyles, Stack, Text } from '@fluentui/react';\nimport { useLocale } from '../../localization';\nimport {\n containerStyle,\n moreDetailsStyle,\n titleContainerStyle,\n titleStyle\n} from '../styles/NetworkReconnectTile.styles';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { useLocalVideoStartTrigger } from './MediaGallery';\nimport { CallCompositeIcon } from '../../common/icons';\n\n/**\n * @private\n */\nexport interface NetworkReconnectTileProps {\n localParticipantVideoStream: VideoGalleryStream;\n}\n\n/**\n * @private\n */\nexport const NetworkReconnectTile = (props: NetworkReconnectTileProps): JSX.Element => {\n const videoStream = props.localParticipantVideoStream;\n const isVideoReady = videoStream?.isAvailable ?? false;\n const palette = useTheme().palette;\n const strings = useLocale().strings.call;\n\n const handlers = useHandlers(ExpandedLocalVideoTile);\n // This tile may be shown at the beginning of a call.\n // So we need to transition local video to the call.\n useLocalVideoStartTrigger(!!props.localParticipantVideoStream.isAvailable);\n\n return (\n <ExpandedLocalVideoTile\n localParticipantVideoStream={props.localParticipantVideoStream}\n overlayContent={\n <Stack\n verticalFill\n horizontalAlign=\"center\"\n verticalAlign=\"center\"\n className={mergeStyles(containerStyle)}\n aria-atomic\n >\n <Stack horizontal className={mergeStyles(titleContainerStyle)}>\n <CallCompositeIcon\n iconName=\"NetworkReconnectIcon\"\n className={mergeStyles(titleStyle(palette, isVideoReady))}\n />\n <Text className={mergeStyles(titleStyle(palette, isVideoReady))} aria-live={'assertive'}>\n {strings.networkReconnectTitle}\n </Text>\n </Stack>\n <Text className={mergeStyles(moreDetailsStyle(palette, isVideoReady))} aria-live={'assertive'}>\n {strings.networkReconnectMoreDetails}\n </Text>\n </Stack>\n }\n {...handlers}\n />\n );\n};\n\"../../../../../react-components/src\""]}
@@ -5,9 +5,10 @@ import { CallControlDisplayType } from '../../types/CallControlOptions';
5
5
  * @private
6
6
  */
7
7
  export declare const Camera: (props: {
8
- displayType?: CallControlDisplayType;
9
- styles?: ControlBarButtonStyles;
10
- splitButtonsForDeviceSelection?: boolean;
11
- disabled?: boolean;
8
+ displayType?: CallControlDisplayType | undefined;
9
+ styles?: import("@fluentui/react").IButtonStyles | undefined;
10
+ splitButtonsForDeviceSelection?: boolean | undefined;
11
+ disabled?: boolean | undefined;
12
+ onShowVideoEffectsPicker?: ((showVideoEffectsOptions: boolean) => void) | undefined;
12
13
  }) => JSX.Element;
13
14
  //# sourceMappingURL=Camera.d.ts.map
@@ -10,6 +10,8 @@ import { concatButtonBaseStyles } from '../../styles/Buttons.styles';
10
10
  export const Camera = (props) => {
11
11
  const cameraButtonProps = usePropsFor(CameraButton);
12
12
  const styles = useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
13
- return (React.createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-camera-button" }, cameraButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: cameraButtonProps.disabled || props.disabled })));
13
+ return (React.createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-camera-button" }, cameraButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: cameraButtonProps.disabled || props.disabled,
14
+ /* @conditional-compile-remove(video-background-effects) */
15
+ onShowVideoEffectsPicker: props.onShowVideoEffectsPicker })));
14
16
  };
15
17
  //# sourceMappingURL=Camera.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Camera.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Camera.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAA0B,+CAAmC;AAClF,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAKtB,EAAe,EAAE;IAChB,MAAM,iBAAiB,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,WAAC,OAAA,sBAAsB,CAAC,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAA,EAAA,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACzF,OAAO,CACL,oBAAC,YAAY,gCACA,8BAA8B,IACrC,iBAAiB,IACrB,SAAS,EAAE,KAAK,CAAC,WAAW,KAAK,SAAS,EAC1C,MAAM,EAAE,MAAM,EACd,yBAAyB,EAAE,KAAK,CAAC,8BAA8B,EAC/D,QAAQ,EAAE,iBAAiB,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,IACtD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CameraButton, ControlBarButtonStyles } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { usePropsFor } from '../../hooks/usePropsFor';\nimport { CallControlDisplayType } from '../../types/CallControlOptions';\nimport { concatButtonBaseStyles } from '../../styles/Buttons.styles';\n\n/**\n * @private\n */\nexport const Camera = (props: {\n displayType?: CallControlDisplayType;\n styles?: ControlBarButtonStyles;\n splitButtonsForDeviceSelection?: boolean;\n disabled?: boolean;\n}): JSX.Element => {\n const cameraButtonProps = usePropsFor(CameraButton);\n const styles = useMemo(() => concatButtonBaseStyles(props.styles ?? {}), [props.styles]);\n return (\n <CameraButton\n data-ui-id=\"call-composite-camera-button\"\n {...cameraButtonProps}\n showLabel={props.displayType !== 'compact'}\n styles={styles}\n enableDeviceSelectionMenu={props.splitButtonsForDeviceSelection}\n disabled={cameraButtonProps.disabled || props.disabled}\n />\n );\n};\n\"../../../../../../react-components/src\""]}
1
+ {"version":3,"file":"Camera.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Camera.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAA0B,+CAAmC;AAClF,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAOtB,EAAe,EAAE;IAChB,MAAM,iBAAiB,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,WAAC,OAAA,sBAAsB,CAAC,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAA,EAAA,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACzF,OAAO,CACL,oBAAC,YAAY,gCACA,8BAA8B,IACrC,iBAAiB,IACrB,SAAS,EAAE,KAAK,CAAC,WAAW,KAAK,SAAS,EAC1C,MAAM,EAAE,MAAM,EACd,yBAAyB,EAAE,KAAK,CAAC,8BAA8B,EAC/D,QAAQ,EAAE,iBAAiB,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ;QACtD,2DAA2D;QAC3D,wBAAwB,EAAE,KAAK,CAAC,wBAAwB,IACxD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CameraButton, ControlBarButtonStyles } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { usePropsFor } from '../../hooks/usePropsFor';\nimport { CallControlDisplayType } from '../../types/CallControlOptions';\nimport { concatButtonBaseStyles } from '../../styles/Buttons.styles';\n\n/**\n * @private\n */\nexport const Camera = (props: {\n displayType?: CallControlDisplayType;\n styles?: ControlBarButtonStyles;\n splitButtonsForDeviceSelection?: boolean;\n disabled?: boolean;\n /* @conditional-compile-remove(video-background-effects) */\n onShowVideoEffectsPicker?: (showVideoEffectsOptions: boolean) => void;\n}): JSX.Element => {\n const cameraButtonProps = usePropsFor(CameraButton);\n const styles = useMemo(() => concatButtonBaseStyles(props.styles ?? {}), [props.styles]);\n return (\n <CameraButton\n data-ui-id=\"call-composite-camera-button\"\n {...cameraButtonProps}\n showLabel={props.displayType !== 'compact'}\n styles={styles}\n enableDeviceSelectionMenu={props.splitButtonsForDeviceSelection}\n disabled={cameraButtonProps.disabled || props.disabled}\n /* @conditional-compile-remove(video-background-effects) */\n onShowVideoEffectsPicker={props.onShowVideoEffectsPicker}\n />\n );\n};\n\"../../../../../../react-components/src\""]}
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { ControlBarButtonStrings } from "../../../../../../react-components/src";
3
2
  import { CallControlDisplayType, CustomCallControlButtonCallback, CustomCallControlButtonPlacement } from '../../types/CallControlOptions';
4
3
  import { CallControlOptions } from '../../types/CallControlOptions';
5
4
  /** @private */
@@ -7,11 +6,7 @@ export declare type CustomButtons = {
7
6
  [key in CustomCallControlButtonPlacement]: JSX.Element | undefined;
8
7
  };
9
8
  /** @private */
10
- export declare const generateCustomControlBarButtonStrings: (text: string | undefined) => ControlBarButtonStrings;
11
- /** @private */
12
9
  export declare const generateCustomControlBarButtons: (onFetchCustomButtonProps?: CustomCallControlButtonCallback[] | undefined, displayType?: CallControlDisplayType | undefined) => CustomButtons;
13
10
  /** @private */
14
- export declare const generateCustomDrawerButtons: (onFetchCustomButtonProps?: CustomCallControlButtonCallback[] | undefined, displayType?: CallControlDisplayType | undefined) => CustomButtons;
15
- /** @private */
16
11
  export declare const onFetchCustomButtonPropsTrampoline: (options?: CallControlOptions | undefined) => CustomCallControlButtonCallback[] | undefined;
17
12
  //# sourceMappingURL=Custom.d.ts.map
@@ -5,10 +5,6 @@ import { Icon } from '@fluentui/react';
5
5
  import { ControlBarButton } from "../../../../../../react-components/src";
6
6
  import React from 'react';
7
7
  /** @private */
8
- export const generateCustomControlBarButtonStrings = (text) => {
9
- return { label: text };
10
- };
11
- /** @private */
12
8
  export const generateCustomControlBarButtons = (onFetchCustomButtonProps, displayType) => {
13
9
  const response = {
14
10
  primary: undefined
@@ -22,33 +18,7 @@ export const generateCustomControlBarButtons = (onFetchCustomButtonProps, displa
22
18
  .filter((buttonProps) => buttonProps.placement === key)
23
19
  .map((buttonProps, i) => {
24
20
  var _a;
25
- return (React.createElement(ControlBarButton, { ariaDescription: buttonProps.ariaDescription, ariaLabel: buttonProps.ariaLabel, disabled: buttonProps.disabled, id: buttonProps.id, key: (_a = buttonProps.key) !== null && _a !== void 0 ? _a : `${buttonProps.placement}_${i}`, onClick: buttonProps.onItemClick, onRenderIcon: () => { var _a; return React.createElement(Icon, { iconName: (_a = buttonProps.iconName) !== null && _a !== void 0 ? _a : 'ControlButtonOptions' }); }, showLabel: buttonProps.showLabel, strings: generateCustomControlBarButtonStrings(buttonProps.text), styles: buttonProps.styles }));
26
- })));
27
- }
28
- return response;
29
- };
30
- /** @private */
31
- export const generateCustomDrawerButtons = (onFetchCustomButtonProps, displayType) => {
32
- const response = {
33
- primary: undefined
34
- };
35
- if (!onFetchCustomButtonProps) {
36
- return response;
37
- }
38
- const allButtonProps = onFetchCustomButtonProps.map((f) => f({ displayType }));
39
- for (const key in response) {
40
- response[key] = (React.createElement(React.Fragment, null, allButtonProps
41
- .filter((buttonProps) => buttonProps.placement === key)
42
- .map((buttonProps, i) => {
43
- var _a;
44
- return ({
45
- disabled: buttonProps.disabled,
46
- iconProps: { iconName: buttonProps.iconName },
47
- id: buttonProps.id,
48
- itemKey: (_a = buttonProps.key) !== null && _a !== void 0 ? _a : `${buttonProps.placement}_${i}`,
49
- onItemClick: buttonProps.onItemClick,
50
- text: buttonProps.text
51
- });
21
+ return (React.createElement(ControlBarButton, { ariaDescription: buttonProps.ariaDescription, ariaLabel: buttonProps.ariaLabel, disabled: buttonProps.disabled, id: buttonProps.id, key: (_a = buttonProps.key) !== null && _a !== void 0 ? _a : `${buttonProps.placement}_${i}`, onClick: buttonProps.onItemClick, onRenderIcon: () => { var _a; return React.createElement(Icon, { iconName: (_a = buttonProps.iconName) !== null && _a !== void 0 ? _a : 'ControlButtonOptions' }); }, showLabel: buttonProps.showLabel, text: buttonProps.text, styles: buttonProps.styles }));
52
22
  })));
53
23
  }
54
24
  return response;
@@ -1 +1 @@
1
- {"version":3,"file":"Custom.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Custom.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,iDAAiD;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAA2B,+CAAmC;AACvF,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,eAAe;A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ACmB,EAAE;IACjD,IAAI,QAAQ,GAAkD,SAAS,CAAC;IACxE,QAAQ,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,wBAAwB,CAAC;IAC7C,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// eslint-disable-next-line no-restricted-imports\nimport { Icon } from '@fluentui/react';\nimport { ControlBarButton, ControlBarButtonStrings } from '@internal/react-components';\nimport React from 'react';\nimport {\n CallControlDisplayType,\n CustomCallControlButtonCallback,\n CustomCallControlButtonPlacement\n} from '../../types/CallControlOptions';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { CallControlOptions } from '../../types/CallControlOptions';\n\n/** @private */\nexport type CustomButtons = { [key in CustomCallControlButtonPlacement]: JSX.Element | undefined };\n\n/** @private */\nexport const generateCustomControlBarButtonStrings = (text: string | undefined): ControlBarButtonStrings => {\n return { label: text };\n};\n\n/** @private */\nexport const generateCustomControlBarButtons = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomButtons => {\n const response = {\n primary: undefined\n };\n\n if (!onFetchCustomButtonProps) {\n return response;\n }\n\n const allButtonProps = onFetchCustomButtonProps.map((f) => f({ displayType }));\n\n for (const key in response) {\n response[key] = (\n <>\n {allButtonProps\n .filter((buttonProps) => buttonProps.placement === key)\n .map((buttonProps, i) => (\n <ControlBarButton\n ariaDescription={buttonProps.ariaDescription}\n ariaLabel={buttonProps.ariaLabel}\n disabled={buttonProps.disabled}\n id={buttonProps.id}\n key={buttonProps.key ?? `${buttonProps.placement}_${i}`}\n onClick={buttonProps.onItemClick}\n onRenderIcon={() => <Icon iconName={buttonProps.iconName ?? 'ControlButtonOptions'} />}\n showLabel={buttonProps.showLabel}\n strings={generateCustomControlBarButtonStrings(buttonProps.text)}\n styles={buttonProps.styles}\n />\n ))}\n </>\n );\n }\n return response;\n};\n\n/** @private */\nexport const generateCustomDrawerButtons = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomButtons => {\n const response = {\n primary: undefined\n };\n\n if (!onFetchCustomButtonProps) {\n return response;\n }\n\n const allButtonProps = onFetchCustomButtonProps.map((f) => f({ displayType }));\n for (const key in response) {\n response[key] = (\n <>\n {allButtonProps\n .filter((buttonProps) => buttonProps.placement === key)\n .map((buttonProps, i) => ({\n disabled: buttonProps.disabled,\n iconProps: { iconName: buttonProps.iconName },\n id: buttonProps.id,\n itemKey: buttonProps.key ?? `${buttonProps.placement}_${i}`,\n onItemClick: buttonProps.onItemClick,\n text: buttonProps.text\n }))}\n </>\n );\n }\n return response;\n};\n\n/* @conditional-compile-remove(control-bar-button-injection) */\n/** @private */\nexport const onFetchCustomButtonPropsTrampoline = (\n options?: CallControlOptions\n): CustomCallControlButtonCallback[] | undefined => {\n let response: CustomCallControlButtonCallback[] | undefined = undefined;\n response = options?.onFetchCustomButtonProps;\n return response;\n};\n\"../../../../../../react-components/src\""]}
1
+ {"version":3,"file":"Custom.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Custom.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,iDAAiD;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAwB,+CAAmC;AACpF,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,eAAe;AACf,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC7C,wBAA4D,EAC5D,WAAoC,EACrB,EAAE;IACjB,MAAM,QAAQ,GAAG;QACf,OAAO,EAAE,SAAS;KACnB,CAAC;IAEF,IAAI,CAAC,wBAAwB,EAAE;QAC7B,OAAO,QAAQ,CAAC;KACjB;IAED,MAAM,cAAc,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,W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ports\nimport { Icon } from '@fluentui/react';\nimport { ControlBarButton, _DrawerMenuItemProps } from '@internal/react-components';\nimport React from 'react';\nimport {\n CallControlDisplayType,\n CustomCallControlButtonCallback,\n CustomCallControlButtonPlacement\n} from '../../types/CallControlOptions';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { CallControlOptions } from '../../types/CallControlOptions';\n\n/** @private */\nexport type CustomButtons = { [key in CustomCallControlButtonPlacement]: JSX.Element | undefined };\n\n/** @private */\nexport const generateCustomControlBarButtons = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomButtons => {\n const response = {\n primary: undefined\n };\n\n if (!onFetchCustomButtonProps) {\n return response;\n }\n\n const allButtonProps = onFetchCustomButtonProps.map((f) => f({ displayType }));\n\n for (const key in response) {\n response[key] = (\n <>\n {allButtonProps\n .filter((buttonProps) => buttonProps.placement === key)\n .map((buttonProps, i) => (\n <ControlBarButton\n ariaDescription={buttonProps.ariaDescription}\n ariaLabel={buttonProps.ariaLabel}\n disabled={buttonProps.disabled}\n id={buttonProps.id}\n key={buttonProps.key ?? `${buttonProps.placement}_${i}`}\n onClick={buttonProps.onItemClick}\n onRenderIcon={() => <Icon iconName={buttonProps.iconName ?? 'ControlButtonOptions'} />}\n showLabel={buttonProps.showLabel}\n text={buttonProps.text}\n styles={buttonProps.styles}\n />\n ))}\n </>\n );\n }\n return response;\n};\n\n/* @conditional-compile-remove(control-bar-button-injection) */\n/** @private */\nexport const onFetchCustomButtonPropsTrampoline = (\n options?: CallControlOptions\n): CustomCallControlButtonCallback[] | undefined => {\n let response: CustomCallControlButtonCallback[] | undefined = undefined;\n response = options?.onFetchCustomButtonProps;\n return response;\n};\n\"../../../../../../react-components/src\""]}
@@ -94,6 +94,18 @@ const createCompositeHandlers = memoizeOne((adapter) => ({
94
94
  /* @conditional-compile-remove(call-readiness) */
95
95
  askDevicePermission: (constrain) => __awaiter(void 0, void 0, void 0, function* () {
96
96
  return adapter.askDevicePermission(constrain);
97
+ }),
98
+ /* @conditional-compile-remove(video-background-effects) */
99
+ onRemoveVideoBackgroundEffects: () => __awaiter(void 0, void 0, void 0, function* () {
100
+ return yield adapter.stopVideoBackgroundEffect();
101
+ }),
102
+ /* @conditional-compile-remove(video-background-effects) */
103
+ onBlurVideoBackground: (backgroundBlurConfig) => __awaiter(void 0, void 0, void 0, function* () {
104
+ return yield adapter.blurVideoBackground(backgroundBlurConfig);
105
+ }),
106
+ /* @conditional-compile-remove(video-background-effects) */
107
+ onReplaceVideoBackground: (backgroundReplacementConfig) => __awaiter(void 0, void 0, void 0, function* () {
108
+ return yield adapter.replaceVideoBackground(backgroundReplacementConfig);
97
109
  })
98
110
  }));
99
111
  //# sourceMappingURL=useHandlers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useHandlers.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/hooks/useHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,EAAoB,6BAA6B,EAAE,yCAAgC;AAE1F,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAItC;;GAEG;AACH,+HAA+H;AAC/H,MAAM,CAAC,MAAM,WAAW,GAAG;AACzB,6DAA6D;AAC7D,UAAkD,EAC4B,EAAE;IAChF,OAAO,uBAAuB,CAAC,UAAU,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,UAAU,CACxC,CAAC,OAA0B,EAAyB,EAAE,CAAC,CAAC;IACtD,uBAAuB,EAAE,CAAO,OAAO,EAAE,EAAE;QACzC,OAAO,MAAM,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC,CAAA;IACD,wBAAwB,EAAE,CAAO,MAAM,EAAE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AC,IAAI,EAAE;YAC3B,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC;SAC9B;IACH,CAAC,CAAA;IACD,wBAAwB,EAAE,GAAS,EAAE;QACnC,OAAO,OAAO,CAAC,iBAAiB,EAAE,CAAC;IACrC,CAAC,CAAA;IACD,yBAAyB,EAAE,CAAO,MAAM,EAAE,EAAE;QAC1C,OAAO,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC,CAAA;IACD,iDAAiD;IACjD,mBAAmB,EAAE,CAAO,SAAS,EAAE,EAAE;QACvC,OAAO,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC,CAAA;CACF,CAAC,CACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CommonCallingHandlers } from '@internal/calling-component-bindings';\nimport { CommonProperties, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { ReactElement } from 'react';\nimport memoizeOne from 'memoize-one';\nimport { CommonCallAdapter } from '..';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isCameraOn } from '../utils';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { DtmfTone } from '@azure/communication-calling';\n\n/**\n * @private\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport const useHandlers = <PropsT>(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _component: (props: PropsT) => ReactElement | null\n): Pick<CommonCallingHandlers, CommonProperties<CommonCallingHandlers, PropsT>> => {\n return createCompositeHandlers(useAdapter());\n};\n\nconst createCompositeHandlers = memoizeOne(\n (adapter: CommonCallAdapter): CommonCallingHandlers => ({\n onCreateLocalStreamView: async (options) => {\n return await adapter.createStreamView(undefined, options);\n },\n onCreateRemoteStreamView: async (userId, options) => {\n return await adapter.createStreamView(userId, options);\n },\n onHangUp: async (forEveryone?: boolean) => {\n await adapter.leaveCall(forEveryone);\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onToggleHold: async () => {\n return adapter.getState().call?.state === 'LocalHold' ? await adapter.resumeCall() : await adapter.holdCall();\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant: async (participant, options?) => {\n return await adapter.addParticipant(participant, options);\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onSendDtmfTone: async (dtmfTone: DtmfTone) => {\n await adapter.sendDtmfTone(dtmfTone);\n },\n onRemoveParticipant: async (userId) => {\n await adapter.removeParticipant(userId);\n },\n onSelectCamera: async (deviceInfo, options) => {\n await adapter.setCamera(deviceInfo, options);\n },\n onSelectMicrophone: async (deviceInfo) => {\n await adapter.setMicrophone(deviceInfo);\n },\n onSelectSpeaker: async (deviceInfo) => {\n await adapter.setSpeaker(deviceInfo);\n },\n onStartCall: (participants, options?) => {\n const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));\n return adapter.startCall(rawIds, options);\n },\n onStartScreenShare: async () => {\n await adapter.startScreenShare();\n },\n onStopScreenShare: async () => {\n await adapter.stopScreenShare();\n },\n onToggleCamera: async (options) => {\n isCameraOn(adapter.getState()) ? await adapter.stopCamera() : await adapter.startCamera(options);\n },\n onToggleMicrophone: async () => {\n return adapter.getState().call?.isMuted ? await adapter.unmute() : await adapter.mute();\n },\n onToggleScreenShare: async () => {\n return adapter.getState().call?.isScreenSharingOn\n ? await adapter.stopScreenShare()\n : await adapter.startScreenShare();\n },\n onStartLocalVideo: async () => {\n if (adapter.getState().call) {\n return adapter.startCamera();\n }\n },\n onDisposeLocalStreamView: async () => {\n return adapter.disposeStreamView();\n },\n onDisposeRemoteStreamView: async (userId) => {\n return adapter.disposeStreamView(userId);\n },\n /* @conditional-compile-remove(call-readiness) */\n askDevicePermission: async (constrain) => {\n return adapter.askDevicePermission(constrain);\n }\n })\n);\n\"../../../../../calling-component-bindings/src\"\"../../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"useHandlers.js","sourceRoot":"","sources":["../../../../../../../../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AAC,CAAA;IACD,2DAA2D;IAC3D,qBAAqB,EAAE,CAAO,oBAA2C,EAAE,EAAE;QAC3E,OAAO,MAAM,OAAO,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;IACjE,CAAC,CAAA;IACD,2DAA2D;IAC3D,wBAAwB,EAAE,CAAO,2BAAwD,EAAE,EAAE;QAC3F,OAAO,MAAM,OAAO,CAAC,sBAAsB,CAAC,2BAA2B,CAAC,CAAC;IAC3E,CAAC,CAAA;CACF,CAAC,CACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CommonCallingHandlers } from '@internal/calling-component-bindings';\nimport { CommonProperties, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { ReactElement } from 'react';\nimport memoizeOne from 'memoize-one';\nimport { CommonCallAdapter } from '..';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isCameraOn } from '../utils';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { DtmfTone } from '@azure/communication-calling';\n/* @conditional-compile-remove(video-background-effects) */\nimport { BackgroundBlurConfig, BackgroundReplacementConfig } from '@azure/communication-calling-effects';\n\n/**\n * @private\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport const useHandlers = <PropsT>(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _component: (props: PropsT) => ReactElement | null\n): Pick<CommonCallingHandlers, CommonProperties<CommonCallingHandlers, PropsT>> => {\n return createCompositeHandlers(useAdapter());\n};\n\nconst createCompositeHandlers = memoizeOne(\n (adapter: CommonCallAdapter): CommonCallingHandlers => ({\n onCreateLocalStreamView: async (options) => {\n return await adapter.createStreamView(undefined, options);\n },\n onCreateRemoteStreamView: async (userId, options) => {\n return await adapter.createStreamView(userId, options);\n },\n onHangUp: async (forEveryone?: boolean) => {\n await adapter.leaveCall(forEveryone);\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onToggleHold: async () => {\n return adapter.getState().call?.state === 'LocalHold' ? await adapter.resumeCall() : await adapter.holdCall();\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant: async (participant, options?) => {\n return await adapter.addParticipant(participant, options);\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onSendDtmfTone: async (dtmfTone: DtmfTone) => {\n await adapter.sendDtmfTone(dtmfTone);\n },\n onRemoveParticipant: async (userId) => {\n await adapter.removeParticipant(userId);\n },\n onSelectCamera: async (deviceInfo, options) => {\n await adapter.setCamera(deviceInfo, options);\n },\n onSelectMicrophone: async (deviceInfo) => {\n await adapter.setMicrophone(deviceInfo);\n },\n onSelectSpeaker: async (deviceInfo) => {\n await adapter.setSpeaker(deviceInfo);\n },\n onStartCall: (participants, options?) => {\n const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));\n return adapter.startCall(rawIds, options);\n },\n onStartScreenShare: async () => {\n await adapter.startScreenShare();\n },\n onStopScreenShare: async () => {\n await adapter.stopScreenShare();\n },\n onToggleCamera: async (options) => {\n isCameraOn(adapter.getState()) ? await adapter.stopCamera() : await adapter.startCamera(options);\n },\n onToggleMicrophone: async () => {\n return adapter.getState().call?.isMuted ? await adapter.unmute() : await adapter.mute();\n },\n onToggleScreenShare: async () => {\n return adapter.getState().call?.isScreenSharingOn\n ? await adapter.stopScreenShare()\n : await adapter.startScreenShare();\n },\n onStartLocalVideo: async () => {\n if (adapter.getState().call) {\n return adapter.startCamera();\n }\n },\n onDisposeLocalStreamView: async () => {\n return adapter.disposeStreamView();\n },\n onDisposeRemoteStreamView: async (userId) => {\n return adapter.disposeStreamView(userId);\n },\n /* @conditional-compile-remove(call-readiness) */\n askDevicePermission: async (constrain) => {\n return adapter.askDevicePermission(constrain);\n },\n /* @conditional-compile-remove(video-background-effects) */\n onRemoveVideoBackgroundEffects: async () => {\n return await adapter.stopVideoBackgroundEffect();\n },\n /* @conditional-compile-remove(video-background-effects) */\n onBlurVideoBackground: async (backgroundBlurConfig?: BackgroundBlurConfig) => {\n return await adapter.blurVideoBackground(backgroundBlurConfig);\n },\n /* @conditional-compile-remove(video-background-effects) */\n onReplaceVideoBackground: async (backgroundReplacementConfig: BackgroundReplacementConfig) => {\n return await adapter.replaceVideoBackground(backgroundReplacementConfig);\n }\n })\n);\n\"../../../../../calling-component-bindings/src\"\"../../../../../acs-ui-common/src\""]}
@@ -11,5 +11,6 @@ export type { TeamsCallAdapter, TeamsCallAdapterArgs, TeamsAdapterOptions, OnFet
11
11
  export type { AzureCommunicationCallAdapterArgs, CallAdapterLocator, CommonCallAdapter, CallAdapterCallOperations } from './adapter';
12
12
  export type { AzureCommunicationCallAdapterOptions } from './adapter';
13
13
  export type { CallParticipantsLocator } from './adapter';
14
+ export type { VideoBackgroundImage } from './adapter/CallAdapter';
14
15
  export type { CallAdapter, CallAdapterCallEndedEvent, CallAdapterCallManagement, CallAdapterClientState, CallAdapterDeviceManagement, CallAdapterState, CallAdapterSubscribers, CallAdapterUiState, CallCompositePage, CallEndedListener, CallIdChangedListener, DiagnosticChangedEventListner, DisplayNameChangedListener, IsLocalScreenSharingActiveChangedListener, IsMutedChangedListener, IsSpeakingChangedListener, MediaDiagnosticChangedEvent, NetworkDiagnosticChangedEvent, ParticipantsJoinedListener, ParticipantsLeftListener } from './adapter';
15
16
  //# sourceMappingURL=index.d.ts.map