@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
@@ -1 +1 @@
1
- {"version":3,"file":"CallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/CallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAkDlC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB;IACjD,0BAA0B;IAC1B,8BAA8B;IAC9B,UAAU;IACV,wCAAwC,CAAC,wBAAwB;IACjE,iBAAiB;IACjB,wCAAwC,CAAC,cAAc;IACvD,sDAAsD,CAAC,wBAAwB;CAChF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CallState, DeviceManagerState } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\nimport type {\n AudioDeviceInfo,\n VideoDeviceInfo,\n Call,\n PermissionConstraints,\n RemoteParticipant,\n StartCallOptions,\n MediaDiagnosticChangedEventArgs,\n NetworkDiagnosticChangedEventArgs,\n PropertyChangedEvent\n} from '@azure/communication-calling';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { Role } from '@internal/react-components';\nimport type { CommunicationIdentifierKind } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport type {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n PhoneNumberIdentifier\n} from '@azure/communication-common';\nimport type { AdapterState, Disposable, AdapterError, AdapterErrors } from '../../common/adapters';\n\n/**\n * Major UI screens shown in the {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositePage =\n | 'accessDeniedTeamsMeeting'\n | 'call'\n | 'configuration'\n | /* @conditional-compile-remove(PSTN-calls) */ 'hold'\n | 'joinCallFailedDueToNoNetwork'\n | 'leftCall'\n | 'lobby'\n | /* @conditional-compile-remove(rooms) */ 'deniedPermissionToRoom'\n | 'removedFromCall'\n | /* @conditional-compile-remove(rooms) */ 'roomNotFound'\n | /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment';\n\n/**\n * Subset of CallCompositePages that represent an end call state.\n * @private\n */\nexport const END_CALL_PAGES: CallCompositePage[] = [\n 'accessDeniedTeamsMeeting',\n 'joinCallFailedDueToNoNetwork',\n 'leftCall',\n /* @conditional-compile-remove(rooms) */ 'deniedPermissionToRoom',\n 'removedFromCall',\n /* @conditional-compile-remove(rooms) */ 'roomNotFound',\n /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment'\n];\n\n/**\n * options object to enable opt in features for the CallAdapter\n *\n * @beta\n */\nexport type CallAdapterOptionalFeatures = {\n /**\n * Feature flag for enabling the unsupported environment logic in the CallAdapter.\n */\n unsupportedEnvironment?: boolean;\n};\n\n/**\n * {@link CommonCallAdapter} state for pure UI purposes.\n *\n * @public\n */\nexport type CallAdapterUiState = {\n isLocalPreviewMicrophoneEnabled: boolean;\n page: CallCompositePage;\n};\n\n/**\n * {@link CommonCallAdapter} state inferred from Azure Communication Services backend.\n *\n * @public\n */\nexport type CallAdapterClientState = {\n userId: CommunicationIdentifierKind;\n displayName?: string;\n call?: CallState;\n devices: DeviceManagerState;\n endedCall?: CallState;\n isTeamsCall: boolean;\n /**\n * Latest error encountered for each operation performed via the adapter.\n */\n latestErrors: AdapterErrors;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Azure communications Phone number to make PSTN calls with.\n */\n alternateCallerId?: string;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Environment information about system the adapter is made on\n */\n environmentInfo?: EnvironmentInfo;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Optional features that are to be enabled through the adapter.\n */\n features?: CallAdapterOptionalFeatures;\n /* @conditional-compile-remove(rooms) */\n /**\n * Use this to hint the role of the user when the role is not available before a Rooms call is started. This value\n * should be obtained using the Rooms API. This role will determine permissions in the configuration page of the\n * {@link CallComposite}. The true role of the user will be synced with ACS services when a Rooms call starts.\n */\n roleHint?: Role;\n};\n\n/**\n * {@link CommonCallAdapter} state.\n *\n * @public\n */\nexport type CallAdapterState = CallAdapterUiState & CallAdapterClientState;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsJoined' event.\n *\n * @public\n */\nexport type ParticipantsJoinedListener = (event: { joined: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsLeft' event.\n *\n * @public\n */\nexport type ParticipantsLeftListener = (event: { removed: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isMuted' event.\n *\n * @public\n */\nexport type IsMutedChangedListener = (event: { identifier: CommunicationIdentifierKind; isMuted: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callIdChanged' event.\n *\n * @public\n */\nexport type CallIdChangedListener = (event: { callId: string }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isLocalScreenSharingActiveChanged' event.\n *\n * @public\n */\nexport type IsLocalScreenSharingActiveChangedListener = (event: { isScreenSharingOn: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isSpeakingChanged' event.\n *\n * @public\n */\nexport type IsSpeakingChangedListener = (event: {\n identifier: CommunicationIdentifierKind;\n isSpeaking: boolean;\n}) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'displayNameChanged' event.\n *\n * @public\n */\nexport type DisplayNameChangedListener = (event: {\n participantId: CommunicationIdentifierKind;\n displayName: string;\n}) => void;\n\n/**\n * Payload for {@link CallEndedListener} containing details on the ended call.\n *\n * @public\n */\nexport type CallAdapterCallEndedEvent = { callId: string };\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callEnded' event.\n *\n * @public\n */\nexport type CallEndedListener = (event: CallAdapterCallEndedEvent) => void;\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a media diagnostic.\n *\n * @public\n */\nexport type MediaDiagnosticChangedEvent = MediaDiagnosticChangedEventArgs & {\n type: 'media';\n};\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a network diagnostic.\n *\n * @public\n */\nexport type NetworkDiagnosticChangedEvent = NetworkDiagnosticChangedEventArgs & {\n type: 'network';\n};\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'diagnosticChanged' event.\n *\n * @public\n */\nexport type DiagnosticChangedEventListner = (\n event: MediaDiagnosticChangedEvent | NetworkDiagnosticChangedEvent\n) => void;\n\n/**\n * Functionality for managing the current call.\n *\n * @public\n */\nexport interface CallAdapterCallOperations {\n /**\n * Leave the call\n *\n * @param forEveryone - Whether to remove all participants when leaving\n *\n * @public\n */\n leaveCall(forEveryone?: boolean): Promise<void>;\n /**\n * Start the camera\n * This method will start rendering a local camera view when the call is not active\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n startCamera(options?: VideoStreamOptions): Promise<void>;\n /**\n * Stop the camera\n * This method will stop rendering a local camera view when the call is not active\n *\n * @public\n */\n stopCamera(): Promise<void>;\n /**\n * Mute the current user during the call or disable microphone locally\n *\n * @public\n */\n mute(): Promise<void>;\n /**\n * Unmute the current user during the call or enable microphone locally\n *\n * @public\n */\n unmute(): Promise<void>;\n /**\n * Start sharing the screen during a call.\n *\n * @public\n */\n startScreenShare(): Promise<void>;\n /**\n * Stop sharing the screen\n *\n * @public\n */\n stopScreenShare(): Promise<void>;\n /**\n * Remove a participant from the call.\n *\n * @param userId - Id of the participant to be removed\n *\n * @public\n */\n removeParticipant(userId: string): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Remove a participant from the call.\n * @param participant - {@link @azure/communication-common#CommunicationIdentifier} of the participant to be removed\n * @beta\n */\n removeParticipant(participant: CommunicationIdentifier): Promise<void>;\n /**\n * Create the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;\n /**\n * Dispose the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Holds the call.\n *\n * @beta\n */\n holdCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Resumes the call from a `LocalHold` state.\n *\n * @beta\n */\n resumeCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Add a participant to the call.\n *\n * @beta\n */\n addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * send dtmf tone to another participant in a 1:1 PSTN call\n *\n * @beta\n */\n sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;\n}\n\n/**\n * Functionality for managing devices within a call.\n *\n * @public\n */\nexport interface CallAdapterDeviceManagement {\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @public\n */\n askDevicePermission(constrain: PermissionConstraints): Promise<void>;\n /**\n * Query for available camera devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }\n *\n * @public\n */\n queryCameras(): Promise<VideoDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n queryMicrophones(): Promise<AudioDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n querySpeakers(): Promise<AudioDeviceInfo[]>;\n /**\n * Set the camera to use in the call.\n *\n * @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }\n * @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>;\n /**\n * Set the microphone to use in the call.\n *\n * @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }\n *\n * @public\n */\n setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>;\n /**\n * Set the speaker to use in the call.\n *\n * @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }\n *\n * @public\n */\n setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>;\n}\n\n/**\n * Call composite events that can be subscribed to.\n *\n * @public\n */\nexport interface CallAdapterSubscribers {\n /**\n * Subscribe function for 'participantsJoined' event.\n */\n on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Subscribe function for 'participantsLeft' event.\n */\n on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Subscribe function for 'isMutedChanged' event.\n *\n * @remarks\n * The event will be triggered whenever current user or remote user mute state changed\n *\n */\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Subscribe function for 'callIdChanged' event.\n *\n * @remarks\n * The event will be triggered when callId of current user changed.\n *\n */\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Subscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Subscribe function for 'displayNameChanged' event.\n */\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Subscribe function for 'isSpeakingChanged' event.\n */\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Subscribe function for 'callEnded' event.\n */\n on(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Subscribe function for 'diagnosticChanged' event.\n *\n * This event fires whenever there is a change in user facing diagnostics about the ongoing call.\n */\n on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Subscribe function for 'selectedMicrophoneChanged' event.\n *\n * This event fires whenever the user selects a new microphone device.\n */\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'selectedSpeakerChanged' event.\n *\n * This event fires whenever the user selects a new speaker device.\n */\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'error' event.\n */\n on(event: 'error', listener: (e: AdapterError) => void): void;\n\n /**\n * Unsubscribe function for 'participantsJoined' event.\n */\n off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Unsubscribe function for 'participantsLeft' event.\n */\n off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Unsubscribe function for 'isMutedChanged' event.\n */\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Unsubscribe function for 'callIdChanged' event.\n */\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Unsubscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Unsubscribe function for 'displayNameChanged' event.\n */\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Unsubscribe function for 'isSpeakingChanged' event.\n */\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Unsubscribe function for 'callEnded' event.\n */\n off(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Unsubscribe function for 'diagnosticChanged' event.\n */\n off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Unsubscribe function for 'selectedMicrophoneChanged' event.\n */\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'selectedSpeakerChanged' event.\n */\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'error' event.\n */\n off(event: 'error', listener: (e: AdapterError) => void): void;\n}\n\n// This type remains for non-breaking change reason\n/**\n * Functionality for managing the current call or start a new call\n * @deprecated CallAdapter interface will be flatten, consider using CallAdapter directly\n * @public\n */\nexport interface CallAdapterCallManagement extends CallAdapterCallOperations {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;\n}\n\n// TODO: Flatten the adapter structure\n/**\n * {@link CallComposite} Adapter interface.\n *\n * @public\n */\nexport interface CommonCallAdapter\n extends AdapterState<CallAdapterState>,\n Disposable,\n CallAdapterCallOperations,\n CallAdapterDeviceManagement,\n CallAdapterSubscribers {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): void;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): void;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): void;\n}\n\n/**\n * An Adapter interface specific for Azure Communication identity which extends {@link CommonCallAdapter}.\n *\n * @public\n */\nexport interface CallAdapter extends CommonCallAdapter {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;\n}\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * An Adapter interface specific for Teams identity which extends {@link CommonCallAdapter}.\n *\n * @beta\n */\nexport interface TeamsCallAdapter extends CommonCallAdapter {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @beta\n */\n joinCall(microphoneOn?: boolean): TeamsCall | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @beta\n */\n startCall(participants: string[], options?: StartCallOptions): TeamsCall | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): TeamsCall | undefined;\n}\n\"../../../../../calling-stateful-client/src\"\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/CallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAiDlC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB;IACjD,0BAA0B;IAC1B,8BAA8B;IAC9B,UAAU;IACV,wCAAwC,CAAC,wBAAwB;IACjE,iBAAiB;IACjB,wCAAwC,CAAC,cAAc;IACvD,sDAAsD,CAAC,wBAAwB;CAChF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CallState, DeviceManagerState } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { EnvironmentInfo, TeamsCall } from '@azure/communication-calling';\nimport type {\n AudioDeviceInfo,\n VideoDeviceInfo,\n Call,\n PermissionConstraints,\n RemoteParticipant,\n StartCallOptions,\n MediaDiagnosticChangedEventArgs,\n NetworkDiagnosticChangedEventArgs,\n PropertyChangedEvent\n} from '@azure/communication-calling';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { Role } from '@internal/react-components';\nimport type { CommunicationIdentifierKind } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';\n\n/* @conditional-compile-remove(PSTN-calls) */\nimport type {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n PhoneNumberIdentifier\n} from '@azure/communication-common';\nimport type { AdapterState, Disposable, AdapterError, AdapterErrors } from '../../common/adapters';\n\n/**\n * Major UI screens shown in the {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositePage =\n | 'accessDeniedTeamsMeeting'\n | 'call'\n | 'configuration'\n | /* @conditional-compile-remove(PSTN-calls) */ 'hold'\n | 'joinCallFailedDueToNoNetwork'\n | 'leftCall'\n | 'lobby'\n | /* @conditional-compile-remove(rooms) */ 'deniedPermissionToRoom'\n | 'removedFromCall'\n | /* @conditional-compile-remove(rooms) */ 'roomNotFound'\n | /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment';\n\n/**\n * Subset of CallCompositePages that represent an end call state.\n * @private\n */\nexport const END_CALL_PAGES: CallCompositePage[] = [\n 'accessDeniedTeamsMeeting',\n 'joinCallFailedDueToNoNetwork',\n 'leftCall',\n /* @conditional-compile-remove(rooms) */ 'deniedPermissionToRoom',\n 'removedFromCall',\n /* @conditional-compile-remove(rooms) */ 'roomNotFound',\n /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment'\n];\n\n/**\n * {@link CommonCallAdapter} state for pure UI purposes.\n *\n * @public\n */\nexport type CallAdapterUiState = {\n isLocalPreviewMicrophoneEnabled: boolean;\n page: CallCompositePage;\n /* @conditional-compile-remove(unsupported-browser) */\n unsupportedBrowserVersionsAllowed?: boolean;\n};\n\n/**\n * {@link CommonCallAdapter} state inferred from Azure Communication Services backend.\n *\n * @public\n */\nexport type CallAdapterClientState = {\n userId: CommunicationIdentifierKind;\n displayName?: string;\n call?: CallState;\n devices: DeviceManagerState;\n endedCall?: CallState;\n isTeamsCall: boolean;\n /**\n * Latest error encountered for each operation performed via the adapter.\n */\n latestErrors: AdapterErrors;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Azure communications Phone number to make PSTN calls with.\n */\n alternateCallerId?: string;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Environment information about system the adapter is made on\n */\n environmentInfo?: EnvironmentInfo;\n /* @conditional-compile-remove(rooms) */\n /**\n * Use this to hint the role of the user when the role is not available before a Rooms call is started. This value\n * should be obtained using the Rooms API. This role will determine permissions in the configuration page of the\n * {@link CallComposite}. The true role of the user will be synced with ACS services when a Rooms call starts.\n */\n roleHint?: Role;\n};\n\n/**\n * {@link CommonCallAdapter} state.\n *\n * @public\n */\nexport type CallAdapterState = CallAdapterUiState & CallAdapterClientState;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsJoined' event.\n *\n * @public\n */\nexport type ParticipantsJoinedListener = (event: { joined: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsLeft' event.\n *\n * @public\n */\nexport type ParticipantsLeftListener = (event: { removed: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isMuted' event.\n *\n * @public\n */\nexport type IsMutedChangedListener = (event: { identifier: CommunicationIdentifierKind; isMuted: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callIdChanged' event.\n *\n * @public\n */\nexport type CallIdChangedListener = (event: { callId: string }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isLocalScreenSharingActiveChanged' event.\n *\n * @public\n */\nexport type IsLocalScreenSharingActiveChangedListener = (event: { isScreenSharingOn: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isSpeakingChanged' event.\n *\n * @public\n */\nexport type IsSpeakingChangedListener = (event: {\n identifier: CommunicationIdentifierKind;\n isSpeaking: boolean;\n}) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'displayNameChanged' event.\n *\n * @public\n */\nexport type DisplayNameChangedListener = (event: {\n participantId: CommunicationIdentifierKind;\n displayName: string;\n}) => void;\n\n/**\n * Payload for {@link CallEndedListener} containing details on the ended call.\n *\n * @public\n */\nexport type CallAdapterCallEndedEvent = { callId: string };\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callEnded' event.\n *\n * @public\n */\nexport type CallEndedListener = (event: CallAdapterCallEndedEvent) => void;\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a media diagnostic.\n *\n * @public\n */\nexport type MediaDiagnosticChangedEvent = MediaDiagnosticChangedEventArgs & {\n type: 'media';\n};\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a network diagnostic.\n *\n * @public\n */\nexport type NetworkDiagnosticChangedEvent = NetworkDiagnosticChangedEventArgs & {\n type: 'network';\n};\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'diagnosticChanged' event.\n *\n * @public\n */\nexport type DiagnosticChangedEventListner = (\n event: MediaDiagnosticChangedEvent | NetworkDiagnosticChangedEvent\n) => void;\n\n/**\n * Functionality for managing the current call.\n *\n * @public\n */\nexport interface CallAdapterCallOperations {\n /**\n * Leave the call\n *\n * @param forEveryone - Whether to remove all participants when leaving\n *\n * @public\n */\n leaveCall(forEveryone?: boolean): Promise<void>;\n /**\n * Start the camera\n * This method will start rendering a local camera view when the call is not active\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n startCamera(options?: VideoStreamOptions): Promise<void>;\n /**\n * Stop the camera\n * This method will stop rendering a local camera view when the call is not active\n *\n * @public\n */\n stopCamera(): Promise<void>;\n /**\n * Mute the current user during the call or disable microphone locally\n *\n * @public\n */\n mute(): Promise<void>;\n /**\n * Unmute the current user during the call or enable microphone locally\n *\n * @public\n */\n unmute(): Promise<void>;\n /**\n * Start sharing the screen during a call.\n *\n * @public\n */\n startScreenShare(): Promise<void>;\n /**\n * Stop sharing the screen\n *\n * @public\n */\n stopScreenShare(): Promise<void>;\n /**\n * Remove a participant from the call.\n *\n * @param userId - Id of the participant to be removed\n *\n * @public\n */\n removeParticipant(userId: string): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Remove a participant from the call.\n * @param participant - {@link @azure/communication-common#CommunicationIdentifier} of the participant to be removed\n * @beta\n */\n removeParticipant(participant: CommunicationIdentifier): Promise<void>;\n /**\n * Create the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;\n /**\n * Dispose the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Holds the call.\n *\n * @beta\n */\n holdCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Resumes the call from a `LocalHold` state.\n *\n * @beta\n */\n resumeCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Add a participant to the call.\n *\n * @beta\n */\n addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * send dtmf tone to another participant in a 1:1 PSTN call\n *\n * @beta\n */\n sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Continues into a call when the browser version is not supported.\n */\n allowUnsupportedBrowserVersion(): void;\n}\n\n/**\n * Functionality for managing devices within a call.\n *\n * @public\n */\nexport interface CallAdapterDeviceManagement {\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @public\n */\n askDevicePermission(constrain: PermissionConstraints): Promise<void>;\n /**\n * Query for available camera devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }\n *\n * @public\n */\n queryCameras(): Promise<VideoDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n queryMicrophones(): Promise<AudioDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n querySpeakers(): Promise<AudioDeviceInfo[]>;\n /**\n * Set the camera to use in the call.\n *\n * @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }\n * @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>;\n /**\n * Set the microphone to use in the call.\n *\n * @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }\n *\n * @public\n */\n setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>;\n /**\n * Set the speaker to use in the call.\n *\n * @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }\n *\n * @public\n */\n setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>;\n}\n\n/**\n * Call composite events that can be subscribed to.\n *\n * @public\n */\nexport interface CallAdapterSubscribers {\n /**\n * Subscribe function for 'participantsJoined' event.\n */\n on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Subscribe function for 'participantsLeft' event.\n */\n on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Subscribe function for 'isMutedChanged' event.\n *\n * @remarks\n * The event will be triggered whenever current user or remote user mute state changed\n *\n */\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Subscribe function for 'callIdChanged' event.\n *\n * @remarks\n * The event will be triggered when callId of current user changed.\n *\n */\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Subscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Subscribe function for 'displayNameChanged' event.\n */\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Subscribe function for 'isSpeakingChanged' event.\n */\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Subscribe function for 'callEnded' event.\n */\n on(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Subscribe function for 'diagnosticChanged' event.\n *\n * This event fires whenever there is a change in user facing diagnostics about the ongoing call.\n */\n on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Subscribe function for 'selectedMicrophoneChanged' event.\n *\n * This event fires whenever the user selects a new microphone device.\n */\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'selectedSpeakerChanged' event.\n *\n * This event fires whenever the user selects a new speaker device.\n */\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'error' event.\n */\n on(event: 'error', listener: (e: AdapterError) => void): void;\n\n /**\n * Unsubscribe function for 'participantsJoined' event.\n */\n off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Unsubscribe function for 'participantsLeft' event.\n */\n off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Unsubscribe function for 'isMutedChanged' event.\n */\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Unsubscribe function for 'callIdChanged' event.\n */\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Unsubscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Unsubscribe function for 'displayNameChanged' event.\n */\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Unsubscribe function for 'isSpeakingChanged' event.\n */\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Unsubscribe function for 'callEnded' event.\n */\n off(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Unsubscribe function for 'diagnosticChanged' event.\n */\n off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Unsubscribe function for 'selectedMicrophoneChanged' event.\n */\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'selectedSpeakerChanged' event.\n */\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'error' event.\n */\n off(event: 'error', listener: (e: AdapterError) => void): void;\n}\n\n// This type remains for non-breaking change reason\n/**\n * Functionality for managing the current call or start a new call\n * @deprecated CallAdapter interface will be flatten, consider using CallAdapter directly\n * @public\n */\nexport interface CallAdapterCallManagement extends CallAdapterCallOperations {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;\n}\n\n// TODO: Flatten the adapter structure\n/**\n * {@link CallComposite} Adapter interface.\n *\n * @public\n */\nexport interface CommonCallAdapter\n extends AdapterState<CallAdapterState>,\n Disposable,\n CallAdapterCallOperations,\n CallAdapterDeviceManagement,\n CallAdapterSubscribers {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): void;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): void;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): void;\n}\n\n/**\n * An Adapter interface specific for Azure Communication identity which extends {@link CommonCallAdapter}.\n *\n * @public\n */\nexport interface CallAdapter extends CommonCallAdapter {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined;\n}\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * An Adapter interface specific for Teams identity which extends {@link CommonCallAdapter}.\n *\n * @beta\n */\nexport interface TeamsCallAdapter extends CommonCallAdapter {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @beta\n */\n joinCall(microphoneOn?: boolean): TeamsCall | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @beta\n */\n startCall(participants: string[], options?: StartCallOptions): TeamsCall | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @beta\n */\n startCall(participants: CommunicationIdentifier[], options?: StartCallOptions): TeamsCall | undefined;\n}\n\"../../../../../calling-stateful-client/src\"\"../../../../../react-components/src\""]}
@@ -1,9 +1,9 @@
1
1
  export { createAzureCommunicationCallAdapter, createAzureCommunicationCallAdapterFromClient, useAzureCommunicationCallAdapter } from './AzureCommunicationCallAdapter';
2
- export { createAzureCommunicationTeamsCallAdapter, createAzureCommunicationTeamsCallAdapterFromClient, useAzureCommunicationTeamsCallAdapter } from './AzureCommunicationCallAdapter';
2
+ export { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './AzureCommunicationCallAdapter';
3
+ export type { TeamsCallAdapterArgs } from './AzureCommunicationCallAdapter';
3
4
  export type { AzureCommunicationCallAdapterArgs, CallAdapterLocator } from './AzureCommunicationCallAdapter';
4
5
  export type { AzureCommunicationCallAdapterOptions } from './AzureCommunicationCallAdapter';
5
6
  export type { CallParticipantsLocator } from './AzureCommunicationCallAdapter';
6
- export type { CallAdapterOptionalFeatures } from './CallAdapter';
7
7
  export type { CallAdapter, CommonCallAdapter, CallAdapterCallEndedEvent, CallAdapterCallManagement, CallAdapterCallOperations, CallAdapterClientState, CallAdapterDeviceManagement, CallAdapterState, CallAdapterSubscribers, CallAdapterUiState, CallCompositePage, CallEndedListener, CallIdChangedListener, DiagnosticChangedEventListner, DisplayNameChangedListener, IsLocalScreenSharingActiveChangedListener, IsMutedChangedListener, IsSpeakingChangedListener, MediaDiagnosticChangedEvent, NetworkDiagnosticChangedEvent, ParticipantsJoinedListener, ParticipantsLeftListener } from './CallAdapter';
8
8
  export type { TeamsCallAdapter } from './CallAdapter';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -2,5 +2,5 @@
2
2
  // Licensed under the MIT license.
3
3
  export { createAzureCommunicationCallAdapter, createAzureCommunicationCallAdapterFromClient, useAzureCommunicationCallAdapter } from './AzureCommunicationCallAdapter';
4
4
  /* @conditional-compile-remove(teams-identity-support) */
5
- export { createAzureCommunicationTeamsCallAdapter, createAzureCommunicationTeamsCallAdapterFromClient, useAzureCommunicationTeamsCallAdapter } from './AzureCommunicationCallAdapter';
5
+ export { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './AzureCommunicationCallAdapter';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,iCAAiC,CAAC;AAEzC,yDAAyD;AACzD,OAAO,EACL,wCAAwC,EACxC,kDAAkD,EAClD,qCAAqC,EACtC,MAAM,iCAAiC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './AzureCommunicationCallAdapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n createAzureCommunicationTeamsCallAdapter,\n createAzureCommunicationTeamsCallAdapterFromClient,\n useAzureCommunicationTeamsCallAdapter\n} from './AzureCommunicationCallAdapter';\nexport type { AzureCommunicationCallAdapterArgs, CallAdapterLocator } from './AzureCommunicationCallAdapter';\n/* @conditional-compile-remove(rooms) */\nexport type { AzureCommunicationCallAdapterOptions } from './AzureCommunicationCallAdapter';\n\n/* @conditional-compile-remove(teams-adhoc-call) */\nexport type { CallParticipantsLocator } from './AzureCommunicationCallAdapter';\n\nexport type { CallAdapterOptionalFeatures } from './CallAdapter';\n\nexport type {\n CallAdapter,\n CommonCallAdapter,\n CallAdapterCallEndedEvent,\n CallAdapterCallManagement,\n CallAdapterCallOperations,\n CallAdapterClientState,\n CallAdapterDeviceManagement,\n CallAdapterState,\n CallAdapterSubscribers,\n CallAdapterUiState,\n CallCompositePage,\n CallEndedListener,\n CallIdChangedListener,\n DiagnosticChangedEventListner,\n DisplayNameChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsMutedChangedListener,\n IsSpeakingChangedListener,\n MediaDiagnosticChangedEvent,\n NetworkDiagnosticChangedEvent,\n ParticipantsJoinedListener,\n ParticipantsLeftListener\n} from './CallAdapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapter } from './CallAdapter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,iCAAiC,CAAC;AAEzC,yDAAyD;AACzD,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,mBAAmB,EACpB,MAAM,iCAAiC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './AzureCommunicationCallAdapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n createTeamsCallAdapter,\n createTeamsCallAdapterFromClient,\n useTeamsCallAdapter\n} from './AzureCommunicationCallAdapter';\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapterArgs } from './AzureCommunicationCallAdapter';\nexport type { AzureCommunicationCallAdapterArgs, CallAdapterLocator } from './AzureCommunicationCallAdapter';\n/* @conditional-compile-remove(rooms) */\nexport type { AzureCommunicationCallAdapterOptions } from './AzureCommunicationCallAdapter';\n\n/* @conditional-compile-remove(teams-adhoc-call) */\nexport type { CallParticipantsLocator } from './AzureCommunicationCallAdapter';\n\nexport type {\n CallAdapter,\n CommonCallAdapter,\n CallAdapterCallEndedEvent,\n CallAdapterCallManagement,\n CallAdapterCallOperations,\n CallAdapterClientState,\n CallAdapterDeviceManagement,\n CallAdapterState,\n CallAdapterSubscribers,\n CallAdapterUiState,\n CallCompositePage,\n CallEndedListener,\n CallIdChangedListener,\n DiagnosticChangedEventListner,\n DisplayNameChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsMutedChangedListener,\n IsSpeakingChangedListener,\n MediaDiagnosticChangedEvent,\n NetworkDiagnosticChangedEvent,\n ParticipantsJoinedListener,\n ParticipantsLeftListener\n} from './CallAdapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapter } from './CallAdapter';\n"]}
@@ -7,6 +7,7 @@ import { MutedNotificationProps } from './MutedNotification';
7
7
  * @private
8
8
  */
9
9
  export interface CallArrangementProps {
10
+ id?: string;
10
11
  complianceBannerProps: _ComplianceBannerProps;
11
12
  errorBarProps: ErrorBarProps | false;
12
13
  mutedNotificationProps?: MutedNotificationProps;
@@ -13,7 +13,7 @@ import { useAdapter } from '../adapter/CallAdapterProvider';
13
13
  import { CallControls } from '../components/CallControls';
14
14
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
15
15
  import { useSidePaneState } from '../hooks/useSidePaneState';
16
- import { callControlsContainerStyles, notificationsContainerStyles, containerStyleDesktop, containerStyleMobile, mediaGalleryContainerStyles, galleryParentContainerStyles, bannerNotificationStyles } from '../styles/CallPage.styles';
16
+ import { callArrangementContainerStyles, callControlsContainerStyles, notificationsContainerStyles, containerStyleDesktop, containerStyleMobile, mediaGalleryContainerStyles, galleryParentContainerStyles, bannerNotificationStyles } from '../styles/CallPage.styles';
17
17
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
18
18
  import { CallPane } from './CallPane';
19
19
  import { MutedNotification } from './MutedNotification';
@@ -75,29 +75,30 @@ export const CallArrangement = (props) => {
75
75
  /* @conditional-compile-remove(rooms) */
76
76
  // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK
77
77
  if (!rolePermissions.cameraButton && props.errorBarProps) {
78
- errorBarProps = Object.assign(Object.assign({}, props.errorBarProps), { activeErrorMessages: props.errorBarProps.activeErrorMessages.filter((e) => e.type !== 'callCameraAccessDenied') });
78
+ errorBarProps = Object.assign(Object.assign({}, props.errorBarProps), { activeErrorMessages: props.errorBarProps.activeErrorMessages.filter((e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari') });
79
79
  }
80
- return (React.createElement("div", { ref: containerRef, className: mergeStyles(containerDivStyles) },
80
+ return (React.createElement("div", { ref: containerRef, className: mergeStyles(containerDivStyles), id: props.id },
81
81
  React.createElement(Stack, { verticalFill: true, horizontalAlign: "stretch", className: containerClassName, "data-ui-id": props.dataUiId },
82
- React.createElement(Stack, { horizontal: true, grow: true },
82
+ React.createElement(Stack, { grow: true, styles: callArrangementContainerStyles },
83
83
  React.createElement(Stack.Item, { styles: notificationsContainerStyles },
84
84
  React.createElement(Stack, { styles: bannerNotificationStyles },
85
85
  React.createElement(_ComplianceBanner, Object.assign({}, props.complianceBannerProps))),
86
86
  errorBarProps !== false && (React.createElement(Stack, { styles: bannerNotificationStyles },
87
87
  React.createElement(ErrorBar, Object.assign({}, errorBarProps)))),
88
88
  canUnmute && !!props.mutedNotificationProps && React.createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps))),
89
- React.createElement(Stack.Item, { grow: true, style: callCompositeContainerFlex() },
90
- React.createElement(Stack.Item, { styles: callGalleryStyles, grow: true }, props.onRenderGalleryContent && (React.createElement(Stack, { verticalFill: true, styles: mediaGalleryContainerStyles }, props.onRenderGalleryContent())))),
91
- /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
92
- callPaneContent()),
93
- ((_b = props.callControlProps) === null || _b === void 0 ? void 0 : _b.options) !== false &&
94
- /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
95
- !isMobileWithActivePane && (React.createElement(Stack.Item, { className: callControlsContainerStyles },
96
- React.createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView,
97
- /* @conditional-compile-remove(one-to-n-calling) */
98
- peopleButtonChecked: activePane === 'people',
99
- /* @conditional-compile-remove(one-to-n-calling) */
100
- onPeopleButtonClicked: togglePeoplePane })))))));
89
+ ((_b = props.callControlProps) === null || _b === void 0 ? void 0 : _b.options) !== false &&
90
+ /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
91
+ !isMobileWithActivePane && (React.createElement(Stack.Item, { className: callControlsContainerStyles },
92
+ React.createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView,
93
+ /* @conditional-compile-remove(one-to-n-calling) */
94
+ peopleButtonChecked: activePane === 'people',
95
+ /* @conditional-compile-remove(one-to-n-calling) */
96
+ onPeopleButtonClicked: togglePeoplePane })))),
97
+ React.createElement(Stack, { horizontal: true, grow: true },
98
+ React.createElement(Stack.Item, { grow: true, style: callCompositeContainerFlex() },
99
+ React.createElement(Stack.Item, { styles: callGalleryStyles, grow: true }, props.onRenderGalleryContent && (React.createElement(Stack, { verticalFill: true, styles: mediaGalleryContainerStyles }, props.onRenderGalleryContent())))),
100
+ /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
101
+ callPaneContent())))));
101
102
  };
102
103
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
103
104
  const showShowPeopleTabHeaderButton = (callControls) => {
@@ -1 +1 @@
1
- {"version":3,"file":"CallArrangement.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallArrangement.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EAER,QAAQ,EACT,4CAAmC;AACpC,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/C,2FAA2F;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,2FAA2F;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAqB,MAAM,4BAA4B,CAAC;AAC7E,2FAA2F;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EACpB,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AAGnC,2FAA2F;AAC3F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAA0B,MAAM,qBAAqB,CAAC;AAmBhF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAe,EAAE;;IAC1E,MAAM,kBAAkB,G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,2FAA2F;gBAC3F,eAAe,EAAE,CAEb;YACP,CAAA,MAAA,KAAK,CAAC,gBAAgB,0CAAE,OAAO,MAAK,KAAK;gBACxC,2FAA2F;gBAC3F,CAAC,sBAAsB,IAAI,CACzB,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,2BAA2B;gBAChD,oBAAC,YAAY,oBACP,KAAK,CAAC,gBAAgB,IAC1B,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,KAAK,CAAC,UAAU;oBAC1B,mDAAmD;oBACnD,mBAAmB,EAAE,UAAU,KAAK,QAAQ;oBAC5C,mDAAmD;oBACnD,qBAAqB,EAAE,gBAAgB,IACvC,CACS,CACd,CACG,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,2FAA2F;AAC3F,MAAM,6BAA6B,GAAG,CAAC,YAA2C,EAAW,EAAE;IAC7F,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE;QACvD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,kBAAkB,KAAK,KAAK,CAAC;AACnD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport {\n _ComplianceBanner,\n _ComplianceBannerProps,\n _useContainerHeight,\n _useContainerWidth,\n ErrorBar,\n ErrorBarProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo, useRef } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useCallback } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { containerDivStyles } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallControls, CallControlsProps } from '../components/CallControls';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useSidePaneState } from '../hooks/useSidePaneState';\nimport {\n callControlsContainerStyles,\n notificationsContainerStyles,\n containerStyleDesktop,\n containerStyleMobile,\n mediaGalleryContainerStyles,\n galleryParentContainerStyles,\n bannerNotificationStyles\n} from '../styles/CallPage.styles';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallControlOptions } from '../types/CallControlOptions';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallPane } from './CallPane';\nimport { MutedNotification, MutedNotificationProps } from './MutedNotification';\n\n/**\n * @private\n */\nexport interface CallArrangementProps {\n complianceBannerProps: _ComplianceBannerProps;\n errorBarProps: ErrorBarProps | false;\n mutedNotificationProps?: MutedNotificationProps;\n callControlProps: CallControlsProps;\n onRenderGalleryContent: () => JSX.Element;\n dataUiId: string;\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n}\n\n/**\n * @private\n */\nexport const CallArrangement = (props: CallArrangementProps): JSX.Element => {\n const containerClassName = useMemo(() => {\n return props.mobileView ? containerStyleMobile : containerStyleDesktop;\n }, [props.mobileView]);\n\n const theme = useTheme();\n const callGalleryStyles = useMemo(\n () => galleryParentContainerStyles(theme.palette.neutralLighterAlt),\n [theme.palette.neutralLighterAlt]\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const { activePane, closePane, openPeoplePane, togglePeoplePane } = useSidePaneState();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const isMobileWithActivePane = props.mobileView && activePane;\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callCompositeContainerCSS = useMemo(() => {\n return { display: isMobileWithActivePane ? 'none' : 'flex' };\n }, [isMobileWithActivePane]);\n\n // To be removed once feature is out of beta, replace with callCompositeContainerCSS\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const callCompositeContainerFlex = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return callCompositeContainerCSS;\n return { display: 'flex' };\n };\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callPaneContent = useCallback((): JSX.Element => {\n if (adapter && activePane === 'people') {\n return (\n <CallPane\n callAdapter={adapter}\n onClose={closePane}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.callControlProps?.onFetchParticipantMenuItems}\n onPeopleButtonClicked={\n showShowPeopleTabHeaderButton(props.callControlProps.options) ? openPeoplePane : undefined\n }\n callControls={\n typeof props.callControlProps.options !== 'boolean' ? props.callControlProps.options : undefined\n }\n modalLayerHostId={props.modalLayerHostId}\n activePane={activePane}\n mobileView={props.mobileView}\n inviteLink={props.callControlProps.callInvitationURL}\n />\n );\n }\n return <></>;\n }, [\n activePane,\n adapter,\n closePane,\n props.callControlProps.callInvitationURL,\n props.callControlProps?.onFetchParticipantMenuItems,\n props.callControlProps.options,\n props.mobileView,\n props.modalLayerHostId,\n props.onFetchAvatarPersonaData,\n openPeoplePane\n ]);\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let canUnmute = true;\n /* @conditional-compile-remove(rooms) */\n canUnmute = rolePermissions.microphoneButton;\n\n let errorBarProps = props.errorBarProps;\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (!rolePermissions.cameraButton && props.errorBarProps) {\n errorBarProps = {\n ...props.errorBarProps,\n activeErrorMessages: props.errorBarProps.activeErrorMessages.filter((e) => e.type !== 'callCameraAccessDenied')\n };\n }\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)}>\n <Stack verticalFill horizontalAlign=\"stretch\" className={containerClassName} data-ui-id={props.dataUiId}>\n <Stack horizontal grow>\n <Stack.Item styles={notificationsContainerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <_ComplianceBanner {...props.complianceBannerProps} />\n </Stack>\n {errorBarProps !== false && (\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...errorBarProps} />\n </Stack>\n )}\n {canUnmute && !!props.mutedNotificationProps && <MutedNotification {...props.mutedNotificationProps} />}\n </Stack.Item>\n <Stack.Item grow style={callCompositeContainerFlex()}>\n <Stack.Item styles={callGalleryStyles} grow>\n {props.onRenderGalleryContent && (\n <Stack verticalFill styles={mediaGalleryContainerStyles}>\n {props.onRenderGalleryContent()}\n </Stack>\n )}\n </Stack.Item>\n </Stack.Item>\n {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n callPaneContent()\n }\n </Stack>\n {props.callControlProps?.options !== false &&\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n !isMobileWithActivePane && (\n <Stack.Item className={callControlsContainerStyles}>\n <CallControls\n {...props.callControlProps}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n isMobile={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked={activePane === 'people'}\n /* @conditional-compile-remove(one-to-n-calling) */\n onPeopleButtonClicked={togglePeoplePane}\n />\n </Stack.Item>\n )}\n </Stack>\n </div>\n );\n};\n\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.participantsButton !== false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallArrangement.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallArrangement.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EAER,QAAQ,EACT,4CAAmC;AACpC,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/C,2FAA2F;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,2FAA2F;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAqB,MAAM,4BAA4B,CAAC;AAC7E,2FAA2F;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EACpB,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AAGnC,2FAA2F;AAC3F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC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K,KAAK;oBACxC,2FAA2F;oBAC3F,CAAC,sBAAsB,IAAI,CACzB,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,2BAA2B;oBAChD,oBAAC,YAAY,oBACP,KAAK,CAAC,gBAAgB,IAC1B,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,KAAK,CAAC,UAAU;wBAC1B,mDAAmD;wBACnD,mBAAmB,EAAE,UAAU,KAAK,QAAQ;wBAC5C,mDAAmD;wBACnD,qBAAqB,EAAE,gBAAgB,IACvC,CACS,CACd;gBACH,oBAAC,KAAK,IAAC,UAAU,QAAC,IAAI;oBACpB,oBAAC,KAAK,CAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,0BAA0B,EAAE;wBAClD,oBAAC,KAAK,CAAC,IAAI,IAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,UACxC,KAAK,CAAC,sBAAsB,IAAI,CAC/B,oBAAC,KAAK,IAAC,YAAY,QAAC,MAAM,EAAE,2BAA2B,IACpD,KAAK,CAAC,sBAAsB,EAAE,CACzB,CACT,CACU,CACF;oBAEX,2FAA2F;oBAC3F,eAAe,EAAE,CAEb,CACF,CACF,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,2FAA2F;AAC3F,MAAM,6BAA6B,GAAG,CAAC,YAA2C,EAAW,EAAE;IAC7F,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE;QACvD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,kBAAkB,KAAK,KAAK,CAAC;AACnD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport {\n _ComplianceBanner,\n _ComplianceBannerProps,\n _useContainerHeight,\n _useContainerWidth,\n ErrorBar,\n ErrorBarProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo, useRef } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useCallback } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { containerDivStyles } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallControls, CallControlsProps } from '../components/CallControls';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useSidePaneState } from '../hooks/useSidePaneState';\nimport {\n callArrangementContainerStyles,\n callControlsContainerStyles,\n notificationsContainerStyles,\n containerStyleDesktop,\n containerStyleMobile,\n mediaGalleryContainerStyles,\n galleryParentContainerStyles,\n bannerNotificationStyles\n} from '../styles/CallPage.styles';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallControlOptions } from '../types/CallControlOptions';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallPane } from './CallPane';\nimport { MutedNotification, MutedNotificationProps } from './MutedNotification';\n\n/**\n * @private\n */\nexport interface CallArrangementProps {\n id?: string;\n complianceBannerProps: _ComplianceBannerProps;\n errorBarProps: ErrorBarProps | false;\n mutedNotificationProps?: MutedNotificationProps;\n callControlProps: CallControlsProps;\n onRenderGalleryContent: () => JSX.Element;\n dataUiId: string;\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n}\n\n/**\n * @private\n */\nexport const CallArrangement = (props: CallArrangementProps): JSX.Element => {\n const containerClassName = useMemo(() => {\n return props.mobileView ? containerStyleMobile : containerStyleDesktop;\n }, [props.mobileView]);\n\n const theme = useTheme();\n const callGalleryStyles = useMemo(\n () => galleryParentContainerStyles(theme.palette.neutralLighterAlt),\n [theme.palette.neutralLighterAlt]\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const { activePane, closePane, openPeoplePane, togglePeoplePane } = useSidePaneState();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const isMobileWithActivePane = props.mobileView && activePane;\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callCompositeContainerCSS = useMemo(() => {\n return { display: isMobileWithActivePane ? 'none' : 'flex' };\n }, [isMobileWithActivePane]);\n\n // To be removed once feature is out of beta, replace with callCompositeContainerCSS\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const callCompositeContainerFlex = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return callCompositeContainerCSS;\n return { display: 'flex' };\n };\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callPaneContent = useCallback((): JSX.Element => {\n if (adapter && activePane === 'people') {\n return (\n <CallPane\n callAdapter={adapter}\n onClose={closePane}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.callControlProps?.onFetchParticipantMenuItems}\n onPeopleButtonClicked={\n showShowPeopleTabHeaderButton(props.callControlProps.options) ? openPeoplePane : undefined\n }\n callControls={\n typeof props.callControlProps.options !== 'boolean' ? props.callControlProps.options : undefined\n }\n modalLayerHostId={props.modalLayerHostId}\n activePane={activePane}\n mobileView={props.mobileView}\n inviteLink={props.callControlProps.callInvitationURL}\n />\n );\n }\n return <></>;\n }, [\n activePane,\n adapter,\n closePane,\n props.callControlProps.callInvitationURL,\n props.callControlProps?.onFetchParticipantMenuItems,\n props.callControlProps.options,\n props.mobileView,\n props.modalLayerHostId,\n props.onFetchAvatarPersonaData,\n openPeoplePane\n ]);\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let canUnmute = true;\n /* @conditional-compile-remove(rooms) */\n canUnmute = rolePermissions.microphoneButton;\n\n let errorBarProps = props.errorBarProps;\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (!rolePermissions.cameraButton && props.errorBarProps) {\n errorBarProps = {\n ...props.errorBarProps,\n activeErrorMessages: props.errorBarProps.activeErrorMessages.filter(\n (e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari'\n )\n };\n }\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)} id={props.id}>\n <Stack verticalFill horizontalAlign=\"stretch\" className={containerClassName} data-ui-id={props.dataUiId}>\n <Stack grow styles={callArrangementContainerStyles}>\n <Stack.Item styles={notificationsContainerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <_ComplianceBanner {...props.complianceBannerProps} />\n </Stack>\n {errorBarProps !== false && (\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...errorBarProps} />\n </Stack>\n )}\n {canUnmute && !!props.mutedNotificationProps && <MutedNotification {...props.mutedNotificationProps} />}\n </Stack.Item>\n {props.callControlProps?.options !== false &&\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n !isMobileWithActivePane && (\n <Stack.Item className={callControlsContainerStyles}>\n <CallControls\n {...props.callControlProps}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n isMobile={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked={activePane === 'people'}\n /* @conditional-compile-remove(one-to-n-calling) */\n onPeopleButtonClicked={togglePeoplePane}\n />\n </Stack.Item>\n )}\n <Stack horizontal grow>\n <Stack.Item grow style={callCompositeContainerFlex()}>\n <Stack.Item styles={callGalleryStyles} grow>\n {props.onRenderGalleryContent && (\n <Stack verticalFill styles={mediaGalleryContainerStyles}>\n {props.onRenderGalleryContent()}\n </Stack>\n )}\n </Stack.Item>\n </Stack.Item>\n {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n callPaneContent()\n }\n </Stack>\n </Stack>\n </Stack>\n </div>\n );\n};\n\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.participantsButton !== false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
@@ -1,16 +1,17 @@
1
1
  /// <reference types="react" />
2
+ import { EnvironmentInfo } from '@azure/communication-calling';
2
3
  /**
3
4
  * Modal that guides user through enabling their camera and mic access
4
5
  * @private
5
6
  */
6
7
  export declare const CallReadinessModal: (props: {
7
8
  mobileView: boolean;
8
- audioState: PermissionState;
9
- videoState: PermissionState;
9
+ modalLayerHostId: string;
10
10
  permissionsState: {
11
11
  camera: PermissionState;
12
12
  microphone: PermissionState;
13
13
  };
14
+ environmentInfo?: EnvironmentInfo | undefined;
14
15
  isPermissionsModalDismissed: boolean;
15
16
  setIsPermissionsModalDismissed: (boolean: any) => void;
16
17
  onPermissionsTroubleshootingClick?: ((permissionsState: {
@@ -25,13 +26,13 @@ export declare const CallReadinessModal: (props: {
25
26
  */
26
27
  export declare const CallReadinessModalFallBack: (props: {
27
28
  mobileView: boolean;
28
- cameraPermissionGranted: boolean | undefined;
29
- microphonePermissionGranted: boolean | undefined;
30
29
  checkPermissionModalShowing: boolean;
31
30
  permissionsState: {
32
31
  camera: PermissionState;
33
32
  microphone: PermissionState;
34
33
  };
34
+ modalLayerHostId: string;
35
+ environmentInfo?: EnvironmentInfo | undefined;
35
36
  isPermissionsModalDismissed: boolean;
36
37
  setIsPermissionsModalDismissed: (boolean: any) => void;
37
38
  onPermissionsTroubleshootingClick?: ((permissionsState: {
@@ -2,11 +2,13 @@
2
2
  // Licensed under the MIT license.
3
3
  import React from 'react';
4
4
  /* @conditional-compile-remove(call-readiness) */
5
- import { Modal } from '@fluentui/react';
5
+ import { CameraAndMicrophoneSitePermissions, CameraSitePermissions, MicrophoneSitePermissions, _DrawerSurface } from "../../../../../react-components/src";
6
6
  /* @conditional-compile-remove(call-readiness) */
7
- import { CameraAndMicrophoneDomainPermissions, CameraDomainPermissions, MicrophoneDomainPermissions, _DrawerSurface } from "../../../../../react-components/src";
7
+ import { _ModalClone } from "../../../../../react-components/src";
8
8
  /* @conditional-compile-remove(call-readiness) */
9
9
  import { drawerContainerStyles } from '../styles/CallComposite.styles';
10
+ /* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(unsupported-browser) */
11
+ import { _isSafari } from '../utils';
10
12
  /* @conditional-compile-remove(call-readiness) */
11
13
  const DRAWER_HIGH_Z_BAND = 99; // setting z index to 99 so that it sit above all components
12
14
  /* @conditional-compile-remove(call-readiness) */
@@ -15,18 +17,26 @@ const DRAWER_HIGH_Z_BAND = 99; // setting z index to 99 so that it sit above al
15
17
  * @private
16
18
  */
17
19
  export const CallReadinessModal = (props) => {
18
- const { mobileView, audioState, videoState, permissionsState, isPermissionsModalDismissed, setIsPermissionsModalDismissed, onPermissionsTroubleshootingClick } = props;
20
+ const { mobileView, permissionsState,
21
+ /* @conditional-compile-remove(unsupported-browser) */ environmentInfo, isPermissionsModalDismissed, setIsPermissionsModalDismissed, onPermissionsTroubleshootingClick } = props;
19
22
  const onLightDismissTriggered = () => {
20
23
  // do nothing here
21
24
  // only way to dismiss this drawer is clicking on allow access which will leads to device permission prompt
22
25
  };
26
+ // On Safari browser with 2 options: don't allow/never for this website again, when don't allow is clicked, permissionAPI returns prompt and PermissionGranted from calling sdk returns false (the right value)
27
+ const videoState = permissionsState.camera;
28
+ const audioState = permissionsState.microphone;
23
29
  const showModal = videoState === 'denied' || videoState === 'prompt' || audioState === 'denied' || audioState === 'prompt';
30
+ /* @conditional-compile-remove(unsupported-browser) */
31
+ const isSafari = _isSafari(environmentInfo);
24
32
  const modal = !showModal
25
33
  ? undefined
26
34
  : () => {
27
35
  // if both video and audio permission are not set
28
36
  if (videoState === 'prompt' && audioState === 'prompt') {
29
- return (React.createElement(CameraAndMicrophoneDomainPermissions, { appName: 'app', onTroubleshootingClick: onPermissionsTroubleshootingClick
37
+ return (React.createElement(CameraAndMicrophoneSitePermissions, { appName: 'app',
38
+ /* @conditional-compile-remove(unsupported-browser) */
39
+ browserHint: isSafari ? 'safari' : 'unset', onTroubleshootingClick: onPermissionsTroubleshootingClick
30
40
  ? () => {
31
41
  onPermissionsTroubleshootingClick(permissionsState);
32
42
  }
@@ -34,7 +44,9 @@ export const CallReadinessModal = (props) => {
34
44
  }
35
45
  // if audio permission is set up but video is not
36
46
  else if (videoState === 'prompt') {
37
- return (React.createElement(CameraDomainPermissions, { appName: 'app', onTroubleshootingClick: onPermissionsTroubleshootingClick
47
+ return (React.createElement(CameraSitePermissions, { appName: 'app',
48
+ /* @conditional-compile-remove(unsupported-browser) */
49
+ browserHint: isSafari ? 'safari' : 'unset', onTroubleshootingClick: onPermissionsTroubleshootingClick
38
50
  ? () => {
39
51
  onPermissionsTroubleshootingClick(permissionsState);
40
52
  }
@@ -44,7 +56,9 @@ export const CallReadinessModal = (props) => {
44
56
  }
45
57
  // if video permission is set up but audio is not
46
58
  else if (audioState === 'prompt') {
47
- return (React.createElement(MicrophoneDomainPermissions, { appName: 'app', onTroubleshootingClick: onPermissionsTroubleshootingClick
59
+ return (React.createElement(MicrophoneSitePermissions, { appName: 'app',
60
+ /* @conditional-compile-remove(unsupported-browser) */
61
+ browserHint: isSafari ? 'safari' : 'unset', onTroubleshootingClick: onPermissionsTroubleshootingClick
48
62
  ? () => {
49
63
  onPermissionsTroubleshootingClick(permissionsState);
50
64
  }
@@ -52,7 +66,9 @@ export const CallReadinessModal = (props) => {
52
66
  }
53
67
  // if both video and audio are denied
54
68
  else if (videoState === 'denied' && audioState === 'denied') {
55
- return (React.createElement(CameraAndMicrophoneDomainPermissions, { appName: 'app', onTroubleshootingClick: onPermissionsTroubleshootingClick
69
+ return (React.createElement(CameraAndMicrophoneSitePermissions, { appName: 'app',
70
+ /* @conditional-compile-remove(unsupported-browser) */
71
+ browserHint: isSafari ? 'safari' : 'unset', onTroubleshootingClick: onPermissionsTroubleshootingClick
56
72
  ? () => {
57
73
  onPermissionsTroubleshootingClick(permissionsState);
58
74
  }
@@ -60,7 +76,9 @@ export const CallReadinessModal = (props) => {
60
76
  }
61
77
  // if only video is denied
62
78
  else if (videoState === 'denied') {
63
- return (React.createElement(CameraDomainPermissions, { appName: 'app', onTroubleshootingClick: onPermissionsTroubleshootingClick
79
+ return (React.createElement(CameraSitePermissions, { appName: 'app',
80
+ /* @conditional-compile-remove(unsupported-browser) */
81
+ browserHint: isSafari ? 'safari' : 'unset', onTroubleshootingClick: onPermissionsTroubleshootingClick
64
82
  ? () => {
65
83
  onPermissionsTroubleshootingClick(permissionsState);
66
84
  }
@@ -70,7 +88,9 @@ export const CallReadinessModal = (props) => {
70
88
  }
71
89
  // if only audio is denied
72
90
  else {
73
- return (React.createElement(MicrophoneDomainPermissions, { appName: 'app', onTroubleshootingClick: onPermissionsTroubleshootingClick
91
+ return (React.createElement(MicrophoneSitePermissions, { appName: 'app',
92
+ /* @conditional-compile-remove(unsupported-browser) */
93
+ browserHint: isSafari ? 'safari' : 'unset', onTroubleshootingClick: onPermissionsTroubleshootingClick
74
94
  ? () => {
75
95
  onPermissionsTroubleshootingClick(permissionsState);
76
96
  }
@@ -81,7 +101,10 @@ export const CallReadinessModal = (props) => {
81
101
  return (React.createElement(React.Fragment, null, isPermissionsModalDismissed && (React.createElement(_DrawerSurface, { onLightDismiss: onLightDismissTriggered, styles: drawerContainerStyles(DRAWER_HIGH_Z_BAND) }, modal()))));
82
102
  }
83
103
  else if (!mobileView && modal !== undefined) {
84
- return (React.createElement(Modal, { isOpen: isPermissionsModalDismissed, isBlocking: false, onDismiss: () => {
104
+ return (React.createElement(_ModalClone, { styles: {
105
+ root: { position: 'unset' },
106
+ main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }
107
+ }, layerProps: { hostId: props.modalLayerHostId }, isOpen: isPermissionsModalDismissed, isBlocking: false, onDismiss: () => {
85
108
  setIsPermissionsModalDismissed(false);
86
109
  }, overlay: { styles: { root: { background: 'rgba(0,0,0,0.9)' } } } }, modal()));
87
110
  }
@@ -96,26 +119,35 @@ export const CallReadinessModal = (props) => {
96
119
  * @private
97
120
  */
98
121
  export const CallReadinessModalFallBack = (props) => {
99
- const { mobileView, cameraPermissionGranted, microphonePermissionGranted, checkPermissionModalShowing, permissionsState, isPermissionsModalDismissed, setIsPermissionsModalDismissed, onPermissionsTroubleshootingClick } = props;
122
+ const { mobileView, checkPermissionModalShowing, permissionsState,
123
+ /* @conditional-compile-remove(unsupported-browser) */ environmentInfo, isPermissionsModalDismissed, setIsPermissionsModalDismissed, onPermissionsTroubleshootingClick } = props;
100
124
  const onLightDismissTriggered = () => {
101
125
  // do nothing here
102
126
  // only way to dismiss this drawer is clicking on allow access which will leads to device permission prompt
103
127
  };
104
- // When permissions are not set, value is undefined, do nothing here
105
- // When permissions are set to denied, value is false, show helper screen
106
- const showModal = cameraPermissionGranted === false || microphonePermissionGranted === false;
128
+ const videoState = permissionsState.camera;
129
+ const audioState = permissionsState.microphone;
130
+ // When permissions are not set, do nothing here
131
+ // When permissions are set to denied, show helper screen
132
+ const showModal = videoState === 'denied' || audioState === 'denied';
133
+ /* @conditional-compile-remove(unsupported-browser) */
134
+ const isSafari = _isSafari(environmentInfo);
107
135
  const modal = !showModal
108
136
  ? undefined
109
137
  : () => {
110
- if (cameraPermissionGranted === false && microphonePermissionGranted === false) {
111
- return (React.createElement(CameraAndMicrophoneDomainPermissions, { appName: 'app', onTroubleshootingClick: onPermissionsTroubleshootingClick
138
+ if (videoState === 'denied' && audioState === 'denied') {
139
+ return (React.createElement(CameraAndMicrophoneSitePermissions, { appName: 'app',
140
+ /* @conditional-compile-remove(unsupported-browser) */
141
+ browserHint: isSafari ? 'safari' : 'unset', onTroubleshootingClick: onPermissionsTroubleshootingClick
112
142
  ? () => {
113
143
  onPermissionsTroubleshootingClick(permissionsState);
114
144
  }
115
145
  : undefined, type: "denied" }));
116
146
  }
117
- else if (cameraPermissionGranted === false && microphonePermissionGranted) {
118
- return (React.createElement(CameraDomainPermissions, { appName: 'app', onTroubleshootingClick: onPermissionsTroubleshootingClick
147
+ else if (videoState === 'denied' && audioState === 'granted') {
148
+ return (React.createElement(CameraSitePermissions, { appName: 'app',
149
+ /* @conditional-compile-remove(unsupported-browser) */
150
+ browserHint: isSafari ? 'safari' : 'unset', onTroubleshootingClick: onPermissionsTroubleshootingClick
119
151
  ? () => {
120
152
  onPermissionsTroubleshootingClick(permissionsState);
121
153
  }
@@ -124,7 +156,9 @@ export const CallReadinessModalFallBack = (props) => {
124
156
  }, type: "denied" }));
125
157
  }
126
158
  else {
127
- return (React.createElement(MicrophoneDomainPermissions, { appName: 'app', onTroubleshootingClick: onPermissionsTroubleshootingClick
159
+ return (React.createElement(MicrophoneSitePermissions, { appName: 'app',
160
+ /* @conditional-compile-remove(unsupported-browser) */
161
+ browserHint: isSafari ? 'safari' : 'unset', onTroubleshootingClick: onPermissionsTroubleshootingClick
128
162
  ? () => {
129
163
  onPermissionsTroubleshootingClick(permissionsState);
130
164
  }
@@ -133,10 +167,10 @@ export const CallReadinessModalFallBack = (props) => {
133
167
  };
134
168
  if (mobileView) {
135
169
  return (React.createElement(React.Fragment, null,
136
- (checkPermissionModalShowing ||
137
- microphonePermissionGranted === undefined ||
138
- cameraPermissionGranted === undefined) && (React.createElement(_DrawerSurface, { onLightDismiss: onLightDismissTriggered, styles: drawerContainerStyles(DRAWER_HIGH_Z_BAND) },
139
- React.createElement(CameraAndMicrophoneDomainPermissions, { appName: 'app', onTroubleshootingClick: onPermissionsTroubleshootingClick
170
+ (checkPermissionModalShowing || audioState === 'prompt' || videoState === 'prompt') && (React.createElement(_DrawerSurface, { onLightDismiss: onLightDismissTriggered, styles: drawerContainerStyles(DRAWER_HIGH_Z_BAND) },
171
+ React.createElement(CameraAndMicrophoneSitePermissions, { appName: 'app',
172
+ /* @conditional-compile-remove(unsupported-browser) */
173
+ browserHint: isSafari ? 'safari' : 'unset', onTroubleshootingClick: onPermissionsTroubleshootingClick
140
174
  ? () => {
141
175
  onPermissionsTroubleshootingClick(permissionsState);
142
176
  }
@@ -145,17 +179,23 @@ export const CallReadinessModalFallBack = (props) => {
145
179
  }
146
180
  else {
147
181
  return (React.createElement(React.Fragment, null,
148
- (checkPermissionModalShowing ||
149
- microphonePermissionGranted === undefined ||
150
- cameraPermissionGranted === undefined) && (React.createElement(Modal, { isOpen: isPermissionsModalDismissed, isBlocking: false, onDismiss: () => {
182
+ (checkPermissionModalShowing || audioState === 'prompt' || videoState === 'prompt') && (React.createElement(_ModalClone, { styles: {
183
+ root: { position: 'unset' },
184
+ main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }
185
+ }, layerProps: { hostId: props.modalLayerHostId }, isOpen: isPermissionsModalDismissed, isBlocking: false, onDismiss: () => {
151
186
  setIsPermissionsModalDismissed(false);
152
187
  }, overlay: { styles: { root: { background: 'rgba(0,0,0,0.9)' } } } },
153
- React.createElement(CameraAndMicrophoneDomainPermissions, { appName: 'app', onTroubleshootingClick: onPermissionsTroubleshootingClick
188
+ React.createElement(CameraAndMicrophoneSitePermissions, { appName: 'app',
189
+ /* @conditional-compile-remove(unsupported-browser) */
190
+ browserHint: isSafari ? 'safari' : 'unset', onTroubleshootingClick: onPermissionsTroubleshootingClick
154
191
  ? () => {
155
192
  onPermissionsTroubleshootingClick(permissionsState);
156
193
  }
157
194
  : undefined, type: "check" }))),
158
- !checkPermissionModalShowing && modal !== undefined && (React.createElement(Modal, { isOpen: isPermissionsModalDismissed, isBlocking: false, onDismiss: () => {
195
+ !checkPermissionModalShowing && modal !== undefined && (React.createElement(_ModalClone, { styles: {
196
+ root: { position: 'unset' },
197
+ main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }
198
+ }, layerProps: { hostId: props.modalLayerHostId }, isOpen: isPermissionsModalDismissed, isBlocking: false, onDismiss: () => {
159
199
  setIsPermissionsModalDismissed(false);
160
200
  }, overlay: { styles: { root: { background: 'rgba(0,0,0,0.9)' } } } }, modal()))));
161
201
  }