@azure/communication-react 1.4.2-alpha-202212010027.0 → 1.4.2-alpha-202301052137

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 (250) hide show
  1. package/CHANGELOG.stable.md +10 -1
  2. package/dist/communication-react.d.ts +319 -275
  3. package/dist/dist-cjs/communication-react/index.js +2528 -1644
  4. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/identifier.js +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/identifier.js.map +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  8. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -0
  10. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -0
  11. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +21 -10
  13. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  15. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -7
  16. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +12 -0
  18. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +20 -2
  19. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +2 -13
  21. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  22. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -1
  23. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +14 -0
  24. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  25. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -1
  26. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +11 -4
  27. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  28. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +6 -2
  29. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  30. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +2 -2
  31. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  32. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.d.ts +19 -0
  33. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.js +43 -0
  34. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.js.map +1 -0
  35. package/dist/dist-esm/communication-react/src/index.d.ts +4 -4
  36. package/dist/dist-esm/communication-react/src/index.js +3 -3
  37. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  38. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +105 -0
  39. package/dist/dist-esm/react-components/src/components/DevicePermissions/{DomainPermissions.js → SitePermissions.js} +28 -22
  40. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +1 -0
  41. package/dist/dist-esm/react-components/src/components/DevicePermissions/{DomainPermissionsScaffolding.d.ts → SitePermissionsScaffolding.d.ts} +12 -12
  42. package/dist/dist-esm/react-components/src/components/DevicePermissions/{DomainPermissionsScaffolding.js → SitePermissionsScaffolding.js} +4 -4
  43. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +1 -0
  44. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +8 -0
  45. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  46. package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +8 -0
  47. package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
  48. package/dist/dist-esm/react-components/src/components/MessageThread.js +6 -4
  49. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  50. package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +4 -0
  51. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +25 -4
  52. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  53. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +9 -4
  54. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +64 -7
  55. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  56. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.d.ts +2 -2
  57. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +12 -1
  58. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  59. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.d.ts +6 -2
  60. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +14 -2
  61. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  62. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.d.ts +16 -5
  63. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +14 -11
  64. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  65. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.d.ts +32 -0
  66. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +25 -0
  67. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -0
  68. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +16 -0
  69. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +45 -0
  70. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -0
  71. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.d.ts +12 -0
  72. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +41 -0
  73. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -0
  74. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +25 -0
  75. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +61 -0
  76. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -0
  77. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +34 -0
  78. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js +4 -0
  79. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -0
  80. package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.d.ts +25 -0
  81. package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.js +62 -0
  82. package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.js.map +1 -0
  83. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.d.ts +14 -0
  84. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +20 -0
  85. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +1 -0
  86. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.d.ts +6 -0
  87. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.js +9 -0
  88. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.js.map +1 -0
  89. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +62 -0
  90. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +118 -0
  91. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -0
  92. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.d.ts +14 -0
  93. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.js +28 -0
  94. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.js.map +1 -0
  95. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.d.ts +9 -0
  96. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.js +22 -0
  97. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.js.map +1 -0
  98. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.d.ts +45 -0
  99. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +57 -0
  100. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -0
  101. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.d.ts +2 -2
  102. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js +7 -2
  103. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js.map +1 -1
  104. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.d.ts +21 -0
  105. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +72 -0
  106. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -0
  107. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +36 -0
  108. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +116 -0
  109. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -0
  110. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +25 -0
  111. package/dist/dist-esm/react-components/src/components/VideoGallery.js +105 -122
  112. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/VideoTile.js +15 -16
  114. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  115. package/dist/dist-esm/react-components/src/components/index.d.ts +5 -3
  116. package/dist/dist-esm/react-components/src/components/index.js +2 -1
  117. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  118. package/dist/dist-esm/react-components/src/components/styles/{DomainPermissions.styles.d.ts → SitePermissions.styles.d.ts} +1 -1
  119. package/dist/dist-esm/react-components/src/components/styles/{DomainPermissions.styles.js → SitePermissions.styles.js} +1 -1
  120. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +1 -0
  121. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +7 -3
  122. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +23 -9
  123. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +1 -1
  124. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.d.ts +1 -95
  125. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +3 -138
  126. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
  127. package/dist/dist-esm/react-components/src/components/utils.js +4 -0
  128. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  129. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +28 -19
  130. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  131. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +1 -1
  132. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +1 -1
  133. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +46 -15
  134. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +1 -1
  135. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +1 -1
  136. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +1 -1
  137. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +1 -1
  138. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +1 -1
  139. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +1 -1
  140. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +1 -1
  141. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +1 -1
  142. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +1 -1
  143. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +1 -1
  144. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +1 -1
  145. package/dist/dist-esm/react-components/src/theming/icons.d.ts +9 -5
  146. package/dist/dist-esm/react-components/src/theming/icons.js +26 -18
  147. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  148. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +1 -1
  149. package/dist/dist-esm/react-components/src/theming/icons.styles.js +1 -1
  150. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -1
  151. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +2 -0
  152. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  153. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +7 -11
  154. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +9 -9
  155. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  156. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +12 -0
  157. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  158. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +16 -10
  159. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +83 -37
  160. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  161. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +6 -17
  162. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  163. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +2 -2
  164. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +1 -1
  165. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  166. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +1 -0
  167. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +17 -16
  168. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  169. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +5 -4
  170. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +68 -28
  171. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -1
  172. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +16 -0
  173. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageCameraDropdown.js → ConfigurationPageCameraDropdown.js} +4 -6
  174. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -0
  175. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageErrorBar.d.ts → ConfigurationPageErrorBar.d.ts} +3 -4
  176. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageErrorBar.js → ConfigurationPageErrorBar.js} +4 -6
  177. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -0
  178. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +16 -0
  179. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageMicDropdown.js → ConfigurationPageMicDropdown.js} +4 -8
  180. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -0
  181. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js +1 -0
  182. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js.map +1 -1
  183. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  184. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +16 -14
  185. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  186. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +8 -3
  187. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
  188. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +1 -0
  189. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +4 -2
  190. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  191. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +1 -1
  192. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  193. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +11 -3
  194. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  195. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +3 -4
  196. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +1 -1
  197. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  198. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +4 -2
  199. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  200. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +3 -3
  201. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +46 -27
  202. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  203. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +19 -3
  204. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +1 -1
  205. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.d.ts +4 -0
  206. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js +8 -0
  207. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js.map +1 -1
  208. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +20 -4
  209. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +69 -25
  210. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  211. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +16 -7
  212. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +22 -10
  213. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  214. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +2 -0
  215. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
  216. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -0
  217. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +6 -0
  218. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  219. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +4 -0
  220. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  221. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -0
  222. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +7 -1
  223. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  224. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +8 -0
  225. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  226. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +4 -0
  227. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  228. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +26 -3
  229. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  230. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.d.ts +8 -0
  231. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js +40 -0
  232. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js.map +1 -0
  233. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +1 -1
  234. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  235. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +9 -5
  236. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js +1 -0
  237. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js.map +1 -1
  238. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js +2 -1
  239. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js.map +1 -1
  240. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +3 -0
  241. package/package.json +9 -9
  242. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.d.ts +0 -101
  243. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js.map +0 -1
  244. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.js.map +0 -1
  245. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js.map +0 -1
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.d.ts +0 -17
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js.map +0 -1
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js.map +0 -1
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.d.ts +0 -17
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js.map +0 -1
@@ -5,7 +5,7 @@ const COMMUNICATION_USER_PREFIX = '8:acs:';
5
5
  const PHONE_NUMBER_PREFIX = '4:';
6
6
  const TEAMS_DOD_PREFIX = '8:dod:';
7
7
  const TEAMS_GCCH_PREFIX = '8:gcch:';
8
- const TEAMS_USER_PREFIX = '8:origid:';
8
+ const TEAMS_USER_PREFIX = '8:orgid:';
9
9
  const TEAMS_VISITOR_PREFIX = '8:teamsvisitor:';
10
10
  /**
11
11
  * A string representation of a {@link @azure/communication-common#CommunicationIdentifier}.
@@ -1 +1 @@
1
- {"version":3,"file":"identifier.js","sourceRoot":"","sources":["../../../../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EAAoC,EAA2B,EAAE;IAC1G,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;QAC1B,OAAO,+BAA+B,CAAC,EAAE,CAAC,CAAC;KAC5C;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isPhoneNumberIdentifier\n} from '@azure/communication-common';\n\nconst COMMUNICATION_USER_PREFIX = '8:acs:';\nconst PHONE_NUMBER_PREFIX = '4:';\nconst TEAMS_DOD_PREFIX = '8:dod:';\nconst TEAMS_GCCH_PREFIX = '8:gcch:';\nconst TEAMS_USER_PREFIX = '8:origid:';\nconst TEAMS_VISITOR_PREFIX = '8:teamsvisitor:';\n\n/**\n * A string representation of a {@link @azure/communication-common#CommunicationIdentifier}.\n *\n * This string representation of CommunicationIdentifier is guaranteed to be stable for\n * a unique Communication user. Thus,\n * - it can be used to persist a user's identity in external databases.\n * - it can be used as keys into a Map to store data for the user.\n *\n * @public\n */\nexport const toFlatCommunicationIdentifier = (identifier: CommunicationIdentifier): string => {\n if (isCommunicationUserIdentifier(identifier)) {\n return identifier.communicationUserId;\n }\n if (isMicrosoftTeamsUserIdentifier(identifier)) {\n if (identifier.isAnonymous) {\n return TEAMS_VISITOR_PREFIX + identifier.microsoftTeamsUserId;\n }\n if (identifier.cloud === 'dod') {\n return TEAMS_DOD_PREFIX + identifier.microsoftTeamsUserId;\n }\n if (identifier.cloud === 'gcch') {\n return TEAMS_GCCH_PREFIX + identifier.microsoftTeamsUserId;\n }\n return TEAMS_USER_PREFIX + identifier.microsoftTeamsUserId;\n }\n if (isPhoneNumberIdentifier(identifier)) {\n return PHONE_NUMBER_PREFIX + identifier.phoneNumber;\n }\n return identifier.id;\n};\n\n/**\n * Reverse operation of {@link toFlatCommunicationIdentifier}.\n *\n * @public\n */\nexport const fromFlatCommunicationIdentifier = (id: string): CommunicationIdentifier => {\n if (id.startsWith(COMMUNICATION_USER_PREFIX)) {\n // The prefix is preserved for this variant of the identifier.\n return { communicationUserId: id };\n }\n if (id.startsWith(PHONE_NUMBER_PREFIX) || id.startsWith('+')) {\n const isPhoneNumber = id.startsWith(PHONE_NUMBER_PREFIX) ? id.replace(PHONE_NUMBER_PREFIX, '') : id;\n return { phoneNumber: isPhoneNumber };\n }\n if (id.startsWith(TEAMS_USER_PREFIX)) {\n return { microsoftTeamsUserId: id.replace(TEAMS_USER_PREFIX, '') };\n }\n if (id.startsWith(TEAMS_DOD_PREFIX)) {\n return { microsoftTeamsUserId: id.replace(TEAMS_DOD_PREFIX, ''), cloud: 'dod' };\n }\n if (id.startsWith(TEAMS_GCCH_PREFIX)) {\n return { microsoftTeamsUserId: id.replace(TEAMS_GCCH_PREFIX, ''), cloud: 'gcch' };\n }\n if (id.startsWith(TEAMS_VISITOR_PREFIX)) {\n return { microsoftTeamsUserId: id.replace(TEAMS_VISITOR_PREFIX, ''), isAnonymous: true };\n }\n return { id };\n};\n\n/**\n * Returns a CommunicationIdentifier.\n * @internal\n */\nexport const _toCommunicationIdentifier = (id: string | CommunicationIdentifier): CommunicationIdentifier => {\n if (typeof id === 'string') {\n return fromFlatCommunicationIdentifier(id);\n }\n return id;\n};\n"]}
1
+ {"version":3,"file":"identifier.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/identifier.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAEL,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EACxB,MAAM,6BAA6B,CAAC;AAErC,MAAM,yBAAyB,GAAG,QAAQ,CAAC;AAC3C,MAAM,mBAAmB,GAAG,IAAI,CAAC;AACjC,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAClC,MAAM,iBAAiB,GAAG,SAAS,CAAC;AACpC,MAAM,iBAAiB,GAAG,UAAU,CAAC;AACrC,MAAM,oBAAoB,GAAG,iBAA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AO,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;KACvC;IACD,IAAI,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE;QACpC,OAAO,EAAE,oBAAoB,EAAE,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,EAAE,CAAC;KACpE;IACD,IAAI,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;QACnC,OAAO,EAAE,oBAAoB,EAAE,EAAE,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;KACjF;IACD,IAAI,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE;QACpC,OAAO,EAAE,oBAAoB,EAAE,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;KACnF;IACD,IAAI,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE;QACvC,OAAO,EAAE,oBAAoB,EAAE,EAAE,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;KAC1F;IACD,OAAO,EAAE,EAAE,EAAE,CAAC;AAChB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EAAoC,EAA2B,EAAE;IAC1G,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;QAC1B,OAAO,+BAA+B,CAAC,EAAE,CAAC,CAAC;KAC5C;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isPhoneNumberIdentifier\n} from '@azure/communication-common';\n\nconst COMMUNICATION_USER_PREFIX = '8:acs:';\nconst PHONE_NUMBER_PREFIX = '4:';\nconst TEAMS_DOD_PREFIX = '8:dod:';\nconst TEAMS_GCCH_PREFIX = '8:gcch:';\nconst TEAMS_USER_PREFIX = '8:orgid:';\nconst TEAMS_VISITOR_PREFIX = '8:teamsvisitor:';\n\n/**\n * A string representation of a {@link @azure/communication-common#CommunicationIdentifier}.\n *\n * This string representation of CommunicationIdentifier is guaranteed to be stable for\n * a unique Communication user. Thus,\n * - it can be used to persist a user's identity in external databases.\n * - it can be used as keys into a Map to store data for the user.\n *\n * @public\n */\nexport const toFlatCommunicationIdentifier = (identifier: CommunicationIdentifier): string => {\n if (isCommunicationUserIdentifier(identifier)) {\n return identifier.communicationUserId;\n }\n if (isMicrosoftTeamsUserIdentifier(identifier)) {\n if (identifier.isAnonymous) {\n return TEAMS_VISITOR_PREFIX + identifier.microsoftTeamsUserId;\n }\n if (identifier.cloud === 'dod') {\n return TEAMS_DOD_PREFIX + identifier.microsoftTeamsUserId;\n }\n if (identifier.cloud === 'gcch') {\n return TEAMS_GCCH_PREFIX + identifier.microsoftTeamsUserId;\n }\n return TEAMS_USER_PREFIX + identifier.microsoftTeamsUserId;\n }\n if (isPhoneNumberIdentifier(identifier)) {\n return PHONE_NUMBER_PREFIX + identifier.phoneNumber;\n }\n return identifier.id;\n};\n\n/**\n * Reverse operation of {@link toFlatCommunicationIdentifier}.\n *\n * @public\n */\nexport const fromFlatCommunicationIdentifier = (id: string): CommunicationIdentifier => {\n if (id.startsWith(COMMUNICATION_USER_PREFIX)) {\n // The prefix is preserved for this variant of the identifier.\n return { communicationUserId: id };\n }\n if (id.startsWith(PHONE_NUMBER_PREFIX) || id.startsWith('+')) {\n const isPhoneNumber = id.startsWith(PHONE_NUMBER_PREFIX) ? id.replace(PHONE_NUMBER_PREFIX, '') : id;\n return { phoneNumber: isPhoneNumber };\n }\n if (id.startsWith(TEAMS_USER_PREFIX)) {\n return { microsoftTeamsUserId: id.replace(TEAMS_USER_PREFIX, '') };\n }\n if (id.startsWith(TEAMS_DOD_PREFIX)) {\n return { microsoftTeamsUserId: id.replace(TEAMS_DOD_PREFIX, ''), cloud: 'dod' };\n }\n if (id.startsWith(TEAMS_GCCH_PREFIX)) {\n return { microsoftTeamsUserId: id.replace(TEAMS_GCCH_PREFIX, ''), cloud: 'gcch' };\n }\n if (id.startsWith(TEAMS_VISITOR_PREFIX)) {\n return { microsoftTeamsUserId: id.replace(TEAMS_VISITOR_PREFIX, ''), isAnonymous: true };\n }\n return { id };\n};\n\n/**\n * Returns a CommunicationIdentifier.\n * @internal\n */\nexport const _toCommunicationIdentifier = (id: string | CommunicationIdentifier): CommunicationIdentifier => {\n if (typeof id === 'string') {\n return fromFlatCommunicationIdentifier(id);\n }\n return id;\n};\n"]}
@@ -2,5 +2,5 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  // GENERATED FILE. DO NOT EDIT MANUALLY.
5
- module.exports = '1.4.2-alpha-202212010027.0';
5
+ module.exports = '1.4.2-alpha-202301052137';
6
6
  //# sourceMappingURL=telemetryVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.4.2-alpha-202212010027.0';\n"]}
1
+ {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.4.2-alpha-202301052137';\n"]}
@@ -1,4 +1,5 @@
1
1
  import { DominantSpeakersInfo } from '@azure/communication-calling';
2
+ import { EnvironmentInfo } from '@azure/communication-calling';
2
3
  import { ParticipantRole } from '@azure/communication-calling';
3
4
  import { CallClientState, DeviceManagerState, RemoteParticipantState, LocalVideoStreamState, CallErrors, DiagnosticsCallFeatureState } from "../../calling-stateful-client/src";
4
5
  /**
@@ -67,4 +68,8 @@ export declare const getDiagnostics: (state: CallClientState, props: CallingBase
67
68
  * @private
68
69
  */
69
70
  export declare const getCallState: (state: CallClientState, props: CallingBaseSelectorProps) => string;
71
+ /**
72
+ * @private
73
+ */
74
+ export declare const getEnvironmentInfo: (state: CallClientState) => undefined | /* @conditional-compile-remove(unsupported-browser) */ EnvironmentInfo;
70
75
  //# sourceMappingURL=baseSelectors.d.ts.map
@@ -60,4 +60,12 @@ export const getDiagnostics = (state, props) => { var _a; return (_a = state.cal
60
60
  * @private
61
61
  */
62
62
  export const getCallState = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.state; };
63
+ /**
64
+ * @private
65
+ */
66
+ export const getEnvironmentInfo = (state) => {
67
+ /* @conditional-compile-remove(unsupported-browser) */
68
+ return state.environmentInfo;
69
+ return undefined;
70
+ };
63
71
  //# sourceMappingURL=baseSelectors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"baseSelectors.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/baseSelectors.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAmBxE;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAsB,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;AAEpG,wCAAwC;AACxC;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAsB,EAAE,KAA+B,EAA+B,EAAE,WAC9G,OAAA,MAAA,KAAK,CAAC,KAAK,CAAC,K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tB,KAA+B,EACX,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,4BAA4B,CAAA,EAAA,CAAC;AAEjF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAsB,EAAsB,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,SAAS,0CAAE,WAAW,CAAA,EAAA,CAAC;AAE3G;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAsB,EAAU,EAAE,CAAC,6BAA6B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAE7G;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAsB,EAAc,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC;AAE1F;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,KAAsB,EACtB,KAA+B,EACU,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,WAAW,CAAA,EAAA,CAAC;AAErF,6CAA6C;AAC7C;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAsB,EAAE,KAA+B,EAAU,EAAE,WAC9F,OAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,KAAK,CAAA,EAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { DominantSpeakersInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(rooms) */\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallClientState,\n DeviceManagerState,\n RemoteParticipantState,\n LocalVideoStreamState,\n CallErrors,\n DiagnosticsCallFeatureState\n} from '@internal/calling-stateful-client';\n\n/**\n * Common props used to reference calling declarative client state.\n *\n * @public\n */\nexport type CallingBaseSelectorProps = {\n callId: string;\n};\n\n/**\n * @private\n */\nexport const getDeviceManager = (state: CallClientState): DeviceManagerState => state.deviceManager;\n\n/* @conditional-compile-remove(rooms) */\n/**\n * @private\n */\nexport const getRole = (state: CallClientState, props: CallingBaseSelectorProps): ParticipantRole | undefined =>\n state.calls[props.callId]?.role;\n\n/**\n * @private\n */\nexport const getCallExists = (state: CallClientState, props: CallingBaseSelectorProps): boolean =>\n !!state.calls[props.callId];\n\n/**\n * @private\n */\nexport const getDominantSpeakers = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): undefined | DominantSpeakersInfo => state.calls[props.callId]?.dominantSpeakers;\n\n/**\n * @private\n */\nexport const getRemoteParticipants = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n):\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined => {\n return state.calls[props.callId]?.remoteParticipants;\n};\n\n/**\n * @private\n */\nexport const getIsScreenSharingOn = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined =>\n state.calls[props.callId]?.isScreenSharingOn;\n\n/**\n * @private\n */\nexport const getIsMuted = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined =>\n state.calls[props.callId]?.isMuted;\n\n/**\n * @private\n */\nexport const getLocalVideoStreams = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): LocalVideoStreamState[] | undefined => state.calls[props.callId]?.localVideoStreams;\n\n/**\n * @private\n */\nexport const getScreenShareRemoteParticipant = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): string | undefined => state.calls[props.callId]?.screenShareRemoteParticipant;\n\n/**\n * @private\n */\nexport const getDisplayName = (state: CallClientState): string | undefined => state.callAgent?.displayName;\n\n/**\n * @private\n */\nexport const getIdentifier = (state: CallClientState): string => toFlatCommunicationIdentifier(state.userId);\n\n/**\n * @private\n */\nexport const getLatestErrors = (state: CallClientState): CallErrors => state.latestErrors;\n\n/**\n * @private\n */\nexport const getDiagnostics = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): DiagnosticsCallFeatureState | undefined => state.calls[props.callId]?.diagnostics;\n\n/* @conditional-compile-remove(PSTN-calls) */\n/**\n * @private\n */\nexport const getCallState = (state: CallClientState, props: CallingBaseSelectorProps): string =>\n state.calls[props.callId]?.state;\n\"../../acs-ui-common/src\"\"../../calling-stateful-client/src\""]}
1
+ {"version":3,"file":"baseSelectors.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/baseSelectors.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAmBxE;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAsB,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;AAEpG,wCAAwC;AACxC;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAsB,EAAE,KAA+B,EAA+B,EAAE,WAC9G,OAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,IAAI,CAAA,EAAA,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAsB,EAAE,KAA+B,EAAW,EAAE,CAChG,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAE9B;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,KAAsB,EACtB,KAA+B,EACG,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,gBAAgB,CAAA,EAAA,CAAC;AAEnF;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,KAAsB,EACtB,KAA+B,EAKnB,EAAE;;IACd,OAAO,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,kBAAkB,CAAC;AACvD,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC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,WAAW,CAAA,EAAA,CAAC;AAErF,6CAA6C;AAC7C;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAsB,EAAE,KAA+B,EAAU,EAAE,WAC9F,OAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,KAAK,CAAA,EAAA,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,KAAsB,EAC8D,EAAE;IACtF,sDAAsD;IACtD,OAAO,KAAK,CAAC,eAAe,CAAC;IAC7B,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { DominantSpeakersInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(rooms) */\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallClientState,\n DeviceManagerState,\n RemoteParticipantState,\n LocalVideoStreamState,\n CallErrors,\n DiagnosticsCallFeatureState\n} from '@internal/calling-stateful-client';\n\n/**\n * Common props used to reference calling declarative client state.\n *\n * @public\n */\nexport type CallingBaseSelectorProps = {\n callId: string;\n};\n\n/**\n * @private\n */\nexport const getDeviceManager = (state: CallClientState): DeviceManagerState => state.deviceManager;\n\n/* @conditional-compile-remove(rooms) */\n/**\n * @private\n */\nexport const getRole = (state: CallClientState, props: CallingBaseSelectorProps): ParticipantRole | undefined =>\n state.calls[props.callId]?.role;\n\n/**\n * @private\n */\nexport const getCallExists = (state: CallClientState, props: CallingBaseSelectorProps): boolean =>\n !!state.calls[props.callId];\n\n/**\n * @private\n */\nexport const getDominantSpeakers = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): undefined | DominantSpeakersInfo => state.calls[props.callId]?.dominantSpeakers;\n\n/**\n * @private\n */\nexport const getRemoteParticipants = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n):\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined => {\n return state.calls[props.callId]?.remoteParticipants;\n};\n\n/**\n * @private\n */\nexport const getIsScreenSharingOn = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined =>\n state.calls[props.callId]?.isScreenSharingOn;\n\n/**\n * @private\n */\nexport const getIsMuted = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined =>\n state.calls[props.callId]?.isMuted;\n\n/**\n * @private\n */\nexport const getLocalVideoStreams = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): LocalVideoStreamState[] | undefined => state.calls[props.callId]?.localVideoStreams;\n\n/**\n * @private\n */\nexport const getScreenShareRemoteParticipant = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): string | undefined => state.calls[props.callId]?.screenShareRemoteParticipant;\n\n/**\n * @private\n */\nexport const getDisplayName = (state: CallClientState): string | undefined => state.callAgent?.displayName;\n\n/**\n * @private\n */\nexport const getIdentifier = (state: CallClientState): string => toFlatCommunicationIdentifier(state.userId);\n\n/**\n * @private\n */\nexport const getLatestErrors = (state: CallClientState): CallErrors => state.latestErrors;\n\n/**\n * @private\n */\nexport const getDiagnostics = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): DiagnosticsCallFeatureState | undefined => state.calls[props.callId]?.diagnostics;\n\n/* @conditional-compile-remove(PSTN-calls) */\n/**\n * @private\n */\nexport const getCallState = (state: CallClientState, props: CallingBaseSelectorProps): string =>\n state.calls[props.callId]?.state;\n\n/**\n * @private\n */\nexport const getEnvironmentInfo = (\n state: CallClientState\n): undefined | /* @conditional-compile-remove(unsupported-browser) */ EnvironmentInfo => {\n /* @conditional-compile-remove(unsupported-browser) */\n return state.environmentInfo;\n return undefined;\n};\n\"../../acs-ui-common/src\"\"../../calling-stateful-client/src\""]}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
- import { getDeviceManager, getDiagnostics, getLatestErrors } from './baseSelectors';
3
+ import { getDeviceManager, getDiagnostics, getLatestErrors, getEnvironmentInfo } from './baseSelectors';
4
4
  import { createSelector } from 'reselect';
5
5
  import { DiagnosticQuality } from '@azure/communication-calling';
6
6
  /**
@@ -15,8 +15,8 @@ import { DiagnosticQuality } from '@azure/communication-calling';
15
15
  *
16
16
  * @public
17
17
  */
18
- export const errorBarSelector = createSelector([getLatestErrors, getDiagnostics, getDeviceManager], (latestErrors, diagnostics, deviceManager) => {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
18
+ export const errorBarSelector = createSelector([getLatestErrors, getDiagnostics, getDeviceManager, getEnvironmentInfo], (latestErrors, diagnostics, deviceManager, environmentInfo) => {
19
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
20
20
  // The order in which the errors are returned is significant: The `ErrorBar` shows errors on the UI in that order.
21
21
  // There are several options for the ordering:
22
22
  // - Sorted by when the errors happened (latest first / oldest first).
@@ -25,6 +25,11 @@ export const errorBarSelector = createSelector([getLatestErrors, getDiagnostics,
25
25
  // We chose to stable sort by error type: We intend to show only a small number of errors on the UI and we do not
26
26
  // have timestamps for errors.
27
27
  const activeErrorMessages = [];
28
+ const isSafari = () => {
29
+ /* @conditional-compile-remove(unsupported-browser) */
30
+ return (environmentInfo === null || environmentInfo === void 0 ? void 0 : environmentInfo.environment.browser) === 'safari';
31
+ return /^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent);
32
+ };
28
33
  // Errors reported via diagnostics are more reliable than from API method failures, so process those first.
29
34
  if (((_a = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.network.latest.networkReceiveQuality) === null || _a === void 0 ? void 0 : _a.value) === DiagnosticQuality.Bad ||
30
35
  ((_b = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.network.latest.networkReceiveQuality) === null || _b === void 0 ? void 0 : _b.value) === DiagnosticQuality.Poor) {
@@ -36,10 +41,13 @@ export const errorBarSelector = createSelector([getLatestErrors, getDiagnostics,
36
41
  if (((_d = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.noMicrophoneDevicesEnumerated) === null || _d === void 0 ? void 0 : _d.value) === true) {
37
42
  activeErrorMessages.push({ type: 'callNoMicrophoneFound' });
38
43
  }
39
- if (((_e = deviceManager.deviceAccess) === null || _e === void 0 ? void 0 : _e.audio) === false) {
44
+ if (((_e = deviceManager.deviceAccess) === null || _e === void 0 ? void 0 : _e.audio) === false && isSafari()) {
45
+ activeErrorMessages.push({ type: 'callMicrophoneAccessDeniedSafari' });
46
+ }
47
+ if (((_f = deviceManager.deviceAccess) === null || _f === void 0 ? void 0 : _f.audio) === false && !isSafari()) {
40
48
  activeErrorMessages.push({ type: 'callMicrophoneAccessDenied' });
41
49
  }
42
- if (((_f = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.microphonePermissionDenied) === null || _f === void 0 ? void 0 : _f.value) === true) {
50
+ if (((_g = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.microphonePermissionDenied) === null || _g === void 0 ? void 0 : _g.value) === true) {
43
51
  activeErrorMessages.push({ type: 'callMacOsMicrophoneAccessDenied' });
44
52
  }
45
53
  const microphoneMuteUnexpectedlyDiagnostic = (diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.microphoneMuteUnexpectedly) || (diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.microphoneNotFunctioning);
@@ -64,18 +72,21 @@ export const errorBarSelector = createSelector([getLatestErrors, getDiagnostics,
64
72
  activeErrorMessages.push({ type: 'callVideoRecoveredBySystem' });
65
73
  }
66
74
  }
67
- if (((_g = deviceManager.deviceAccess) === null || _g === void 0 ? void 0 : _g.video) === false) {
75
+ if (((_h = deviceManager.deviceAccess) === null || _h === void 0 ? void 0 : _h.video) === false && isSafari()) {
76
+ activeErrorMessages.push({ type: 'callCameraAccessDeniedSafari' });
77
+ }
78
+ else if (((_j = deviceManager.deviceAccess) === null || _j === void 0 ? void 0 : _j.video) === false) {
68
79
  activeErrorMessages.push({ type: 'callCameraAccessDenied' });
69
80
  }
70
81
  else {
71
- if (((_h = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.cameraFreeze) === null || _h === void 0 ? void 0 : _h.value) === true) {
82
+ if (((_k = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.cameraFreeze) === null || _k === void 0 ? void 0 : _k.value) === true) {
72
83
  activeErrorMessages.push({ type: 'callCameraAlreadyInUse' });
73
84
  }
74
85
  }
75
- if (((_j = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.cameraPermissionDenied) === null || _j === void 0 ? void 0 : _j.value) === true) {
86
+ if (((_l = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.cameraPermissionDenied) === null || _l === void 0 ? void 0 : _l.value) === true) {
76
87
  activeErrorMessages.push({ type: 'callMacOsCameraAccessDenied' });
77
88
  }
78
- if (((_k = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.screenshareRecordingDisabled) === null || _k === void 0 ? void 0 : _k.value) === true) {
89
+ if (((_m = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.screenshareRecordingDisabled) === null || _m === void 0 ? void 0 : _m.value) === true) {
79
90
  activeErrorMessages.push({ type: 'callMacOsScreenShareAccessDenied' });
80
91
  }
81
92
  // Prefer to show errors with privacy implications.
@@ -84,7 +95,7 @@ export const errorBarSelector = createSelector([getLatestErrors, getDiagnostics,
84
95
  appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopScreenSharing', 'stopScreenShareGeneric');
85
96
  appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'startVideoGeneric');
86
97
  appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');
87
- if (((_l = latestErrors['CallAgent.join']) === null || _l === void 0 ? void 0 : _l.message) === 'CallAgent.join: Invalid meeting link') {
98
+ if (((_o = latestErrors['CallAgent.join']) === null || _o === void 0 ? void 0 : _o.message) === 'CallAgent.join: Invalid meeting link') {
88
99
  appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallInvalidMeetingLink');
89
100
  }
90
101
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"errorBarSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/errorBarSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAA4B,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE9G,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAcjE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAqB,cAAc,CAC9D,CAAC,eAAe,EAAE,cAAc,EAAE,gBAAgB,CAAC,EACnD,CAAC,YAAwB,EAAE,WAAW,EAAE,aAAa,EAAiD,EAAE;;IACtG,kHAAkH;IAClH,8CAA8C;IAC9C,wEAAwE;IACxE,iCAAiC;IACjC,EAAE;IACF,iHAAiH;IACjH,8BAA8B;IAC9B,MAAM,mBAAmB,GAAyB,EAAE,CAAC;IAErD,2GAA2G;IAC3G,IACE,CAAA,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,0CAAE,KAAK,MAAK,iBAAiB,CAAC,GAAG;QAClF,CAAA,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,0CAAE,KAAK,MAAK,iBAAiB,CAAC,IAAI,EACnF;QACA,mBAAmB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC,CAAC;KAC7D;IACD,IAAI,CAAA,MAAA,WAA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Aa,GAAG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CallingBaseSelectorProps, getDeviceManager, getDiagnostics, getLatestErrors } from './baseSelectors';\nimport { ActiveErrorMessage, ErrorType } from '@internal/react-components';\nimport { createSelector } from 'reselect';\nimport { CallClientState, CallErrors, CallErrorTarget } from '@internal/calling-stateful-client';\nimport { DiagnosticQuality } from '@azure/communication-calling';\n\n/**\n * Selector type for {@link ErrorBar} component.\n *\n * @public\n */\nexport type ErrorBarSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n activeErrorMessages: ActiveErrorMessage[];\n};\n\n/**\n * Select the first 3 active errors from the state for the `ErrorBar` component.\n *\n * In case there are many errors, only the first three errors are returned to avoid\n * filling up the UI with too many errors.\n *\n * Invariants:\n * - `ErrorType` is never repeated in the returned errors.\n * - Errors are returned in a fixed order by `ErrorType`.\n *\n * @public\n */\nexport const errorBarSelector: ErrorBarSelector = createSelector(\n [getLatestErrors, getDiagnostics, getDeviceManager],\n (latestErrors: CallErrors, diagnostics, deviceManager): { activeErrorMessages: ActiveErrorMessage[] } => {\n // The order in which the errors are returned is significant: The `ErrorBar` shows errors on the UI in that order.\n // There are several options for the ordering:\n // - Sorted by when the errors happened (latest first / oldest first).\n // - Stable sort by error type.\n //\n // We chose to stable sort by error type: We intend to show only a small number of errors on the UI and we do not\n // have timestamps for errors.\n const activeErrorMessages: ActiveErrorMessage[] = [];\n\n // Errors reported via diagnostics are more reliable than from API method failures, so process those first.\n if (\n diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Bad ||\n diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Poor\n ) {\n activeErrorMessages.push({ type: 'callNetworkQualityLow' });\n }\n if (diagnostics?.media.latest.noSpeakerDevicesEnumerated?.value === true) {\n activeErrorMessages.push({ type: 'callNoSpeakerFound' });\n }\n if (diagnostics?.media.latest.noMicrophoneDevicesEnumerated?.value === true) {\n activeErrorMessages.push({ type: 'callNoMicrophoneFound' });\n }\n if (deviceManager.deviceAccess?.audio === false) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDenied' });\n }\n if (diagnostics?.media.latest.microphonePermissionDenied?.value === true) {\n activeErrorMessages.push({ type: 'callMacOsMicrophoneAccessDenied' });\n }\n\n const microphoneMuteUnexpectedlyDiagnostic =\n diagnostics?.media.latest.microphoneMuteUnexpectedly || diagnostics?.media.latest.microphoneNotFunctioning;\n if (microphoneMuteUnexpectedlyDiagnostic) {\n if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that microphone stopped working and inform them to start microphone again\n activeErrorMessages.push({ type: 'callMicrophoneMutedBySystem' });\n } else if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that microphone recovered\n activeErrorMessages.push({ type: 'callMicrophoneUnmutedBySystem' });\n }\n }\n\n const cameraStoppedUnexpectedlyDiagnostic = diagnostics?.media.latest.cameraStoppedUnexpectedly;\n if (cameraStoppedUnexpectedlyDiagnostic) {\n if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that camera stopped working and inform them to start video again\n activeErrorMessages.push({ type: 'callVideoStoppedBySystem' });\n } else if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that camera recovered\n activeErrorMessages.push({ type: 'callVideoRecoveredBySystem' });\n }\n }\n\n if (deviceManager.deviceAccess?.video === false) {\n activeErrorMessages.push({ type: 'callCameraAccessDenied' });\n } else {\n if (diagnostics?.media.latest.cameraFreeze?.value === true) {\n activeErrorMessages.push({ type: 'callCameraAlreadyInUse' });\n }\n }\n\n if (diagnostics?.media.latest.cameraPermissionDenied?.value === true) {\n activeErrorMessages.push({ type: 'callMacOsCameraAccessDenied' });\n }\n if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true) {\n activeErrorMessages.push({ type: 'callMacOsScreenShareAccessDenied' });\n }\n\n // Prefer to show errors with privacy implications.\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopVideo', 'stopVideoGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mute', 'muteGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopScreenSharing', 'stopScreenShareGeneric');\n\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'startVideoGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');\n\n if (latestErrors['CallAgent.join']?.message === 'CallAgent.join: Invalid meeting link') {\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'CallAgent.join',\n 'failedToJoinCallInvalidMeetingLink'\n );\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallGeneric');\n }\n\n // We only return the first few errors to avoid filling up the UI with too many `MessageBar`s.\n activeErrorMessages.splice(maxErrorCount);\n return { activeErrorMessages: activeErrorMessages };\n }\n);\n\nconst appendActiveErrorIfDefined = (\n activeErrorMessages: ActiveErrorMessage[],\n latestErrors: CallErrors,\n target: CallErrorTarget,\n activeErrorType: ErrorType\n): void => {\n if (latestErrors[target] === undefined) {\n return;\n }\n activeErrorMessages.push({\n type: activeErrorType,\n timestamp: latestErrors[target].timestamp\n });\n};\n\nconst maxErrorCount = 3;\n\"../../react-components/src\"\"../../calling-stateful-client/src\""]}
1
+ {"version":3,"file":"errorBarSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/errorBarSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B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AE,eAAe;QACrB,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,SAAS;KAC1C,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CallingBaseSelectorProps,\n getDeviceManager,\n getDiagnostics,\n getLatestErrors,\n getEnvironmentInfo\n} from './baseSelectors';\nimport { ActiveErrorMessage, ErrorType } from '@internal/react-components';\nimport { createSelector } from 'reselect';\nimport { CallClientState, CallErrors, CallErrorTarget } from '@internal/calling-stateful-client';\nimport { DiagnosticQuality } from '@azure/communication-calling';\n/**\n * Selector type for {@link ErrorBar} component.\n *\n * @public\n */\nexport type ErrorBarSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n activeErrorMessages: ActiveErrorMessage[];\n};\n\n/**\n * Select the first 3 active errors from the state for the `ErrorBar` component.\n *\n * In case there are many errors, only the first three errors are returned to avoid\n * filling up the UI with too many errors.\n *\n * Invariants:\n * - `ErrorType` is never repeated in the returned errors.\n * - Errors are returned in a fixed order by `ErrorType`.\n *\n * @public\n */\nexport const errorBarSelector: ErrorBarSelector = createSelector(\n [getLatestErrors, getDiagnostics, getDeviceManager, getEnvironmentInfo],\n (\n latestErrors: CallErrors,\n diagnostics,\n deviceManager,\n environmentInfo\n ): { activeErrorMessages: ActiveErrorMessage[] } => {\n // The order in which the errors are returned is significant: The `ErrorBar` shows errors on the UI in that order.\n // There are several options for the ordering:\n // - Sorted by when the errors happened (latest first / oldest first).\n // - Stable sort by error type.\n //\n // We chose to stable sort by error type: We intend to show only a small number of errors on the UI and we do not\n // have timestamps for errors.\n const activeErrorMessages: ActiveErrorMessage[] = [];\n\n const isSafari = (): boolean => {\n /* @conditional-compile-remove(unsupported-browser) */\n return environmentInfo?.environment.browser === 'safari';\n return /^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent);\n };\n\n // Errors reported via diagnostics are more reliable than from API method failures, so process those first.\n if (\n diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Bad ||\n diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Poor\n ) {\n activeErrorMessages.push({ type: 'callNetworkQualityLow' });\n }\n if (diagnostics?.media.latest.noSpeakerDevicesEnumerated?.value === true) {\n activeErrorMessages.push({ type: 'callNoSpeakerFound' });\n }\n if (diagnostics?.media.latest.noMicrophoneDevicesEnumerated?.value === true) {\n activeErrorMessages.push({ type: 'callNoMicrophoneFound' });\n }\n if (deviceManager.deviceAccess?.audio === false && isSafari()) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDeniedSafari' });\n }\n if (deviceManager.deviceAccess?.audio === false && !isSafari()) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDenied' });\n }\n if (diagnostics?.media.latest.microphonePermissionDenied?.value === true) {\n activeErrorMessages.push({ type: 'callMacOsMicrophoneAccessDenied' });\n }\n\n const microphoneMuteUnexpectedlyDiagnostic =\n diagnostics?.media.latest.microphoneMuteUnexpectedly || diagnostics?.media.latest.microphoneNotFunctioning;\n if (microphoneMuteUnexpectedlyDiagnostic) {\n if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that microphone stopped working and inform them to start microphone again\n activeErrorMessages.push({ type: 'callMicrophoneMutedBySystem' });\n } else if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that microphone recovered\n activeErrorMessages.push({ type: 'callMicrophoneUnmutedBySystem' });\n }\n }\n\n const cameraStoppedUnexpectedlyDiagnostic = diagnostics?.media.latest.cameraStoppedUnexpectedly;\n if (cameraStoppedUnexpectedlyDiagnostic) {\n if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that camera stopped working and inform them to start video again\n activeErrorMessages.push({ type: 'callVideoStoppedBySystem' });\n } else if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that camera recovered\n activeErrorMessages.push({ type: 'callVideoRecoveredBySystem' });\n }\n }\n if (deviceManager.deviceAccess?.video === false && isSafari()) {\n activeErrorMessages.push({ type: 'callCameraAccessDeniedSafari' });\n } else if (deviceManager.deviceAccess?.video === false) {\n activeErrorMessages.push({ type: 'callCameraAccessDenied' });\n } else {\n if (diagnostics?.media.latest.cameraFreeze?.value === true) {\n activeErrorMessages.push({ type: 'callCameraAlreadyInUse' });\n }\n }\n\n if (diagnostics?.media.latest.cameraPermissionDenied?.value === true) {\n activeErrorMessages.push({ type: 'callMacOsCameraAccessDenied' });\n }\n if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true) {\n activeErrorMessages.push({ type: 'callMacOsScreenShareAccessDenied' });\n }\n\n // Prefer to show errors with privacy implications.\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopVideo', 'stopVideoGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mute', 'muteGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopScreenSharing', 'stopScreenShareGeneric');\n\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'startVideoGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');\n\n if (latestErrors['CallAgent.join']?.message === 'CallAgent.join: Invalid meeting link') {\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'CallAgent.join',\n 'failedToJoinCallInvalidMeetingLink'\n );\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallGeneric');\n }\n\n // We only return the first few errors to avoid filling up the UI with too many `MessageBar`s.\n activeErrorMessages.splice(maxErrorCount);\n return { activeErrorMessages: activeErrorMessages };\n }\n);\n\nconst appendActiveErrorIfDefined = (\n activeErrorMessages: ActiveErrorMessage[],\n latestErrors: CallErrors,\n target: CallErrorTarget,\n activeErrorType: ErrorType\n): void => {\n if (latestErrors[target] === undefined) {\n return;\n }\n activeErrorMessages.push({\n type: activeErrorType,\n timestamp: latestErrors[target].timestamp\n });\n};\n\nconst maxErrorCount = 3;\n\"../../react-components/src\"\"../../calling-stateful-client/src\""]}
@@ -2,7 +2,6 @@
2
2
  import { CameraButton, EndCallButton, ErrorBar, MicrophoneButton, DevicesButton, ParticipantList, ScreenShareButton, VideoGallery } from "../../../react-components/src";
3
3
  import { Dialpad } from "../../../react-components/src";
4
4
  import { HoldButton } from "../../../react-components/src";
5
- import { _DevicePermissionDropdown } from "../../../react-components/src";
6
5
  import { CameraButtonSelector, MicrophoneButtonSelector, DevicesButtonSelector, ScreenShareButtonSelector } from '../callControlSelectors';
7
6
  import { HoldButtonSelector } from '../callControlSelectors';
8
7
  import { VideoGallerySelector } from '../videoGallerySelector';
@@ -45,7 +44,7 @@ export declare type EmptySelector = () => Record<string, never>;
45
44
  *
46
45
  * @public
47
46
  */
48
- export declare type GetSelector<Component extends (props: any) => JSX.Element | undefined> = AreEqual<Component, typeof VideoGallery> extends true ? VideoGallerySelector : AreEqual<Component, typeof DevicesButton> extends true ? DevicesButtonSelector : AreEqual<Component, typeof MicrophoneButton> extends true ? MicrophoneButtonSelector : AreEqual<Component, typeof CameraButton> extends true ? CameraButtonSelector : AreEqual<Component, typeof ScreenShareButton> extends true ? ScreenShareButtonSelector : AreEqual<Component, typeof ParticipantList> extends true ? ParticipantListSelector : AreEqual<Component, typeof ParticipantsButton> extends true ? ParticipantsButtonSelector : AreEqual<Component, typeof EndCallButton> extends true ? EmptySelector : AreEqual<Component, typeof ErrorBar> extends true ? ErrorBarSelector : AreEqual<Component, typeof Dialpad> extends true ? EmptySelector : AreEqual<Component, typeof HoldButton> extends true ? HoldButtonSelector : AreEqual<Component, typeof _DevicePermissionDropdown> extends true ? EmptySelector : undefined;
47
+ export declare type GetSelector<Component extends (props: any) => JSX.Element | undefined> = AreEqual<Component, typeof VideoGallery> extends true ? VideoGallerySelector : AreEqual<Component, typeof DevicesButton> extends true ? DevicesButtonSelector : AreEqual<Component, typeof MicrophoneButton> extends true ? MicrophoneButtonSelector : AreEqual<Component, typeof CameraButton> extends true ? CameraButtonSelector : AreEqual<Component, typeof ScreenShareButton> extends true ? ScreenShareButtonSelector : AreEqual<Component, typeof ParticipantList> extends true ? ParticipantListSelector : AreEqual<Component, typeof ParticipantsButton> extends true ? ParticipantsButtonSelector : AreEqual<Component, typeof EndCallButton> extends true ? EmptySelector : AreEqual<Component, typeof ErrorBar> extends true ? ErrorBarSelector : AreEqual<Component, typeof Dialpad> extends true ? EmptySelector : AreEqual<Component, typeof HoldButton> extends true ? HoldButtonSelector : undefined;
49
48
  /**
50
49
  * Get the selector for a specified component.
51
50
  *
@@ -5,8 +5,6 @@ import { CameraButton, EndCallButton, ErrorBar, MicrophoneButton, DevicesButton,
5
5
  import { Dialpad } from "../../../react-components/src";
6
6
  /* @conditional-compile-remove(PSTN-calls) */
7
7
  import { HoldButton } from "../../../react-components/src";
8
- /* @conditional-compile-remove(call-readiness) */
9
- import { _DevicePermissionDropdown } from "../../../react-components/src";
10
8
  import { cameraButtonSelector, microphoneButtonSelector, devicesButtonSelector, screenShareButtonSelector } from '../callControlSelectors';
11
9
  /* @conditional-compile-remove(PSTN-calls) */
12
10
  import { holdButtonSelector } from '../callControlSelectors';
@@ -67,11 +65,6 @@ const findSelector = (component) => {
67
65
  if (component === Dialpad) {
68
66
  return emptySelector;
69
67
  }
70
- /* @conditional-compile-remove(call-readiness) */
71
- // _DevicePermissionDropdown only has handlers currently and doesn't require any props from the stateful layer so return the emptySelector
72
- if (component === _DevicePermissionDropdown) {
73
- return emptySelector;
74
- }
75
68
  switch (component) {
76
69
  case VideoGallery:
77
70
  return videoGallerySelector;
@@ -1 +1 @@
1
- {"version":3,"file":"usePropsFor.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/hooks/usePropsFor.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,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ft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CameraButton,\n EndCallButton,\n ErrorBar,\n MicrophoneButton,\n DevicesButton,\n ParticipantList,\n ScreenShareButton,\n VideoGallery\n} from '@internal/react-components';\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { Dialpad } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { HoldButton } from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { _DevicePermissionDropdown } from '@internal/react-components';\nimport {\n CameraButtonSelector,\n cameraButtonSelector,\n MicrophoneButtonSelector,\n microphoneButtonSelector,\n DevicesButtonSelector,\n devicesButtonSelector,\n ScreenShareButtonSelector,\n screenShareButtonSelector\n} from '../callControlSelectors';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { holdButtonSelector, HoldButtonSelector } from '../callControlSelectors';\nimport { VideoGallerySelector, videoGallerySelector } from '../videoGallerySelector';\nimport { ParticipantListSelector, participantListSelector } from '../participantListSelector';\nimport { ParticipantsButtonSelector, participantsButtonSelector } from '../participantsButtonSelector';\nimport { useHandlers } from './useHandlers';\nimport { useSelector } from './useSelector';\nimport { Common } from '@internal/acs-ui-common';\nimport { AreEqual } from '@internal/acs-ui-common';\nimport { ParticipantsButton } from '@internal/react-components';\nimport { ErrorBarSelector, errorBarSelector } from '../errorBarSelector';\nimport { CommonCallingHandlers } from '../handlers/createCommonHandlers';\n\n/**\n * Primary hook to get all hooks necessary for a calling Component.\n *\n * Most straightforward usage of calling components looks like:\n *\n * @example\n * ```\n * import { ParticipantList, usePropsFor } from '@azure/communication-react';\n *\n * const App = (): JSX.Element => {\n * // ... code to setup Providers ...\n *\n * return <ParticipantList {...usePropsFor(ParticipantList)}/>\n * }\n * ```\n *\n * @public\n */\nexport const usePropsFor = <Component extends (props: any) => JSX.Element>(\n component: Component\n): GetSelector<Component> extends (props: any) => any\n ? ReturnType<GetSelector<Component>> & Common<CommonCallingHandlers, Parameters<Component>[0]>\n : undefined => {\n const selector = getSelector(component);\n const props = useSelector(selector);\n const handlers = useHandlers<Parameters<Component>[0]>(component);\n if (props !== undefined) {\n return { ...props, ...handlers } as any;\n }\n return undefined as any;\n};\n\n/**\n * A type for trivial selectors that return no data.\n *\n * Used as a default return value if {@link usePropsFor} is called for a component that requires no data.\n *\n * @public\n */\nexport type EmptySelector = () => Record<string, never>;\n\nconst emptySelector: EmptySelector = (): Record<string, never> => ({});\n\n/**\n * Specific type of the selector applicable to a given Component.\n *\n * @public\n */\nexport type GetSelector<Component extends (props: any) => JSX.Element | undefined> = AreEqual<\n Component,\n typeof VideoGallery\n> extends true\n ? VideoGallerySelector\n : AreEqual<Component, typeof DevicesButton> extends true\n ? DevicesButtonSelector\n : AreEqual<Component, typeof MicrophoneButton> extends true\n ? MicrophoneButtonSelector\n : AreEqual<Component, typeof CameraButton> extends true\n ? CameraButtonSelector\n : AreEqual<Component, typeof ScreenShareButton> extends true\n ? ScreenShareButtonSelector\n : AreEqual<Component, typeof ParticipantList> extends true\n ? ParticipantListSelector\n : AreEqual<Component, typeof ParticipantsButton> extends true\n ? ParticipantsButtonSelector\n : AreEqual<Component, typeof EndCallButton> extends true\n ? EmptySelector\n : AreEqual<Component, typeof ErrorBar> extends true\n ? ErrorBarSelector\n : AreEqual<Component, typeof Dialpad> extends true\n ? /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */ EmptySelector\n : AreEqual<Component, typeof HoldButton> extends true\n ? /* @conditional-compile-remove(PSTN-calls) */ HoldButtonSelector\n : AreEqual<Component, typeof _DevicePermissionDropdown> extends true\n ? /* @conditional-compile-remove(call-readiness) */ EmptySelector\n : undefined;\n\n/**\n * Get the selector for a specified component.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getSelector = <Component extends (props: any) => JSX.Element | undefined>(\n component: Component\n): GetSelector<Component> => {\n /* @conditional-compile-remove(PSTN-calls) */\n if (component === HoldButton) {\n return findConditionalCompiledSelector(component);\n }\n return findSelector(component);\n};\n\nconst findSelector = (component: (props: any) => JSX.Element | undefined): any => {\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n // Dialpad only has handlers currently and doesn't require any props from the stateful layer so return the emptySelector\n if (component === Dialpad) {\n return emptySelector;\n }\n\n /* @conditional-compile-remove(call-readiness) */\n // _DevicePermissionDropdown only has handlers currently and doesn't require any props from the stateful layer so return the emptySelector\n if (component === _DevicePermissionDropdown) {\n return emptySelector;\n }\n\n switch (component) {\n case VideoGallery:\n return videoGallerySelector;\n case MicrophoneButton:\n return microphoneButtonSelector;\n case CameraButton:\n return cameraButtonSelector;\n case ScreenShareButton:\n return screenShareButtonSelector;\n case DevicesButton:\n return devicesButtonSelector;\n case ParticipantList:\n return participantListSelector;\n case ParticipantsButton:\n return participantsButtonSelector;\n case EndCallButton:\n return emptySelector;\n case ErrorBar:\n return errorBarSelector;\n }\n return undefined;\n};\n\n/* @conditional-compile-remove(PSTN-calls) */\nconst findConditionalCompiledSelector = (component: (props: any) => JSX.Element | undefined): any => {\n switch (component) {\n case HoldButton:\n return holdButtonSelector;\n }\n};\n\"../../../react-components/src\"\"../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"usePropsFor.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/hooks/usePropsFor.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,YAAY,EACb,sCAAmC;AACpC,0CAA0C,CAAC,6CAA6C;AACxF,OAAO,EAAE,OAAO,EAAE,sCAAmC;AACrD,6CAA6C;AAC7C,OAAO,EAAE,UAAU,EAAE,sCAAmC;AACxD,OAAO,EAEL,oBAAoB,EAEpB,wBAAwB,EAExB,qBAAqB,EAErB,yBA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;IAC/E,0CAA0C,CAAC,6CAA6C;IACxF,wHAAwH;IACxH,IAAI,SAAS,KAAK,OAAO,EAAE;QACzB,OAAO,aAAa,CAAC;KACtB;IAED,QAAQ,SAAS,EAAE;QACjB,KAAK,YAAY;YACf,OAAO,oBAAoB,CAAC;QAC9B,KAAK,gBAAgB;YACnB,OAAO,wBAAwB,CAAC;QAClC,KAAK,YAAY;YACf,OAAO,oBAAoB,CAAC;QAC9B,KAAK,iBAAiB;YACpB,OAAO,yBAAyB,CAAC;QACnC,KAAK,aAAa;YAChB,OAAO,qBAAqB,CAAC;QAC/B,KAAK,eAAe;YAClB,OAAO,uBAAuB,CAAC;QACjC,KAAK,kBAAkB;YACrB,OAAO,0BAA0B,CAAC;QACpC,KAAK,aAAa;YAChB,OAAO,aAAa,CAAC;QACvB,KAAK,QAAQ;YACX,OAAO,gBAAgB,CAAC;KAC3B;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,6CAA6C;AAC7C,MAAM,+BAA+B,GAAG,CAAC,SAAkD,EAAO,EAAE;IAClG,QAAQ,SAAS,EAAE;QACjB,KAAK,UAAU;YACb,OAAO,kBAAkB,CAAC;KAC7B;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CameraButton,\n EndCallButton,\n ErrorBar,\n MicrophoneButton,\n DevicesButton,\n ParticipantList,\n ScreenShareButton,\n VideoGallery\n} from '@internal/react-components';\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { Dialpad } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { HoldButton } from '@internal/react-components';\nimport {\n CameraButtonSelector,\n cameraButtonSelector,\n MicrophoneButtonSelector,\n microphoneButtonSelector,\n DevicesButtonSelector,\n devicesButtonSelector,\n ScreenShareButtonSelector,\n screenShareButtonSelector\n} from '../callControlSelectors';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { holdButtonSelector, HoldButtonSelector } from '../callControlSelectors';\nimport { VideoGallerySelector, videoGallerySelector } from '../videoGallerySelector';\nimport { ParticipantListSelector, participantListSelector } from '../participantListSelector';\nimport { ParticipantsButtonSelector, participantsButtonSelector } from '../participantsButtonSelector';\nimport { useHandlers } from './useHandlers';\nimport { useSelector } from './useSelector';\nimport { Common } from '@internal/acs-ui-common';\nimport { AreEqual } from '@internal/acs-ui-common';\nimport { ParticipantsButton } from '@internal/react-components';\nimport { ErrorBarSelector, errorBarSelector } from '../errorBarSelector';\nimport { CommonCallingHandlers } from '../handlers/createCommonHandlers';\n\n/**\n * Primary hook to get all hooks necessary for a calling Component.\n *\n * Most straightforward usage of calling components looks like:\n *\n * @example\n * ```\n * import { ParticipantList, usePropsFor } from '@azure/communication-react';\n *\n * const App = (): JSX.Element => {\n * // ... code to setup Providers ...\n *\n * return <ParticipantList {...usePropsFor(ParticipantList)}/>\n * }\n * ```\n *\n * @public\n */\nexport const usePropsFor = <Component extends (props: any) => JSX.Element>(\n component: Component\n): GetSelector<Component> extends (props: any) => any\n ? ReturnType<GetSelector<Component>> & Common<CommonCallingHandlers, Parameters<Component>[0]>\n : undefined => {\n const selector = getSelector(component);\n const props = useSelector(selector);\n const handlers = useHandlers<Parameters<Component>[0]>(component);\n if (props !== undefined) {\n return { ...props, ...handlers } as any;\n }\n return undefined as any;\n};\n\n/**\n * A type for trivial selectors that return no data.\n *\n * Used as a default return value if {@link usePropsFor} is called for a component that requires no data.\n *\n * @public\n */\nexport type EmptySelector = () => Record<string, never>;\n\nconst emptySelector: EmptySelector = (): Record<string, never> => ({});\n\n/**\n * Specific type of the selector applicable to a given Component.\n *\n * @public\n */\nexport type GetSelector<Component extends (props: any) => JSX.Element | undefined> = AreEqual<\n Component,\n typeof VideoGallery\n> extends true\n ? VideoGallerySelector\n : AreEqual<Component, typeof DevicesButton> extends true\n ? DevicesButtonSelector\n : AreEqual<Component, typeof MicrophoneButton> extends true\n ? MicrophoneButtonSelector\n : AreEqual<Component, typeof CameraButton> extends true\n ? CameraButtonSelector\n : AreEqual<Component, typeof ScreenShareButton> extends true\n ? ScreenShareButtonSelector\n : AreEqual<Component, typeof ParticipantList> extends true\n ? ParticipantListSelector\n : AreEqual<Component, typeof ParticipantsButton> extends true\n ? ParticipantsButtonSelector\n : AreEqual<Component, typeof EndCallButton> extends true\n ? EmptySelector\n : AreEqual<Component, typeof ErrorBar> extends true\n ? ErrorBarSelector\n : AreEqual<Component, typeof Dialpad> extends true\n ? /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */ EmptySelector\n : AreEqual<Component, typeof HoldButton> extends true\n ? /* @conditional-compile-remove(PSTN-calls) */ HoldButtonSelector\n : undefined;\n\n/**\n * Get the selector for a specified component.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getSelector = <Component extends (props: any) => JSX.Element | undefined>(\n component: Component\n): GetSelector<Component> => {\n /* @conditional-compile-remove(PSTN-calls) */\n if (component === HoldButton) {\n return findConditionalCompiledSelector(component);\n }\n return findSelector(component);\n};\n\nconst findSelector = (component: (props: any) => JSX.Element | undefined): any => {\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n // Dialpad only has handlers currently and doesn't require any props from the stateful layer so return the emptySelector\n if (component === Dialpad) {\n return emptySelector;\n }\n\n switch (component) {\n case VideoGallery:\n return videoGallerySelector;\n case MicrophoneButton:\n return microphoneButtonSelector;\n case CameraButton:\n return cameraButtonSelector;\n case ScreenShareButton:\n return screenShareButtonSelector;\n case DevicesButton:\n return devicesButtonSelector;\n case ParticipantList:\n return participantListSelector;\n case ParticipantsButton:\n return participantsButtonSelector;\n case EndCallButton:\n return emptySelector;\n case ErrorBar:\n return errorBarSelector;\n }\n return undefined;\n};\n\n/* @conditional-compile-remove(PSTN-calls) */\nconst findConditionalCompiledSelector = (component: (props: any) => JSX.Element | undefined): any => {\n switch (component) {\n case HoldButton:\n return holdButtonSelector;\n }\n};\n\"../../../react-components/src\"\"../../../acs-ui-common/src\""]}
@@ -9,4 +9,16 @@ export declare const _videoGalleryRemoteParticipantsMemo: (remoteParticipants: R
9
9
  export declare const convertRemoteParticipantToVideoGalleryRemoteParticipant: (userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {
10
10
  [key: number]: RemoteVideoStreamState;
11
11
  }, state: RemoteParticipantConnectionState, displayName?: string | undefined) => VideoGalleryRemoteParticipant;
12
+ /** @private */
13
+ export declare const memoizeLocalParticipant: (this: any, identifier: any, displayName: any, isMuted: any, isScreenSharingOn: any, localVideoStream: any) => {
14
+ userId: any;
15
+ displayName: any;
16
+ isMuted: any;
17
+ isScreenSharingOn: any;
18
+ videoStream: {
19
+ isAvailable: boolean;
20
+ isMirrored: any;
21
+ renderElement: any;
22
+ };
23
+ };
12
24
  //# sourceMappingURL=videoGalleryUtils.d.ts.map
@@ -1,6 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  import { memoizeFnAll, toFlatCommunicationIdentifier } from "../../../acs-ui-common/src";
4
+ import memoizeOne from 'memoize-one';
4
5
  import { checkIsSpeaking } from './SelectorUtils';
5
6
  /** @internal */
6
7
  export const _dominantSpeakersWithFlatId = (dominantSpeakers) => {
@@ -60,14 +61,31 @@ export const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId,
60
61
  };
61
62
  };
62
63
  const convertRemoteVideoStreamToVideoGalleryStream = (stream) => {
63
- var _a, _b;
64
+ var _a, _b, _c;
64
65
  return {
65
66
  id: stream.id,
66
67
  isAvailable: stream.isAvailable,
67
68
  /* @conditional-compile-remove(video-stream-is-receiving-flag) */
68
69
  isReceiving: stream.isReceiving,
69
70
  isMirrored: (_a = stream.view) === null || _a === void 0 ? void 0 : _a.isMirrored,
70
- renderElement: (_b = stream.view) === null || _b === void 0 ? void 0 : _b.target
71
+ renderElement: (_b = stream.view) === null || _b === void 0 ? void 0 : _b.target,
72
+ /* @conditional-compile-remove(pinned-participants) */
73
+ scalingMode: (_c = stream.view) === null || _c === void 0 ? void 0 : _c.scalingMode
71
74
  };
72
75
  };
76
+ /** @private */
77
+ export const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream) => {
78
+ var _a, _b;
79
+ return ({
80
+ userId: identifier,
81
+ displayName: displayName !== null && displayName !== void 0 ? displayName : '',
82
+ isMuted: isMuted,
83
+ isScreenSharingOn: isScreenSharingOn,
84
+ videoStream: {
85
+ isAvailable: !!localVideoStream,
86
+ isMirrored: (_a = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _a === void 0 ? void 0 : _a.isMirrored,
87
+ renderElement: (_b = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _b === void 0 ? void 0 : _b.target
88
+ }
89
+ });
90
+ });
73
91
  //# sourceMappingURL=videoGalleryUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"videoGalleryUtils.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/utils/videoGalleryUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,YAAY,EAAE,6BAA6B,EAAE,mCAAgC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,gBAAgB;AAChB,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,gBAAuC,EAAwB,EAAE;;IAC3G,OAAO,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,YAAY,0CAAE,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAC5E,CAAC,CAAC;AAEF,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAAG,CACjD,kBAAwD,EACvB,EAAE;IACnC,IAAI,CAAC,kBAAkB,EAAE;QACvB,OAAO,EAAE,CAAC;KACX;IACD,OAAO,mCAAmC,CA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iBAAiB,GAAG,4CAA4C,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3F;KACF;IAED,IAAI,oBAAoB,CAAC,CAAC,CAAC,EAAE;QAC3B,IAAI,oBAAoB,CAAC,CAAC,CAAC,CAAC,eAAe,KAAK,eAAe,EAAE;YAC/D,iBAAiB,GAAG,4CAA4C,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3F;aAAM;YACL,WAAW,GAAG,4CAA4C,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;SACrF;KACF;IAED,OAAO;QACL,MAAM;QACN,WAAW;QACX,OAAO;QACP,UAAU;QACV,WAAW;QACX,iBAAiB;QACjB,iBAAiB,EAAE,iBAAiB,KAAK,SAAS,IAAI,iBAAiB,CAAC,WAAW;QACnF,mDAAmD;QACnD,6CAA6C;QAC7C,KAAK;KACN,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,4CAA4C,GAAG,CAAC,MAA8B,EAAsB,EAAE;;IAC1G,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,EAAE;QACb,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,iEAAiE;QACjE,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,UAAU,EAAE,MAAA,MAAM,CAAC,IAAI,0CAAE,UAAU;QACnC,aAAa,EAAE,MAAA,MAAM,CAAC,IAAI,0CAAE,MAAM;KACnC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n DominantSpeakersInfo,\n RemoteParticipantState as RemoteParticipantConnectionState\n} from '@azure/communication-calling';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { RemoteParticipantState, RemoteVideoStreamState } from '@internal/calling-stateful-client';\nimport { VideoGalleryRemoteParticipant, VideoGalleryStream } from '@internal/react-components';\nimport { checkIsSpeaking } from './SelectorUtils';\n\n/** @internal */\nexport const _dominantSpeakersWithFlatId = (dominantSpeakers?: DominantSpeakersInfo): undefined | string[] => {\n return dominantSpeakers?.speakersList?.map(toFlatCommunicationIdentifier);\n};\n\n/** @internal */\nexport const _videoGalleryRemoteParticipantsMemo = (\n remoteParticipants: RemoteParticipantState[] | undefined\n): VideoGalleryRemoteParticipant[] => {\n if (!remoteParticipants) {\n return [];\n }\n return memoizedAllConvertRemoteParticipant((memoizedFn) => {\n return Object.values(remoteParticipants)\n .filter((participant: RemoteParticipantState) => {\n return participant.state !== 'InLobby';\n })\n .map((participant: RemoteParticipantState) => {\n return memoizedFn(\n toFlatCommunicationIdentifier(participant.identifier),\n participant.isMuted,\n checkIsSpeaking(participant),\n participant.videoStreams,\n participant.state,\n participant.displayName\n );\n });\n });\n};\n\nconst memoizedAllConvertRemoteParticipant = memoizeFnAll(\n (\n userId: string,\n isMuted: boolean,\n isSpeaking: boolean,\n videoStreams: { [key: number]: RemoteVideoStreamState },\n state: RemoteParticipantConnectionState,\n displayName?: string\n ): VideoGalleryRemoteParticipant => {\n return convertRemoteParticipantToVideoGalleryRemoteParticipant(\n userId,\n isMuted,\n isSpeaking,\n videoStreams,\n state,\n displayName\n );\n }\n);\n\n/** @private */\nexport const convertRemoteParticipantToVideoGalleryRemoteParticipant = (\n userId: string,\n isMuted: boolean,\n isSpeaking: boolean,\n videoStreams: { [key: number]: RemoteVideoStreamState },\n state: RemoteParticipantConnectionState,\n displayName?: string\n): VideoGalleryRemoteParticipant => {\n const rawVideoStreamsArray = Object.values(videoStreams);\n let videoStream: VideoGalleryStream | undefined = undefined;\n let screenShareStream: VideoGalleryStream | undefined = undefined;\n\n if (rawVideoStreamsArray[0]) {\n if (rawVideoStreamsArray[0].mediaStreamType === 'Video') {\n videoStream = convertRemoteVideoStreamToVideoGalleryStream(rawVideoStreamsArray[0]);\n } else {\n screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(rawVideoStreamsArray[0]);\n }\n }\n\n if (rawVideoStreamsArray[1]) {\n if (rawVideoStreamsArray[1].mediaStreamType === 'ScreenSharing') {\n screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(rawVideoStreamsArray[1]);\n } else {\n videoStream = convertRemoteVideoStreamToVideoGalleryStream(rawVideoStreamsArray[1]);\n }\n }\n\n return {\n userId,\n displayName,\n isMuted,\n isSpeaking,\n videoStream,\n screenShareStream,\n isScreenSharingOn: screenShareStream !== undefined && screenShareStream.isAvailable,\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n state\n };\n};\n\nconst convertRemoteVideoStreamToVideoGalleryStream = (stream: RemoteVideoStreamState): VideoGalleryStream => {\n return {\n id: stream.id,\n isAvailable: stream.isAvailable,\n /* @conditional-compile-remove(video-stream-is-receiving-flag) */\n isReceiving: stream.isReceiving,\n isMirrored: stream.view?.isMirrored,\n renderElement: stream.view?.target\n };\n};\n\"../../../acs-ui-common/src\"\"../../../calling-stateful-client/src\"\"../../../react-components/src\""]}
1
+ {"version":3,"file":"videoGalleryUtils.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/utils/videoGalleryUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,YAAY,EAAE,6BAA6B,EAAE,mCAAgC;AAGtF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,gBAAgB;AAChB,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,gBAAuC,EAAwB,EAAE;;IAC3G,OAAO,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,YAAY,0CAAE,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAC5E,CAAC,CAAC;AAEF,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAAG,CACjD,kBAAwD,EACvB,EAAE;IACnC,IAAI,CAAC,kBAAkB,EAAE;QACvB,OAAO,EAAE,CAAC;KACX;IACD,O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EAAE;QAC9B,OAAO,EAAE,OAAO;QAChB,iBAAiB,EAAE,iBAAiB;QACpC,WAAW,EAAE;YACX,WAAW,EAAE,CAAC,CAAC,gBAAgB;YAC/B,UAAU,EAAE,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAAE,UAAU;YAC9C,aAAa,EAAE,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAAE,MAAM;SAC9C;KACF,CAAC,CAAA;CAAA,CACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n DominantSpeakersInfo,\n RemoteParticipantState as RemoteParticipantConnectionState\n} from '@azure/communication-calling';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { RemoteParticipantState, RemoteVideoStreamState } from '@internal/calling-stateful-client';\nimport { VideoGalleryRemoteParticipant, VideoGalleryStream } from '@internal/react-components';\nimport memoizeOne from 'memoize-one';\nimport { checkIsSpeaking } from './SelectorUtils';\n\n/** @internal */\nexport const _dominantSpeakersWithFlatId = (dominantSpeakers?: DominantSpeakersInfo): undefined | string[] => {\n return dominantSpeakers?.speakersList?.map(toFlatCommunicationIdentifier);\n};\n\n/** @internal */\nexport const _videoGalleryRemoteParticipantsMemo = (\n remoteParticipants: RemoteParticipantState[] | undefined\n): VideoGalleryRemoteParticipant[] => {\n if (!remoteParticipants) {\n return [];\n }\n return memoizedAllConvertRemoteParticipant((memoizedFn) => {\n return Object.values(remoteParticipants)\n .filter((participant: RemoteParticipantState) => {\n return participant.state !== 'InLobby';\n })\n .map((participant: RemoteParticipantState) => {\n return memoizedFn(\n toFlatCommunicationIdentifier(participant.identifier),\n participant.isMuted,\n checkIsSpeaking(participant),\n participant.videoStreams,\n participant.state,\n participant.displayName\n );\n });\n });\n};\n\nconst memoizedAllConvertRemoteParticipant = memoizeFnAll(\n (\n userId: string,\n isMuted: boolean,\n isSpeaking: boolean,\n videoStreams: { [key: number]: RemoteVideoStreamState },\n state: RemoteParticipantConnectionState,\n displayName?: string\n ): VideoGalleryRemoteParticipant => {\n return convertRemoteParticipantToVideoGalleryRemoteParticipant(\n userId,\n isMuted,\n isSpeaking,\n videoStreams,\n state,\n displayName\n );\n }\n);\n\n/** @private */\nexport const convertRemoteParticipantToVideoGalleryRemoteParticipant = (\n userId: string,\n isMuted: boolean,\n isSpeaking: boolean,\n videoStreams: { [key: number]: RemoteVideoStreamState },\n state: RemoteParticipantConnectionState,\n displayName?: string\n): VideoGalleryRemoteParticipant => {\n const rawVideoStreamsArray = Object.values(videoStreams);\n let videoStream: VideoGalleryStream | undefined = undefined;\n let screenShareStream: VideoGalleryStream | undefined = undefined;\n\n if (rawVideoStreamsArray[0]) {\n if (rawVideoStreamsArray[0].mediaStreamType === 'Video') {\n videoStream = convertRemoteVideoStreamToVideoGalleryStream(rawVideoStreamsArray[0]);\n } else {\n screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(rawVideoStreamsArray[0]);\n }\n }\n\n if (rawVideoStreamsArray[1]) {\n if (rawVideoStreamsArray[1].mediaStreamType === 'ScreenSharing') {\n screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(rawVideoStreamsArray[1]);\n } else {\n videoStream = convertRemoteVideoStreamToVideoGalleryStream(rawVideoStreamsArray[1]);\n }\n }\n\n return {\n userId,\n displayName,\n isMuted,\n isSpeaking,\n videoStream,\n screenShareStream,\n isScreenSharingOn: screenShareStream !== undefined && screenShareStream.isAvailable,\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n state\n };\n};\n\nconst convertRemoteVideoStreamToVideoGalleryStream = (stream: RemoteVideoStreamState): VideoGalleryStream => {\n return {\n id: stream.id,\n isAvailable: stream.isAvailable,\n /* @conditional-compile-remove(video-stream-is-receiving-flag) */\n isReceiving: stream.isReceiving,\n isMirrored: stream.view?.isMirrored,\n renderElement: stream.view?.target,\n /* @conditional-compile-remove(pinned-participants) */\n scalingMode: stream.view?.scalingMode\n };\n};\n\n/** @private */\nexport const memoizeLocalParticipant = memoizeOne(\n (identifier, displayName, isMuted, isScreenSharingOn, localVideoStream) => ({\n userId: identifier,\n displayName: displayName ?? '',\n isMuted: isMuted,\n isScreenSharingOn: isScreenSharingOn,\n videoStream: {\n isAvailable: !!localVideoStream,\n isMirrored: localVideoStream?.view?.isMirrored,\n renderElement: localVideoStream?.view?.target\n }\n })\n);\n\"../../../acs-ui-common/src\"\"../../../calling-stateful-client/src\"\"../../../react-components/src\""]}
@@ -5,7 +5,7 @@ import { createSelector } from 'reselect';
5
5
  import { getDisplayName, getDominantSpeakers, getIdentifier, getIsMuted, getIsScreenSharingOn, getLocalVideoStreams, getRemoteParticipants, getScreenShareRemoteParticipant } from './baseSelectors';
6
6
  import { _updateUserDisplayNames } from './utils/callUtils';
7
7
  import { checkIsSpeaking } from './utils/SelectorUtils';
8
- import { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId, convertRemoteParticipantToVideoGalleryRemoteParticipant } from './utils/videoGalleryUtils';
8
+ import { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId, convertRemoteParticipantToVideoGalleryRemoteParticipant, memoizeLocalParticipant } from './utils/videoGalleryUtils';
9
9
  /**
10
10
  * Provides data attributes to {@link VideoGallery} component.
11
11
  * @public
@@ -20,7 +20,6 @@ export const videoGallerySelector = createSelector([
20
20
  getIdentifier,
21
21
  getDominantSpeakers
22
22
  ], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName, identifier, dominantSpeakers) => {
23
- var _a, _b;
24
23
  const screenShareRemoteParticipant = screenShareRemoteParticipantId && remoteParticipants
25
24
  ? remoteParticipants[screenShareRemoteParticipantId]
26
25
  : undefined;
@@ -33,17 +32,7 @@ export const videoGallerySelector = createSelector([
33
32
  screenShareParticipant: screenShareRemoteParticipant
34
33
  ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName)
35
34
  : undefined,
36
- localParticipant: {
37
- userId: identifier,
38
- displayName: displayName !== null && displayName !== void 0 ? displayName : '',
39
- isMuted: isMuted,
40
- isScreenSharingOn: isScreenSharingOn,
41
- videoStream: {
42
- isAvailable: !!localVideoStream,
43
- isMirrored: (_a = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _a === void 0 ? void 0 : _a.isMirrored,
44
- renderElement: (_b = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _b === void 0 ? void 0 : _b.target
45
- }
46
- },
35
+ localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream),
47
36
  remoteParticipants: _videoGalleryRemoteParticipantsMemo(updateUserDisplayNamesTrampoline(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants)),
48
37
  dominantSpeakers: dominantSpeakerIds
49
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"videoGallerySelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/videoGallerySelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAGxE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAEL,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,+BAA+B,EAChC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,mCAAmC,EACnC,2BAA2B,EAC3B,uDAAu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ChB,MAAM,EAAE,UAAU;YAClB,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE;YAC9B,OAAO,EAAE,OAAO;YAChB,iBAAiB,EAAE,iBAAiB;YACpC,WAAW,EAAE;gBACX,WAAW,EAAE,CAAC,CAAC,gBAAgB;gBAC/B,UAAU,EAAE,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAAE,UAAU;gBAC9C,aAAa,EAAE,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAAE,MAAM;aAC9C;SACF;QACD,kBAAkB,EAAE,mCAAmC,CACrD,gCAAgC,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAChH;QACD,gBAAgB,EAAE,kBAAkB;KACrC,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,gCAAgC,GAAG,CAAC,kBAA4C,EAA4B,EAAE;IAClH,6CAA6C;IAC7C,OAAO,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;IACnD,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { VideoGalleryLocalParticipant, VideoGalleryRemoteParticipant } from '@internal/react-components';\nimport { createSelector } from 'reselect';\nimport {\n CallingBaseSelectorProps,\n getDisplayName,\n getDominantSpeakers,\n getIdentifier,\n getIsMuted,\n getIsScreenSharingOn,\n getLocalVideoStreams,\n getRemoteParticipants,\n getScreenShareRemoteParticipant\n} from './baseSelectors';\nimport { _updateUserDisplayNames } from './utils/callUtils';\nimport { checkIsSpeaking } from './utils/SelectorUtils';\nimport {\n _videoGalleryRemoteParticipantsMemo,\n _dominantSpeakersWithFlatId,\n convertRemoteParticipantToVideoGalleryRemoteParticipant\n} from './utils/videoGalleryUtils';\n\n/**\n * Selector type for {@link VideoGallery} component.\n *\n * @public\n */\nexport type VideoGallerySelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n screenShareParticipant: VideoGalleryRemoteParticipant | undefined;\n localParticipant: VideoGalleryLocalParticipant;\n remoteParticipants: VideoGalleryRemoteParticipant[];\n dominantSpeakers?: string[];\n};\n\n/**\n * Provides data attributes to {@link VideoGallery} component.\n * @public\n */\nexport const videoGallerySelector: VideoGallerySelector = createSelector(\n [\n getScreenShareRemoteParticipant,\n getRemoteParticipants,\n getLocalVideoStreams,\n getIsMuted,\n getIsScreenSharingOn,\n getDisplayName,\n getIdentifier,\n getDominantSpeakers\n ],\n (\n screenShareRemoteParticipantId,\n remoteParticipants,\n localVideoStreams,\n isMuted,\n isScreenSharingOn,\n displayName: string | undefined,\n identifier: string,\n dominantSpeakers\n ) => {\n const screenShareRemoteParticipant =\n screenShareRemoteParticipantId && remoteParticipants\n ? remoteParticipants[screenShareRemoteParticipantId]\n : undefined;\n const localVideoStream = localVideoStreams?.find((i) => i.mediaStreamType === 'Video');\n\n const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);\n const dominantSpeakersMap: Record<string, number> = {};\n dominantSpeakerIds?.forEach((speaker, idx) => (dominantSpeakersMap[speaker] = idx));\n const noRemoteParticipants = [];\n return {\n screenShareParticipant: screenShareRemoteParticipant\n ? convertRemoteParticipantToVideoGalleryRemoteParticipant(\n toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier),\n screenShareRemoteParticipant.isMuted,\n checkIsSpeaking(screenShareRemoteParticipant),\n screenShareRemoteParticipant.videoStreams,\n screenShareRemoteParticipant.state,\n screenShareRemoteParticipant.displayName\n )\n : undefined,\n localParticipant: {\n userId: identifier,\n displayName: displayName ?? '',\n isMuted: isMuted,\n isScreenSharingOn: isScreenSharingOn,\n videoStream: {\n isAvailable: !!localVideoStream,\n isMirrored: localVideoStream?.view?.isMirrored,\n renderElement: localVideoStream?.view?.target\n }\n },\n remoteParticipants: _videoGalleryRemoteParticipantsMemo(\n updateUserDisplayNamesTrampoline(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants)\n ),\n dominantSpeakers: dominantSpeakerIds\n };\n }\n);\n\nconst updateUserDisplayNamesTrampoline = (remoteParticipants: RemoteParticipantState[]): RemoteParticipantState[] => {\n /* @conditional-compile-remove(PSTN-calls) */\n return _updateUserDisplayNames(remoteParticipants);\n return remoteParticipants;\n};\n\"../../acs-ui-common/src\"\"../../calling-stateful-client/src\"\"../../react-components/src\""]}
1
+ {"version":3,"file":"videoGallerySelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/videoGallerySelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAGxE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAEL,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,+BAA+B,EAChC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,mCAAmC,EACnC,2BAA2B,EAC3B,uDAAuD,EACvD,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AAiBnC;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAyB,cAAc,CACtE;IACE,+BAA+B;IAC/B,qBAAqB;IACrB,oBAAoB;IACpB,UAAU;IACV,oBAAoB;IACpB,cAAc;IACd,aAAa;IACb,mBAAmB;CACpB,EACD,CACE,8BAA8B,EAC9B,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,iBAAiB,EACjB,WAA+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AAEF,MAAM,gCAAgC,GAAG,CAAC,kBAA4C,EAA4B,EAAE;IAClH,6CAA6C;IAC7C,OAAO,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;IACnD,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { VideoGalleryLocalParticipant, VideoGalleryRemoteParticipant } from '@internal/react-components';\nimport { createSelector } from 'reselect';\nimport {\n CallingBaseSelectorProps,\n getDisplayName,\n getDominantSpeakers,\n getIdentifier,\n getIsMuted,\n getIsScreenSharingOn,\n getLocalVideoStreams,\n getRemoteParticipants,\n getScreenShareRemoteParticipant\n} from './baseSelectors';\nimport { _updateUserDisplayNames } from './utils/callUtils';\nimport { checkIsSpeaking } from './utils/SelectorUtils';\nimport {\n _videoGalleryRemoteParticipantsMemo,\n _dominantSpeakersWithFlatId,\n convertRemoteParticipantToVideoGalleryRemoteParticipant,\n memoizeLocalParticipant\n} from './utils/videoGalleryUtils';\n\n/**\n * Selector type for {@link VideoGallery} component.\n *\n * @public\n */\nexport type VideoGallerySelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n screenShareParticipant: VideoGalleryRemoteParticipant | undefined;\n localParticipant: VideoGalleryLocalParticipant;\n remoteParticipants: VideoGalleryRemoteParticipant[];\n dominantSpeakers?: string[];\n};\n\n/**\n * Provides data attributes to {@link VideoGallery} component.\n * @public\n */\nexport const videoGallerySelector: VideoGallerySelector = createSelector(\n [\n getScreenShareRemoteParticipant,\n getRemoteParticipants,\n getLocalVideoStreams,\n getIsMuted,\n getIsScreenSharingOn,\n getDisplayName,\n getIdentifier,\n getDominantSpeakers\n ],\n (\n screenShareRemoteParticipantId,\n remoteParticipants,\n localVideoStreams,\n isMuted,\n isScreenSharingOn,\n displayName: string | undefined,\n identifier: string,\n dominantSpeakers\n ) => {\n const screenShareRemoteParticipant =\n screenShareRemoteParticipantId && remoteParticipants\n ? remoteParticipants[screenShareRemoteParticipantId]\n : undefined;\n const localVideoStream = localVideoStreams?.find((i) => i.mediaStreamType === 'Video');\n\n const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);\n const dominantSpeakersMap: Record<string, number> = {};\n dominantSpeakerIds?.forEach((speaker, idx) => (dominantSpeakersMap[speaker] = idx));\n const noRemoteParticipants = [];\n return {\n screenShareParticipant: screenShareRemoteParticipant\n ? convertRemoteParticipantToVideoGalleryRemoteParticipant(\n toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier),\n screenShareRemoteParticipant.isMuted,\n checkIsSpeaking(screenShareRemoteParticipant),\n screenShareRemoteParticipant.videoStreams,\n screenShareRemoteParticipant.state,\n screenShareRemoteParticipant.displayName\n )\n : undefined,\n localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream),\n remoteParticipants: _videoGalleryRemoteParticipantsMemo(\n updateUserDisplayNamesTrampoline(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants)\n ),\n dominantSpeakers: dominantSpeakerIds\n };\n }\n);\n\nconst updateUserDisplayNamesTrampoline = (remoteParticipants: RemoteParticipantState[]): RemoteParticipantState[] => {\n /* @conditional-compile-remove(PSTN-calls) */\n return _updateUserDisplayNames(remoteParticipants);\n return remoteParticipants;\n};\n\"../../acs-ui-common/src\"\"../../calling-stateful-client/src\"\"../../react-components/src\""]}
@@ -1,5 +1,5 @@
1
1
  import { CommunicationIdentifierKind } from '@azure/communication-common';
2
- import { AudioDeviceInfo, DeviceAccess, DominantSpeakersInfo, VideoDeviceInfo } from '@azure/communication-calling';
2
+ import { AudioDeviceInfo, DeviceAccess, DominantSpeakersInfo, ScalingMode, VideoDeviceInfo } from '@azure/communication-calling';
3
3
  import { EnvironmentInfo } from '@azure/communication-calling';
4
4
  import { ParticipantRole } from '@azure/communication-calling';
5
5
  import { CallEndReason, CallState as CallStatus, RemoteParticipantState as RemoteParticipantStatus } from '@azure/communication-calling';
@@ -51,6 +51,7 @@ export declare class CallContext {
51
51
  setRemoteVideoStreamIsReceiving(callId: string, participantKey: string, streamId: number, isReceiving: boolean): void;
52
52
  setRemoteVideoStreams(callId: string, participantKey: string, addRemoteVideoStream: RemoteVideoStreamState[], removeRemoteVideoStream: number[]): void;
53
53
  setRemoteVideoStreamRendererView(callId: string, participantKey: string, streamId: number, view: VideoStreamRendererViewState | undefined): void;
54
+ setRemoteVideoStreamViewScalingMode(callId: string, participantKey: string, streamId: number, scalingMode: ScalingMode): void;
54
55
  setIncomingCall(call: IncomingCallState): void;
55
56
  removeIncomingCall(callId: string): void;
56
57
  setIncomingCallEnded(callId: string, callEndReason: CallEndReason | undefined): void;
@@ -411,6 +411,20 @@ export class CallContext {
411
411
  }
412
412
  });
413
413
  }
414
+ setRemoteVideoStreamViewScalingMode(callId, participantKey, streamId, scalingMode) {
415
+ this.modifyState((draft) => {
416
+ const call = draft.calls[this._callIdHistory.latestCallId(callId)];
417
+ if (call) {
418
+ const participant = call.remoteParticipants[participantKey];
419
+ if (participant) {
420
+ const stream = participant.videoStreams[streamId];
421
+ if (stream && stream.view) {
422
+ stream.view.scalingMode = scalingMode;
423
+ }
424
+ }
425
+ }
426
+ });
427
+ }
414
428
  setIncomingCall(call) {
415
429
  this.modifyState((draft) => {
416
430
  const existingCall = draft.incomingCalls[call.id];