@azure/communication-react 1.5.1-alpha-202304040013 → 1.5.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/CHANGELOG.beta.md +76 -1
  2. package/CHANGELOG.json +621 -0
  3. package/dist/communication-react.d.ts +160 -192
  4. package/dist/dist-cjs/communication-react/index.js +1615 -2195
  5. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  8. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +2 -29
  9. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  10. package/dist/dist-esm/chat-component-bindings/src/utils/constants.d.ts +0 -4
  11. package/dist/dist-esm/chat-component-bindings/src/utils/constants.js +0 -4
  12. package/dist/dist-esm/chat-component-bindings/src/utils/constants.js.map +1 -1
  13. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +26 -32
  14. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  15. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +1 -6
  16. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
  17. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +0 -1
  18. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  19. package/dist/dist-esm/communication-react/src/index.d.ts +0 -2
  20. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +29 -31
  22. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +1 -2
  24. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +13 -11
  25. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +1 -2
  27. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +20 -34
  28. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  29. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +2 -11
  30. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +9 -47
  31. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  32. package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +0 -7
  33. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +1 -5
  34. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  35. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +3 -10
  36. package/dist/dist-esm/react-components/src/components/MessageThread.js +36 -57
  37. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  38. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -1
  39. package/dist/dist-esm/react-components/src/components/index.js +0 -1
  40. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  41. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.d.ts +13 -0
  42. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js +35 -0
  43. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js.map +1 -0
  44. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +0 -5
  45. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -28
  46. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  47. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +4 -6
  48. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js +1 -1
  49. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  50. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  51. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +116 -11
  53. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +115 -10
  54. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -3
  55. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +115 -10
  56. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +116 -11
  57. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +115 -10
  58. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +115 -10
  59. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +115 -10
  60. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +115 -10
  61. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +116 -11
  62. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +115 -10
  63. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +116 -11
  64. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +115 -10
  65. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +115 -10
  66. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -1
  67. package/dist/dist-esm/react-components/src/theming/icons.js +0 -8
  68. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  69. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  70. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  71. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -20
  72. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  73. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +1 -7
  74. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +2 -14
  75. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  76. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +0 -8
  77. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  78. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +20 -93
  79. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  80. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.d.ts +1 -1
  81. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  82. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +3 -9
  83. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +1 -3
  84. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
  85. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.d.ts +1 -1
  86. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  87. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +1 -1
  88. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
  89. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.d.ts +1 -1
  90. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  91. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.d.ts +1 -1
  92. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.js.map +1 -1
  93. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.d.ts +1 -1
  94. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  95. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +2 -2
  96. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  97. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +1 -19
  98. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +1 -5
  100. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +0 -20
  101. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
  102. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +87 -5
  103. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
  104. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  105. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +75 -15
  106. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -7
  107. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  108. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +28 -0
  109. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +194 -0
  110. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -0
  111. package/dist/dist-esm/react-composites/src/composites/{common/ControlBar → CallWithChatComposite}/CustomButton.d.ts +16 -19
  112. package/dist/dist-esm/react-composites/src/composites/{common/ControlBar → CallWithChatComposite}/CustomButton.js +4 -4
  113. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +1 -0
  114. package/dist/dist-esm/react-composites/src/composites/{common/ControlBar → CallWithChatComposite}/PeopleButton.d.ts +1 -1
  115. package/dist/dist-esm/react-composites/src/composites/{common/ControlBar → CallWithChatComposite}/PeopleButton.js +3 -3
  116. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeopleButton.js.map +1 -0
  117. package/dist/dist-esm/react-composites/src/composites/{common/Drawer → CallWithChatComposite}/PreparedMoreDrawer.d.ts +2 -2
  118. package/dist/dist-esm/react-composites/src/composites/{common/Drawer → CallWithChatComposite}/PreparedMoreDrawer.js +5 -5
  119. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js.map +1 -0
  120. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +0 -2
  121. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +1 -7
  122. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  123. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +0 -10
  124. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  125. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +0 -2
  126. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +1 -7
  127. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  128. package/dist/dist-esm/react-composites/src/composites/{common/ControlBar → CallWithChatComposite/components}/DesktopMoreButton.d.ts +2 -2
  129. package/dist/dist-esm/react-composites/src/composites/{common/ControlBar → CallWithChatComposite/components}/DesktopMoreButton.js +3 -3
  130. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +1 -0
  131. package/dist/dist-esm/react-composites/src/composites/{common/Drawer → CallWithChatComposite/components}/MoreDrawer.d.ts +2 -2
  132. package/dist/dist-esm/react-composites/src/composites/{common/Drawer → CallWithChatComposite/components}/MoreDrawer.js +5 -4
  133. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +1 -0
  134. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -1
  135. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
  136. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -3
  137. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +2 -6
  138. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  139. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +0 -1
  140. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -11
  141. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  142. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +1 -4
  143. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +1 -29
  144. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
  145. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +0 -2
  146. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +3 -88
  147. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  148. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -7
  149. package/dist/dist-esm/react-composites/src/composites/common/icons.js +1 -7
  150. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  151. package/dist/dist-esm/react-composites/src/composites/index.d.ts +0 -3
  152. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  153. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +17 -3
  154. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +17 -3
  155. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +0 -5
  156. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +17 -3
  157. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +17 -3
  158. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +17 -3
  159. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +17 -3
  160. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +17 -3
  161. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +17 -3
  162. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +17 -3
  163. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +17 -3
  164. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +17 -3
  165. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +17 -3
  166. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +17 -3
  167. package/package.json +10 -10
  168. package/dist/dist-esm/react-components/src/components/Caption.d.ts +0 -21
  169. package/dist/dist-esm/react-components/src/components/Caption.js +0 -32
  170. package/dist/dist-esm/react-components/src/components/Caption.js.map +0 -1
  171. package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +0 -21
  172. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +0 -41
  173. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +0 -1
  174. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +0 -30
  175. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +0 -253
  176. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +0 -1
  177. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +0 -1
  178. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +0 -1
  179. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js.map +0 -1
  180. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +0 -1
  181. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +0 -1
  182. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +0 -165
  183. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js +0 -4
  184. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/Strings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Strings used by the {@link CallComposite} directly.\n *\n * This strings are in addition to those used by the components from the component library.\n *\n * @public\n */\nexport interface CallCompositeStrings {\n /**\n * Title of configuration page.\n */\n configurationPageTitle: string;\n /**\n * Optional 1-2 lines on the call details used on the configuration page.\n */\n configurationPageCallDetails?: string;\n /**\n * Text in button to start call in configuration page.\n */\n startCallButtonLabel: string;\n /**\n * Text in button to rejoin an ended call.\n */\n rejoinCallButtonLabel: string;\n /**\n * Placeholder text for local device settings dropdowns.\n */\n defaultPlaceHolder: string;\n /**\n * Label for camera dropdown.\n */\n cameraLabel: string;\n /**\n * Label for when there are no cameras present on configuration screen.\n */\n noCamerasLabel: string;\n /**\n * Label for sound dropdown.\n */\n soundLabel: string;\n /**\n * Label for when no microphones were found on the configuration screen\n */\n noMicrophonesLabel: string;\n /**\n * Label for when no speakers were found on the configuration screen.\n */\n noSpeakersLabel: string;\n /**\n * Error shown when camera access is blocked by the browser.\n */\n cameraPermissionDenied: string;\n /**\n * Error shown when the camera is turned off.\n */\n cameraTurnedOff: string;\n /**\n * Error shown when microphone access is blocked by the browser.\n */\n microphonePermissionDenied: string;\n /**\n * Title text of the page shown to the user when joining a Teams meeting fails because meeting owner denied access.\n */\n failedToJoinTeamsMeetingReasonAccessDeniedTitle: string;\n /**\n * More details text of the page shown to the user when joining a Teams meeting fails because meeting owner denied access.\n */\n failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails?: string;\n /**\n * Title text of the page shown to the user when joining a call fails due to a network problem.\n */\n failedToJoinCallDueToNoNetworkTitle: string;\n /**\n * More details text of the page shown to the user when joining a call fails due to a network problem.\n */\n failedToJoinCallDueToNoNetworkMoreDetails?: string;\n /**\n * Title text of the page shown to the user when they leave a call in the call composite.\n */\n leftCallTitle: string;\n /**\n * More details text of the page shown to the user when they leave a call in the call composite.\n */\n leftCallMoreDetails?: string;\n /**\n * Title text of the page shown to the user when they are removed from a call in the call composite.\n */\n removedFromCallTitle: string;\n /**\n * More details text of the page shown to the user when they are removed from a call in the call composite.\n */\n removedFromCallMoreDetails?: string;\n /**\n * Text shown to the user on the lobby screen when connecting to a call.\n */\n lobbyScreenConnectingToCallTitle: string;\n /**\n * Optional addition details shown to the user on the lobby screen when connection to a call.\n */\n lobbyScreenConnectingToCallMoreDetails?: string;\n /**\n * Text shown to the user on the lobby screen when waiting to be admitted to a call.\n */\n lobbyScreenWaitingToBeAdmittedTitle: string;\n /**\n * Optional additional details shown to the user on the lobby screen when waiting to be admitted to a call.\n */\n lobbyScreenWaitingToBeAdmittedMoreDetails?: string;\n /**\n * Message shown to the user when they are speaking while muted.\n */\n mutedMessage: string;\n /**\n * Text for link to MS privacy policy in Compliance Banner.\n */\n privacyPolicy: string;\n /**\n * Text for link to learn more about a specific subject.\n */\n learnMore: string;\n /**\n * Message to let user know the meeting is only being recorded (no transcription) in ComplianceBanner.\n */\n complianceBannerNowOnlyRecording: string;\n /**\n * Message to let user know the meeting is only being transcripted (no recording) in ComplianceBanner.\n */\n complianceBannerNowOnlyTranscription: string;\n /**\n * Message to let user know recording and transcription of the meeting are saved in ComplianceBanner.\n */\n complianceBannerRecordingAndTranscriptionSaved: string;\n /**\n * Message to let user know recording and transcription of the meeting have started in ComplianceBanner.\n */\n complianceBannerRecordingAndTranscriptionStarted: string;\n /**\n * Message to let user know recording and transcription of the meeting have stopped in ComplianceBanner.\n */\n complianceBannerRecordingAndTranscriptionStopped: string;\n /**\n * Message to let user know recording of the meeting is being saved in ComplianceBanner.\n */\n complianceBannerRecordingSaving: string;\n /**\n * Message to let user know recording of the meeting has started in ComplianceBanner.\n */\n complianceBannerRecordingStarted: string;\n /**\n * Message to let user know recording of the meeting has stopped in ComplianceBanner.\n */\n complianceBannerRecordingStopped: string;\n /**\n * Message to let user know they are giving consent to meeting being transcripted in ComplianceBanner.\n */\n complianceBannerTranscriptionConsent: string;\n /**\n * Message to let user know transcription of the meeting is being saved in ComplianceBanner.\n */\n complianceBannerTranscriptionSaving: string;\n /**\n * Message to let user know transcription of the meeting has started in ComplianceBanner.\n */\n complianceBannerTranscriptionStarted: string;\n /**\n * Message to let user know the transcription of the meeting has stopped in ComplianceBanner.\n */\n complianceBannerTranscriptionStopped: string;\n /**\n * Text for close button.\n */\n close: string;\n /**\n * Title text of the page shown to the user when there is intermittent network failure during a call.\n */\n networkReconnectTitle: string;\n /**\n * More details text of the page shown to the user when there is intermittent network failure during a call.\n */\n networkReconnectMoreDetails: string;\n /**\n * Tooltip text used to inform a user that toggling microphone in lobby is not supported.\n */\n microphoneToggleInLobbyNotAllowed: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Side pane People section Title.\n */\n peoplePaneTitle: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria label string for return to call back button\n */\n returnToCallButtonAriaLabel?: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Description string for return to call button\n */\n returnToCallButtonAriaDescription?: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * control bar People button label\n */\n peopleButtonLabel: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * control bar Chat button label.\n */\n chatButtonLabel: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for SidePaneHeader dismiss button\n */\n dismissSidePaneButtonLabel?: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Side pane People section subheader.\n */\n peoplePaneSubTitle: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to copy invite link\n */\n copyInviteLinkButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to open dialpad\n */\n openDialpadButtonLabel: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for menu item to remove participant\n */\n removeMenuLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for add people dropdown\n */\n peoplePaneAddPeopleButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to start a call\n */\n dialpadStartCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Title for dialpad Modal\n */\n dialpadModalTitle: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal\n */\n dialpadModalAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal close button\n */\n dialpadCloseModalButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * label for more button in the Calling composite\n */\n moreButtonCallingLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for the resume call button on the hold pane\n */\n resumeCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for the resume call button on the hold pane when call is resuming\n */\n resumingCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Aria label for the resume call button on the hold pane\n */\n resumeCallButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Aria label for the resume call button on the hold pane when call is resuming\n */\n resumingCallButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for the hold pane\n */\n holdScreenLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Placeholder text for dtmf dialpad\n */\n dtmfDialpadPlaceholderText: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for the button to open dtmf dialpad\n */\n openDtmfDialpadLabel: string;\n /**\n * aria label for when the invite link has been actioned\n */\n copyInviteLinkActionedAriaLabel: string;\n /* @conditional-compile-remove(rooms) */\n /**\n * Title text of the page shown to the user when the user attempts to join a room that cannot be found.\n */\n roomNotFoundTitle: string;\n /* @conditional-compile-remove(rooms) */\n /**\n * More details text of the page shown to the user when the user attempts to join a room that cannot be found.\n */\n roomNotFoundDetails?: string;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Label for the button to open effects and title of the effects\n */\n effects?: string;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Label for the blur video background effect item\n */\n blurBackgroundEffectButtonLabel?: string;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Tooltip text for the blur video background effect item\n */\n blurBackgroundTooltip?: string;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Label for the remove video background effect item\n */\n removeBackgroundEffectButtonLabel?: string;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Tooltip text for the blur video background effect item\n */\n removeBackgroundTooltip?: string;\n /* @conditional-compile-remove(rooms) */\n /**\n * Title text of the page shown to the user when the user attempts to join a room to which they are not invited.\n */\n deniedPermissionToRoomTitle: string;\n /* @conditional-compile-remove(rooms) */\n /**\n * More details text of the page shown to the user when the user attempts to join a room to which they are not invited.\n */\n deniedPermissionToRoomDetails?: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Control bar People button ToolTipContent\n */\n peopleButtonTooltipOpen: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Control bar People button ToolTipContent\n */\n peopleButtonTooltipClose: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label disaplayed on the lobby screen during a 1:1 outbound call.\n */\n outboundCallingNoticeString: string;\n /**\n * Notice to be announced by narrator when a participant joins a call\n */\n participantJoinedNoticeString: string;\n /**\n * Notice to be announced by narrator when a participant joins a call\n */\n twoParticipantJoinedNoticeString: string;\n /**\n * Notice to be announced by narrator when a participant joins a call\n */\n threeParticipantJoinedNoticeString: string;\n /**\n * Notice to be announced by narrator when a participant leaves a call\n */\n participantLeftNoticeString: string;\n /**\n * Notice to be announced by narrator when 2 participants leave a call\n */\n twoParticipantLeftNoticeString: string;\n /**\n * Notice to be announced by narrator when 3 participants leave a call\n */\n threeParticipantLeftNoticeString: string;\n /**\n * string to be used to announce a change in participant if they have no displayName\n */\n unnamedParticipantString: string;\n /**\n * string to be used to announce when more than 3 participants have joined at the same time.\n */\n manyParticipantsJoined: string;\n /**\n * string to be used to announce when more than 3 participants have left at the same time.\n */\n manyParticipantsLeft: string;\n /**\n * string to be used to announce when multiple unnamed participants have joined at the same time.\n */\n manyUnnamedParticipantsJoined: string;\n /**\n * string to be used to announce when multiple unnamed participants have left at the same time.\n */\n manyUnnamedParticipantsLeft: string;\n}\n"]}
1
+ {"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/Strings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Strings used by the {@link CallComposite} directly.\n *\n * This strings are in addition to those used by the components from the component library.\n *\n * @public\n */\nexport interface CallCompositeStrings {\n /**\n * Title of configuration page.\n */\n configurationPageTitle: string;\n /**\n * Optional 1-2 lines on the call details used on the configuration page.\n */\n configurationPageCallDetails?: string;\n /**\n * Text in button to start call in configuration page.\n */\n startCallButtonLabel: string;\n /**\n * Text in button to rejoin an ended call.\n */\n rejoinCallButtonLabel: string;\n /**\n * Placeholder text for local device settings dropdowns.\n */\n defaultPlaceHolder: string;\n /**\n * Label for camera dropdown.\n */\n cameraLabel: string;\n /**\n * Label for when there are no cameras present on configuration screen.\n */\n noCamerasLabel: string;\n /**\n * Label for sound dropdown.\n */\n soundLabel: string;\n /**\n * Label for when no microphones were found on the configuration screen\n */\n noMicrophonesLabel: string;\n /**\n * Label for when no speakers were found on the configuration screen.\n */\n noSpeakersLabel: string;\n /**\n * Error shown when camera access is blocked by the browser.\n */\n cameraPermissionDenied: string;\n /**\n * Error shown when the camera is turned off.\n */\n cameraTurnedOff: string;\n /**\n * Error shown when microphone access is blocked by the browser.\n */\n microphonePermissionDenied: string;\n /**\n * Title text of the page shown to the user when joining a Teams meeting fails because meeting owner denied access.\n */\n failedToJoinTeamsMeetingReasonAccessDeniedTitle: string;\n /**\n * More details text of the page shown to the user when joining a Teams meeting fails because meeting owner denied access.\n */\n failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails?: string;\n /**\n * Title text of the page shown to the user when joining a call fails due to a network problem.\n */\n failedToJoinCallDueToNoNetworkTitle: string;\n /**\n * More details text of the page shown to the user when joining a call fails due to a network problem.\n */\n failedToJoinCallDueToNoNetworkMoreDetails?: string;\n /**\n * Title text of the page shown to the user when they leave a call in the call composite.\n */\n leftCallTitle: string;\n /**\n * More details text of the page shown to the user when they leave a call in the call composite.\n */\n leftCallMoreDetails?: string;\n /**\n * Title text of the page shown to the user when they are removed from a call in the call composite.\n */\n removedFromCallTitle: string;\n /**\n * More details text of the page shown to the user when they are removed from a call in the call composite.\n */\n removedFromCallMoreDetails?: string;\n /**\n * Text shown to the user on the lobby screen when connecting to a call.\n */\n lobbyScreenConnectingToCallTitle: string;\n /**\n * Optional addition details shown to the user on the lobby screen when connection to a call.\n */\n lobbyScreenConnectingToCallMoreDetails?: string;\n /**\n * Text shown to the user on the lobby screen when waiting to be admitted to a call.\n */\n lobbyScreenWaitingToBeAdmittedTitle: string;\n /**\n * Optional additional details shown to the user on the lobby screen when waiting to be admitted to a call.\n */\n lobbyScreenWaitingToBeAdmittedMoreDetails?: string;\n /**\n * Message shown to the user when they are speaking while muted.\n */\n mutedMessage: string;\n /**\n * Text for link to MS privacy policy in Compliance Banner.\n */\n privacyPolicy: string;\n /**\n * Text for link to learn more about a specific subject.\n */\n learnMore: string;\n /**\n * Message to let user know the meeting is only being recorded (no transcription) in ComplianceBanner.\n */\n complianceBannerNowOnlyRecording: string;\n /**\n * Message to let user know the meeting is only being transcripted (no recording) in ComplianceBanner.\n */\n complianceBannerNowOnlyTranscription: string;\n /**\n * Message to let user know recording and transcription of the meeting are saved in ComplianceBanner.\n */\n complianceBannerRecordingAndTranscriptionSaved: string;\n /**\n * Message to let user know recording and transcription of the meeting have started in ComplianceBanner.\n */\n complianceBannerRecordingAndTranscriptionStarted: string;\n /**\n * Message to let user know recording and transcription of the meeting have stopped in ComplianceBanner.\n */\n complianceBannerRecordingAndTranscriptionStopped: string;\n /**\n * Message to let user know recording of the meeting is being saved in ComplianceBanner.\n */\n complianceBannerRecordingSaving: string;\n /**\n * Message to let user know recording of the meeting has started in ComplianceBanner.\n */\n complianceBannerRecordingStarted: string;\n /**\n * Message to let user know recording of the meeting has stopped in ComplianceBanner.\n */\n complianceBannerRecordingStopped: string;\n /**\n * Message to let user know they are giving consent to meeting being transcripted in ComplianceBanner.\n */\n complianceBannerTranscriptionConsent: string;\n /**\n * Message to let user know transcription of the meeting is being saved in ComplianceBanner.\n */\n complianceBannerTranscriptionSaving: string;\n /**\n * Message to let user know transcription of the meeting has started in ComplianceBanner.\n */\n complianceBannerTranscriptionStarted: string;\n /**\n * Message to let user know the transcription of the meeting has stopped in ComplianceBanner.\n */\n complianceBannerTranscriptionStopped: string;\n /**\n * Text for close button.\n */\n close: string;\n /**\n * Title text of the page shown to the user when there is intermittent network failure during a call.\n */\n networkReconnectTitle: string;\n /**\n * More details text of the page shown to the user when there is intermittent network failure during a call.\n */\n networkReconnectMoreDetails: string;\n /**\n * Tooltip text used to inform a user that toggling microphone in lobby is not supported.\n */\n microphoneToggleInLobbyNotAllowed: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Side pane People section Title.\n */\n peoplePaneTitle: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria label string for return to call back button\n */\n returnToCallButtonAriaLabel?: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Description string for return to call button\n */\n returnToCallButtonAriaDescription?: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * control bar People button label\n */\n peopleButtonLabel: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * control bar Chat button label.\n */\n chatButtonLabel: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for SidePaneHeader dismiss button\n */\n dismissSidePaneButtonLabel?: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Side pane People section subheader.\n */\n peoplePaneSubTitle: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to copy invite link\n */\n copyInviteLinkButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to open dialpad\n */\n openDialpadButtonLabel: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for menu item to remove participant\n */\n removeMenuLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for add people dropdown\n */\n peoplePaneAddPeopleButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to start a call\n */\n dialpadStartCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Title for dialpad Modal\n */\n dialpadModalTitle: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal\n */\n dialpadModalAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal close button\n */\n dialpadCloseModalButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * label for more button in the Calling composite\n */\n moreButtonCallingLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for the resume call button on the hold pane\n */\n resumeCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for the resume call button on the hold pane when call is resuming\n */\n resumingCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Aria label for the resume call button on the hold pane\n */\n resumeCallButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Aria label for the resume call button on the hold pane when call is resuming\n */\n resumingCallButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for the hold pane\n */\n holdScreenLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Placeholder text for dtmf dialpad\n */\n dtmfDialpadPlaceholderText: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for the button to open dtmf dialpad\n */\n openDtmfDialpadLabel: string;\n /**\n * aria label for when the invite link has been actioned\n */\n copyInviteLinkActionedAriaLabel: string;\n /* @conditional-compile-remove(rooms) */\n /**\n * Title text of the page shown to the user when the user attempts to join a room that cannot be found.\n */\n roomNotFoundTitle: string;\n /* @conditional-compile-remove(rooms) */\n /**\n * More details text of the page shown to the user when the user attempts to join a room that cannot be found.\n */\n roomNotFoundDetails?: string;\n /* @conditional-compile-remove(rooms) */\n /**\n * Title text of the page shown to the user when the user attempts to join a room to which they are not invited.\n */\n deniedPermissionToRoomTitle: string;\n /* @conditional-compile-remove(rooms) */\n /**\n * More details text of the page shown to the user when the user attempts to join a room to which they are not invited.\n */\n deniedPermissionToRoomDetails?: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Control bar People button ToolTipContent\n */\n peopleButtonTooltipOpen: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /**\n * Control bar People button ToolTipContent\n */\n peopleButtonTooltipClose: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label disaplayed on the lobby screen during a 1:1 outbound call.\n */\n outboundCallingNoticeString: string;\n /**\n * Notice to be announced by narrator when a participant joins a call\n */\n participantJoinedNoticeString: string;\n /**\n * Notice to be announced by narrator when a participant joins a call\n */\n twoParticipantJoinedNoticeString: string;\n /**\n * Notice to be announced by narrator when a participant joins a call\n */\n threeParticipantJoinedNoticeString: string;\n /**\n * Notice to be announced by narrator when a participant leaves a call\n */\n participantLeftNoticeString: string;\n /**\n * Notice to be announced by narrator when 2 participants leave a call\n */\n twoParticipantLeftNoticeString: string;\n /**\n * Notice to be announced by narrator when 3 participants leave a call\n */\n threeParticipantLeftNoticeString: string;\n /**\n * string to be used to announce a change in participant if they have no displayName\n */\n unnamedParticipantString: string;\n /**\n * string to be used to announce when more than 3 participants have joined at the same time.\n */\n manyParticipantsJoined: string;\n /**\n * string to be used to announce when more than 3 participants have left at the same time.\n */\n manyParticipantsLeft: string;\n /**\n * string to be used to announce when multiple unnamed participants have joined at the same time.\n */\n manyUnnamedParticipantsJoined: string;\n /**\n * string to be used to announce when multiple unnamed participants have left at the same time.\n */\n manyUnnamedParticipantsLeft: string;\n}\n"]}
@@ -5,7 +5,6 @@ import { TeamsCallAgent } from '@azure/communication-calling';
5
5
  import { RoomCallLocator } from '@azure/communication-calling';
6
6
  import { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';
7
7
  import { CommonCallAdapter, CallEndedListener, CallIdChangedListener, CallAdapterState, DisplayNameChangedListener, IsMutedChangedListener, IsLocalScreenSharingActiveChangedListener, IsSpeakingChangedListener, ParticipantsJoinedListener, ParticipantsLeftListener, DiagnosticChangedEventListner, CallAdapter } from './CallAdapter';
8
- import { VideoBackgroundImage } from './CallAdapter';
9
8
  import { TeamsCallAdapter } from './CallAdapter';
10
9
  import { CreateVideoStreamViewResult, VideoStreamOptions } from "../../../../../react-components/src";
11
10
  import { Role } from "../../../../../react-components/src";
@@ -61,7 +60,6 @@ export declare class AzureCommunicationCallAdapter<AgentType extends CallAgent |
61
60
  blurVideoBackground(backgroundBlurConfig?: BackgroundBlurConfig): Promise<void>;
62
61
  replaceVideoBackground(backgroundReplacementConfig: BackgroundReplacementConfig): Promise<void>;
63
62
  stopVideoBackgroundEffect(): Promise<void>;
64
- updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;
65
63
  startCall(participants: string[] | CommunicationIdentifier[], options?: StartCallOptions): CallTypeOf<AgentType> | undefined;
66
64
  private processNewCall;
67
65
  removeParticipant(userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier): Promise<void>;
@@ -141,10 +139,6 @@ export declare type AzureCommunicationCallAdapterOptions = {
141
139
  * {@link CallComposite}. The true role of the user will be synced with ACS services when a Rooms call starts.
142
140
  */
143
141
  roleHint?: Role;
144
- /**
145
- * Default set of background images for background image picker.
146
- */
147
- videoBackgroundImages?: VideoBackgroundImage[];
148
142
  };
149
143
  /**
150
144
  * Arguments for creating the Azure Communication Services implementation of {@link CallAdapter}.
@@ -204,7 +198,7 @@ export declare type TeamsCallAdapterArgs = {
204
198
  *
205
199
  * @public
206
200
  */
207
- export declare const createAzureCommunicationCallAdapter: ({ userId, displayName, credential, locator, alternateCallerId, options }: AzureCommunicationCallAdapterArgs) => Promise<CallAdapter>;
201
+ export declare const createAzureCommunicationCallAdapter: ({ userId, displayName, credential, locator, alternateCallerId }: AzureCommunicationCallAdapterArgs) => Promise<CallAdapter>;
208
202
  /**
209
203
  * @beta
210
204
  */
@@ -114,10 +114,6 @@ class CallContext {
114
114
  setAllowedUnsupportedBrowser() {
115
115
  this.setState(Object.assign(Object.assign({}, this.state), { unsupportedBrowserVersionsAllowed: true }));
116
116
  }
117
- /* @conditional-compile-remove(video-background-effects) */
118
- setBackroundPickerImages(videoBackgroundImages) {
119
- this.setState(Object.assign(Object.assign({}, this.state), { videoBackgroundImages }));
120
- }
121
117
  }
122
118
  const findLatestEndedCall = (calls) => {
123
119
  var _a, _b, _c, _d;
@@ -236,8 +232,6 @@ export class AzureCommunicationCallAdapter {
236
232
  this.replaceVideoBackground.bind(this);
237
233
  /* @conditional-compile-remove(video-background-effects) */
238
234
  this.stopVideoBackgroundEffect.bind(this);
239
- /* @conditional-compile-remove(video-background-effects) */
240
- this.updateBackgroundPickerImages.bind(this);
241
235
  }
242
236
  dispose() {
243
237
  this.resetDiagnosticsForwarder();
@@ -464,10 +458,6 @@ export class AzureCommunicationCallAdapter {
464
458
  yield this.handlers.onRemoveVideoBackgroundEffects();
465
459
  });
466
460
  }
467
- /* @conditional-compile-remove(video-background-effects) */
468
- updateBackgroundPickerImages(backgroundImages) {
469
- this.context.setBackroundPickerImages(backgroundImages);
470
- }
471
461
  startCall(participants, options) {
472
462
  var _a, _b;
473
463
  if (_isInCall((_b = (_a = this.getState().call) === null || _a === void 0 ? void 0 : _a.state) !== null && _b !== void 0 ? _b : 'None')) {
@@ -648,8 +638,7 @@ export class AzureCommunicationCallAdapter {
648
638
  * @public
649
639
  */
650
640
  export const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator,
651
- /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
652
- /* @conditional-compile-remove(video-background-effects) */ options }) => __awaiter(void 0, void 0, void 0, function* () {
641
+ /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId }) => __awaiter(void 0, void 0, void 0, function* () {
653
642
  if (!isValidIdentifier(userId)) {
654
643
  throw new Error('Invalid identifier. Please provide valid identifier object.');
655
644
  }
@@ -660,8 +649,7 @@ export const createAzureCommunicationCallAdapter = ({ userId, displayName, crede
660
649
  const callAgent = yield callClient.createCallAgent(credential, {
661
650
  displayName
662
651
  });
663
- const adapter = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, locator,
664
- /* @conditional-compile-remove(video-background-effects) */ options);
652
+ const adapter = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, locator);
665
653
  return adapter;
666
654
  });
667
655
  /* @conditional-compile-remove(teams-identity-support) */
@@ -1 +1 @@
1
- {"version":3,"file":"AzureCommunicationCallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,SAAS,EAA0B,sDAA6C;AACzF,OAAO,EAIL,wBAAwB,EAKzB,mDAA0C;AA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C,EAAE;IACjG,OAAO,gBAAgB,IAAI,WAAW,CAAC;AACzC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { _isInCall, _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport {\n CallClientState,\n CallError,\n CallState,\n createStatefulCallClient,\n StatefulCallClient,\n StatefulDeviceManager,\n TeamsCall,\n TeamsCallAgent as BetaTeamsCallAgent\n} from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { _isTeamsCallAgent } from '@internal/calling-stateful-client';\nimport { CallCommon } from '@internal/calling-stateful-client';\nimport {\n AudioOptions,\n CallAgent,\n GroupCallLocator,\n TeamsMeetingLinkLocator,\n LocalVideoStream as SDKLocalVideoStream,\n AudioDeviceInfo,\n VideoDeviceInfo,\n RemoteParticipant,\n PermissionConstraints,\n PropertyChangedEvent,\n StartCallOptions,\n VideoOptions,\n Call\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(video-background-effects) */\nimport { BackgroundBlurConfig, BackgroundReplacementConfig } from '@azure/communication-calling-effects';\n/* @conditional-compile-remove(teams-identity-support)) */\nimport { TeamsCallAgent } from '@azure/communication-calling';\n/* @conditional-compile-remove(rooms) */\nimport { RoomCallLocator } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { Features } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';\nimport { EventEmitter } from 'events';\nimport {\n CommonCallAdapter,\n CallEndedListener,\n CallIdChangedListener,\n CallAdapterState,\n DisplayNameChangedListener,\n IsMutedChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsSpeakingChangedListener,\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n DiagnosticChangedEventListner,\n CallAdapterCallEndedEvent,\n CallAdapter\n} from './CallAdapter';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoBackgroundImage } from './CallAdapter';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCallAdapter } from './CallAdapter';\nimport { getCallCompositePage, IsCallEndedPage, isCameraOn, isValidIdentifier } from '../utils';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { Role } from '@internal/react-components';\nimport { toFlatCommunicationIdentifier, _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CommunicationTokenCredential,\n CommunicationUserIdentifier,\n isCommunicationUserIdentifier,\n isPhoneNumberIdentifier,\n UnknownIdentifier,\n PhoneNumberIdentifier,\n CommunicationIdentifier,\n MicrosoftTeamsUserIdentifier\n} from '@azure/communication-common';\nimport { ParticipantSubscriber } from './ParticipantSubcriber';\nimport { AdapterError } from '../../common/adapters';\nimport { DiagnosticsForwarder } from './DiagnosticsForwarder';\nimport { useEffect, useRef, useState } from 'react';\nimport { CallHandlersOf, createHandlers } from './createHandlers';\nimport { createProfileStateModifier, OnFetchProfileCallback } from './OnFetchProfileCallback';\n\ntype CallTypeOf<AgentType extends CallAgent | BetaTeamsCallAgent> = AgentType extends CallAgent ? Call : TeamsCall;\n\n/** Context of call, which is a centralized context for all state updates */\nclass CallContext {\n private emitter: EventEmitter = new EventEmitter();\n private state: CallAdapterState;\n private callId: string | undefined;\n private displayNameModifier: AdapterStateModifier | undefined;\n\n constructor(\n clientState: CallClientState,\n isTeamsCall: boolean,\n options?: {\n /* @conditional-compile-remove(rooms) */ roleHint?: Role;\n maxListeners?: number;\n onFetchProfile?: OnFetchProfileCallback;\n /* @conditional-compile-remove(video-background-effects) */ videoBackgroundImages?: VideoBackgroundImage[];\n }\n ) {\n this.state = {\n isLocalPreviewMicrophoneEnabled: false,\n userId: clientState.userId,\n displayName: clientState.callAgent?.displayName,\n devices: clientState.deviceManager,\n call: undefined,\n page: 'configuration',\n latestErrors: clientState.latestErrors,\n isTeamsCall,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId: clientState.alternateCallerId,\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo: clientState.environmentInfo,\n /* @conditional-compile-remove(unsupported-browser) */ unsupportedBrowserVersionsAllowed: false,\n /* @conditional-compile-remove(rooms) */ roleHint: options?.roleHint,\n /* @conditional-compile-remove(video-background-effects) */ videoBackgroundImages: options?.videoBackgroundImages,\n cameraStatus: undefined\n };\n this.emitter.setMaxListeners(options?.maxListeners ?? 50);\n this.bindPublicMethods();\n this.displayNameModifier = options?.onFetchProfile\n ? createProfileStateModifier(options.onFetchProfile, () => {\n this.setState(this.getState());\n })\n : undefined;\n }\n\n private bindPublicMethods(): void {\n /* @conditional-compile-remove(unsupported-browser) */\n this.setAllowedUnsupportedBrowser.bind(this);\n }\n\n public onStateChange(handler: (_uiState: CallAdapterState) => void): void {\n this.emitter.on('stateChanged', handler);\n }\n\n public offStateChange(handler: (_uiState: CallAdapterState) => void): void {\n this.emitter.off('stateChanged', handler);\n }\n\n public setState(state: CallAdapterState): void {\n this.state = this.displayNameModifier ? this.displayNameModifier(state) : state;\n this.emitter.emit('stateChanged', this.state);\n }\n\n public getState(): CallAdapterState {\n return this.state;\n }\n\n public setIsLocalMicrophoneEnabled(isLocalPreviewMicrophoneEnabled: boolean): void {\n this.setState({ ...this.state, isLocalPreviewMicrophoneEnabled });\n }\n\n // This is the key to find current call object in client state\n public setCurrentCallId(callId: string | undefined): void {\n this.callId = callId;\n }\n\n public onCallEnded(handler: (callEndedData: CallAdapterCallEndedEvent) => void): void {\n this.emitter.on('callEnded', handler);\n }\n\n public offCallEnded(handler: (callEndedData: CallAdapterCallEndedEvent) => void): void {\n this.emitter.off('callEnded', handler);\n }\n\n public updateClientState(clientState: CallClientState): void {\n let call = this.callId ? clientState.calls[this.callId] : undefined;\n const latestEndedCall = clientState.callsEnded ? findLatestEndedCall(clientState.callsEnded) : undefined;\n // As the state is transitioning to a new state, trigger appropriate callback events.\n const oldPage = this.state.page;\n /* @conditional-compile-remove(unsupported-browser) */\n const environmentInfo = {\n environmentInfo: this.state.environmentInfo,\n unsupportedBrowserVersionOptedIn: this.state.unsupportedBrowserVersionsAllowed\n };\n const newPage = getCallCompositePage(\n call,\n latestEndedCall,\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo\n );\n if (!IsCallEndedPage(oldPage) && IsCallEndedPage(newPage)) {\n this.emitter.emit('callEnded', { callId: this.callId });\n // Reset the callId to undefined as the call has ended.\n this.setCurrentCallId(undefined);\n // Make sure that the call is set to undefined in the state.\n call = undefined;\n }\n\n if (this.state.page) {\n this.setState({\n ...this.state,\n userId: clientState.userId,\n displayName: clientState.callAgent?.displayName,\n call,\n page: newPage,\n endedCall: latestEndedCall,\n devices: clientState.deviceManager,\n latestErrors: clientState.latestErrors,\n cameraStatus:\n call?.localVideoStreams.find((s) => s.mediaStreamType === 'Video') ||\n clientState.deviceManager.unparentedViews.find((s) => s.mediaStreamType === 'Video')\n ? 'On'\n : 'Off'\n });\n }\n }\n\n /* @conditional-compile-remove(unsupported-browser) */\n public setAllowedUnsupportedBrowser(): void {\n this.setState({ ...this.state, unsupportedBrowserVersionsAllowed: true });\n }\n\n /* @conditional-compile-remove(video-background-effects) */\n public setBackroundPickerImages(videoBackgroundImages: VideoBackgroundImage[]): void {\n this.setState({ ...this.state, videoBackgroundImages });\n }\n}\n\nconst findLatestEndedCall = (calls: { [key: string]: CallState }): CallState | undefined => {\n const callStates = Object.values(calls);\n if (callStates.length === 0) {\n return undefined;\n }\n let latestCall = callStates[0];\n for (const call of callStates.slice(1)) {\n if ((call.endTime?.getTime() ?? 0) > (latestCall.endTime?.getTime() ?? 0)) {\n latestCall = call;\n }\n }\n return latestCall;\n};\n\n/**\n * @private\n */\nexport type AdapterStateModifier = (state: CallAdapterState) => CallAdapterState;\n\n/**\n * @private\n */\nexport class AzureCommunicationCallAdapter<AgentType extends CallAgent | BetaTeamsCallAgent = CallAgent>\n implements CommonCallAdapter\n{\n private callClient: StatefulCallClient;\n private callAgent: AgentType;\n private deviceManager: StatefulDeviceManager;\n private localStream: SDKLocalVideoStream | undefined;\n private locator: CallAdapterLocator;\n // Never use directly, even internally. Use `call` property instead.\n private _call?: CallCommon;\n private context: CallContext;\n private diagnosticsForwarder?: DiagnosticsForwarder;\n private handlers: CallHandlersOf<AgentType>;\n private participantSubscribers = new Map<string, ParticipantSubscriber>();\n private emitter: EventEmitter = new EventEmitter();\n private onClientStateChange: (clientState: CallClientState) => void;\n\n private get call(): CallCommon | undefined {\n return this._call;\n }\n\n private set call(newCall: CallCommon | undefined) {\n this.resetDiagnosticsForwarder(newCall);\n this._call = newCall;\n }\n\n constructor(\n callClient: StatefulCallClient,\n locator: CallAdapterLocator,\n callAgent: AgentType,\n deviceManager: StatefulDeviceManager,\n options?: AzureCommunicationCallAdapterOptions & TeamsAdapterOptions\n ) {\n this.bindPublicMethods();\n this.callClient = callClient;\n this.callAgent = callAgent;\n this.locator = locator;\n this.deviceManager = deviceManager;\n const isTeamsMeeting = 'meetingLink' in this.locator;\n this.context = new CallContext(callClient.getState(), isTeamsMeeting, options);\n\n this.context.onCallEnded((endCallData) => this.emitter.emit('callEnded', endCallData));\n\n const onStateChange = (clientState: CallClientState): void => {\n // unsubscribe when the instance gets disposed\n if (!this) {\n callClient.offStateChange(onStateChange);\n return;\n }\n\n // `updateClientState` searches for the current call from all the calls in the state using a cached `call.id`\n // from the call object. `call.id` can change during a call. We must update the cached `call.id` before\n // calling `updateClientState` so that we find the correct state object for the call even when `call.id`\n // has changed.\n // https://github.com/Azure/communication-ui-library/pull/1820\n if (this.call?.id) {\n this.context.setCurrentCallId(this.call.id);\n }\n this.context.updateClientState(clientState);\n };\n\n this.handlers = createHandlers(callClient, callAgent, deviceManager, undefined);\n\n this.onClientStateChange = onStateChange;\n\n this.subscribeDeviceManagerEvents();\n\n this.callClient.onStateChange(onStateChange);\n }\n\n // TODO: update this to include the 'selectedCameraChanged' when calling adds it to the device manager\n private subscribeDeviceManagerEvents(): void {\n this.deviceManager.on('selectedMicrophoneChanged', () => {\n this.emitter.emit('selectedMicrophoneChanged');\n });\n this.deviceManager.on('selectedSpeakerChanged', () => {\n this.emitter.emit('selectedSpeakerChanged');\n });\n }\n\n private bindPublicMethods(): void {\n this.onStateChange.bind(this);\n this.offStateChange.bind(this);\n this.getState.bind(this);\n this.dispose.bind(this);\n this.joinCall.bind(this);\n this.leaveCall.bind(this);\n this.setCamera.bind(this);\n this.setMicrophone.bind(this);\n this.setSpeaker.bind(this);\n this.askDevicePermission.bind(this);\n this.queryCameras.bind(this);\n this.queryMicrophones.bind(this);\n this.querySpeakers.bind(this);\n this.startCamera.bind(this);\n this.stopCamera.bind(this);\n this.mute.bind(this);\n this.unmute.bind(this);\n this.startCall.bind(this);\n this.startScreenShare.bind(this);\n this.stopScreenShare.bind(this);\n this.removeParticipant.bind(this);\n this.createStreamView.bind(this);\n this.disposeStreamView.bind(this);\n this.on.bind(this);\n this.off.bind(this);\n this.processNewCall.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.addParticipant.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.holdCall.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.resumeCall.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.sendDtmfTone.bind(this);\n /* @conditional-compile-remove(unsupported-browser) */\n this.allowUnsupportedBrowserVersion.bind(this);\n /* @conditional-compile-remove(video-background-effects) */\n this.blurVideoBackground.bind(this);\n /* @conditional-compile-remove(video-background-effects) */\n this.replaceVideoBackground.bind(this);\n /* @conditional-compile-remove(video-background-effects) */\n this.stopVideoBackgroundEffect.bind(this);\n /* @conditional-compile-remove(video-background-effects) */\n this.updateBackgroundPickerImages.bind(this);\n }\n\n public dispose(): void {\n this.resetDiagnosticsForwarder();\n this.callClient.offStateChange(this.onClientStateChange);\n this.callAgent.dispose();\n }\n\n public async queryCameras(): Promise<VideoDeviceInfo[]> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return this.deviceManager.getCameras();\n });\n }\n\n public async queryMicrophones(): Promise<AudioDeviceInfo[]> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return this.deviceManager.getMicrophones();\n });\n }\n\n public async querySpeakers(): Promise<AudioDeviceInfo[]> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return this.deviceManager.isSpeakerSelectionAvailable ? this.deviceManager.getSpeakers() : [];\n });\n }\n\n public async askDevicePermission(constrain: PermissionConstraints): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.deviceManager.askDevicePermission(constrain);\n });\n }\n\n public joinCall(microphoneOn?: boolean): CallTypeOf<AgentType> | undefined {\n if (_isInCall(this.getState().call?.state ?? 'None')) {\n throw new Error('You are already in the call!');\n }\n\n return this.teeErrorToEventEmitter(() => {\n const audioOptions: AudioOptions = { muted: !(microphoneOn ?? this.getState().isLocalPreviewMicrophoneEnabled) };\n // TODO: find a way to expose stream to here\n const videoOptions = { localVideoStreams: this.localStream ? [this.localStream] : undefined };\n /* @conditional-compile-remove(teams-adhoc-call) */\n /* @conditional-compile-remove(PSTN-calls) */\n if (isOutboundCall(this.locator)) {\n const phoneNumber = this.getState().alternateCallerId;\n return this.startCall(this.locator.participantIds, {\n alternateCallerId: phoneNumber ? { phoneNumber: phoneNumber } : undefined,\n audioOptions,\n videoOptions\n });\n }\n const call = this._joinCall(audioOptions, videoOptions);\n\n this.processNewCall(call);\n return call;\n });\n }\n\n private _joinCall(audioOptions: AudioOptions, videoOptions: VideoOptions): CallTypeOf<AgentType> {\n const isTeamsMeeting = 'meetingLink' in this.locator;\n /* @conditional-compile-remove(rooms) */\n const isRoomsCall = 'roomId' in this.locator;\n\n /* @conditional-compile-remove(teams-identity-support) */\n if (_isTeamsCallAgent(this.callAgent)) {\n if (!isTeamsMeeting) {\n throw new Error('Locator not supported by TeamsCallAgent');\n }\n\n return this.callAgent.join(this.locator as TeamsMeetingLinkLocator, {\n audioOptions,\n videoOptions\n }) as CallTypeOf<AgentType>;\n }\n if (isTeamsMeeting) {\n return this.callAgent.join(this.locator as TeamsMeetingLinkLocator, {\n audioOptions,\n videoOptions\n }) as CallTypeOf<AgentType>;\n }\n /* @conditional-compile-remove(rooms) */\n if (isRoomsCall) {\n return this.callAgent.join(this.locator as RoomCallLocator, {\n audioOptions,\n videoOptions\n }) as CallTypeOf<AgentType>;\n }\n return this.callAgent.join(this.locator as GroupCallLocator, {\n audioOptions,\n videoOptions\n }) as CallTypeOf<AgentType>;\n }\n\n public async createStreamView(\n remoteUserId?: string,\n options?: VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> {\n if (remoteUserId === undefined) {\n return await this.handlers.onCreateLocalStreamView(options);\n } else {\n return await this.handlers.onCreateRemoteStreamView(remoteUserId, options);\n }\n }\n\n public async disposeStreamView(remoteUserId?: string): Promise<void> {\n if (remoteUserId === undefined) {\n await this.handlers.onDisposeLocalStreamView();\n } else {\n await this.handlers.onDisposeRemoteStreamView(remoteUserId);\n }\n }\n\n public async leaveCall(forEveryone?: boolean): Promise<void> {\n await this.handlers.onHangUp(forEveryone);\n this.unsubscribeCallEvents();\n this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, undefined);\n // We set the adapter.call object to undefined immediately when a call is ended.\n // We do not set the context.callId to undefined because it is a part of the immutable data flow loop.\n this.call = undefined;\n this.stopCamera();\n this.mute();\n }\n\n public async setCamera(device: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onSelectCamera(device, options);\n });\n }\n\n public async setMicrophone(device: AudioDeviceInfo): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onSelectMicrophone(device);\n });\n }\n\n public async setSpeaker(device: AudioDeviceInfo): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onSelectSpeaker(device);\n });\n }\n\n public async startCamera(options?: VideoStreamOptions): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (!isCameraOn(this.getState())) {\n await this.handlers.onToggleCamera(options);\n }\n });\n }\n\n public async stopCamera(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (isCameraOn(this.getState())) {\n await this.handlers.onToggleCamera();\n }\n });\n }\n\n public async mute(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n this.context.setIsLocalMicrophoneEnabled(false);\n if (_isInCall(this.call?.state) && !this.call?.isMuted) {\n await this.handlers.onToggleMicrophone();\n }\n });\n }\n\n public async unmute(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n this.context.setIsLocalMicrophoneEnabled(true);\n if (_isInCall(this.call?.state) && this.call?.isMuted) {\n await this.handlers.onToggleMicrophone();\n }\n });\n }\n\n public async startScreenShare(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (!this.call?.isScreenSharingOn) {\n await this.handlers.onToggleScreenShare();\n }\n });\n }\n\n public async stopScreenShare(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (this.call?.isScreenSharingOn) {\n await this.handlers.onToggleScreenShare();\n }\n });\n }\n\n /* @conditional-compile-remove(unsupported-browser) */\n public allowUnsupportedBrowserVersion(): void {\n this.context.setAllowedUnsupportedBrowser();\n this.context.updateClientState(this.callClient.getState());\n }\n\n /* @conditional-compile-remove(video-background-effects) */\n public async blurVideoBackground(backgroundBlurConfig?: BackgroundBlurConfig): Promise<void> {\n await this.handlers.onBlurVideoBackground(backgroundBlurConfig);\n }\n /* @conditional-compile-remove(video-background-effects) */\n public async replaceVideoBackground(backgroundReplacementConfig: BackgroundReplacementConfig): Promise<void> {\n await this.handlers.onReplaceVideoBackground(backgroundReplacementConfig);\n }\n\n /* @conditional-compile-remove(video-background-effects) */\n public async stopVideoBackgroundEffect(): Promise<void> {\n await this.handlers.onRemoveVideoBackgroundEffects();\n }\n /* @conditional-compile-remove(video-background-effects) */\n public updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void {\n this.context.setBackroundPickerImages(backgroundImages);\n }\n\n public startCall(\n participants:\n | string[]\n /* @conditional-compile-remove(PSTN-calls) */\n | CommunicationIdentifier[],\n options?: StartCallOptions\n ): CallTypeOf<AgentType> | undefined {\n if (_isInCall(this.getState().call?.state ?? 'None')) {\n throw new Error('You are already in the call.');\n }\n\n const idsToAdd = participants.map((participant) => {\n // FIXME: `onStartCall` does not allow a Teams user.\n // Need some way to return an error if a Teams user is provided.\n const backendId: CommunicationIdentifier = _toCommunicationIdentifier(participant);\n if (isPhoneNumberIdentifier(backendId)) {\n if (options?.alternateCallerId === undefined) {\n throw new Error('Unable to start call, PSTN user present with no alternateCallerId.');\n }\n return backendId as PhoneNumberIdentifier;\n } else if (isCommunicationUserIdentifier(backendId)) {\n return backendId as CommunicationUserIdentifier;\n }\n return backendId as UnknownIdentifier;\n });\n\n const call = this.handlers.onStartCall(idsToAdd, options) as CallTypeOf<AgentType>;\n if (!call) {\n throw new Error('Unable to start call.');\n }\n this.processNewCall(call);\n\n return call;\n }\n\n private processNewCall(call: CallCommon): void {\n this.call = call;\n this.context.setCurrentCallId(call.id);\n\n // Resync state after callId is set\n this.context.updateClientState(this.callClient.getState());\n this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, this.call);\n this.subscribeCallEvents();\n }\n\n public async removeParticipant(\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ): Promise<void> {\n let participant = userId;\n /* @conditional-compile-remove(PSTN-calls) */\n participant = _toCommunicationIdentifier(userId);\n this.handlers.onRemoveParticipant(participant);\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(\n participant: PhoneNumberIdentifier | CommunicationUserIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> {\n if (isPhoneNumberIdentifier(participant) && options) {\n this.handlers.onAddParticipant(participant, options);\n } else if (isCommunicationUserIdentifier(participant)) {\n this.handlers.onAddParticipant(participant);\n }\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async holdCall(): Promise<void> {\n if (this.call?.state !== 'LocalHold') {\n this.handlers.onToggleHold();\n }\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async resumeCall(): Promise<void> {\n if (this.call?.state === 'LocalHold') {\n this.handlers.onToggleHold();\n }\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async sendDtmfTone(dtmfTone: DtmfTone): Promise<void> {\n this.handlers.onSendDtmfTone(dtmfTone);\n }\n\n public getState(): CallAdapterState {\n return this.context.getState();\n }\n\n public onStateChange(handler: (state: CallAdapterState) => void): void {\n this.context.onStateChange(handler);\n }\n\n public offStateChange(handler: (state: CallAdapterState) => void): void {\n this.context.offStateChange(handler);\n }\n\n on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n on(event: 'callEnded', listener: CallEndedListener): void;\n on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n on(event: 'error', errorHandler: (e: AdapterError) => void): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public on(event: string, listener: (e: any) => void): void {\n this.emitter.on(event, listener);\n }\n\n private subscribeCallEvents(): void {\n this.call?.on('remoteParticipantsUpdated', this.onRemoteParticipantsUpdated.bind(this));\n this.call?.on('isMutedChanged', this.isMyMutedChanged.bind(this));\n this.call?.on('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));\n this.call?.on('idChanged', this.callIdChanged.bind(this));\n }\n\n private unsubscribeCallEvents(): void {\n for (const subscriber of this.participantSubscribers.values()) {\n subscriber.unsubscribeAll();\n }\n this.participantSubscribers.clear();\n this.call?.off('remoteParticipantsUpdated', this.onRemoteParticipantsUpdated.bind(this));\n this.call?.off('isMutedChanged', this.isMyMutedChanged.bind(this));\n this.call?.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));\n this.call?.off('idChanged', this.callIdChanged.bind(this));\n }\n\n private isMyMutedChanged = (): void => {\n this.emitter.emit('isMutedChanged', {\n participantId: this.getState().userId,\n isMuted: this.call?.isMuted\n });\n };\n\n private onRemoteParticipantsUpdated({\n added,\n removed\n }: {\n added: RemoteParticipant[];\n removed: RemoteParticipant[];\n }): void {\n if (added && added.length > 0) {\n this.emitter.emit('participantsJoined', { joined: added });\n }\n if (removed && removed.length > 0) {\n this.emitter.emit('participantsLeft', { removed: removed });\n }\n\n added.forEach((participant) => {\n this.participantSubscribers.set(\n toFlatCommunicationIdentifier(participant.identifier),\n new ParticipantSubscriber(participant, this.emitter)\n );\n });\n\n removed.forEach((participant) => {\n const subscriber = this.participantSubscribers.get(toFlatCommunicationIdentifier(participant.identifier));\n subscriber && subscriber.unsubscribeAll();\n this.participantSubscribers.delete(toFlatCommunicationIdentifier(participant.identifier));\n });\n }\n\n private isScreenSharingOnChanged(): void {\n this.emitter.emit('isLocalScreenSharingActiveChanged', { isScreenSharingOn: this.call?.isScreenSharingOn });\n }\n\n private callIdChanged(): void {\n this.call?.id && this.emitter.emit('callIdChanged', { callId: this.call.id });\n }\n\n private resetDiagnosticsForwarder(newCall?: CallCommon): void {\n if (this.diagnosticsForwarder) {\n this.diagnosticsForwarder.unsubscribe();\n }\n if (newCall) {\n this.diagnosticsForwarder = new DiagnosticsForwarder(this.emitter, newCall);\n }\n }\n\n off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n off(event: 'callEnded', listener: CallEndedListener): void;\n off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n off(event: 'error', errorHandler: (e: AdapterError) => void): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public off(event: string, listener: (e: any) => void): void {\n this.emitter.off(event, listener);\n }\n\n private async asyncTeeErrorToEventEmitter<T>(f: () => Promise<T>): Promise<T> {\n try {\n return await f();\n } catch (error) {\n if (isCallError(error as Error)) {\n this.emitter.emit('error', error as AdapterError);\n }\n throw error;\n }\n }\n\n private teeErrorToEventEmitter<T>(f: () => T): T {\n try {\n return f();\n } catch (error) {\n if (isCallError(error as Error)) {\n this.emitter.emit('error', error as AdapterError);\n }\n throw error;\n }\n }\n}\n\n/* @conditional-compile-remove(teams-adhoc-call) */\n/* @conditional-compile-remove(PSTN-calls) */\n/**\n * Locator used by {@link createAzureCommunicationCallAdapter} to call one or more participants\n *\n * @remarks\n * This is currently in beta and only supports calling one Teams User.\n *\n * @example\n * ```\n * ['8:orgid:ab220efe-5725-4742-9792-9fba7c9ac458']\n * ```\n *\n * @beta\n */\nexport type CallParticipantsLocator = {\n participantIds: string[];\n};\n\n/**\n * Locator used by {@link createAzureCommunicationCallAdapter} to locate the call to join\n *\n * @public\n */\nexport type CallAdapterLocator =\n | TeamsMeetingLinkLocator\n | GroupCallLocator\n | /* @conditional-compile-remove(rooms) */ RoomCallLocator\n | /* @conditional-compile-remove(teams-adhoc-call) */ /* @conditional-compile-remove(PSTN-calls) */ CallParticipantsLocator;\n\n/**\n * Optional parameters to create {@link AzureCommunicationCallAdapter}\n *\n * @beta\n */\nexport type AzureCommunicationCallAdapterOptions = {\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 /* @conditional-compile-remove(video-background-effects) */\n /**\n * Default set of background images for background image picker.\n */\n videoBackgroundImages?: VideoBackgroundImage[];\n};\n\n/**\n * Arguments for creating the Azure Communication Services implementation of {@link CallAdapter}.\n *\n * Note: `displayName` can be a maximum of 256 characters.\n *\n * @public\n */\nexport type AzureCommunicationCallAdapterArgs = {\n userId: CommunicationUserIdentifier;\n displayName: string;\n credential: CommunicationTokenCredential;\n locator: CallAdapterLocator;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * A phone number in E.164 format procured using Azure Communication Services that will be used to represent callers identity.\n * E.164 numbers are formatted as [+] [country code] [phone number including area code]. For example, +14255550123 for a US phone number.\n */\n alternateCallerId?: string;\n /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(video-background-effects) */\n /**\n * Optional parameters for the {@link AzureCommunicationCallAdapter} created\n */\n options?: AzureCommunicationCallAdapterOptions;\n};\n\n/**\n * Optional parameters to create {@link AzureCommunicationCallAdapter}\n *\n * @beta\n */\nexport type TeamsAdapterOptions = {\n /**\n * Use this to fetch profile information which will override data in {@link CallAdapterState} like display name\n * The onFetchProfile is fetch-and-forget one time action for each user, once a user profile is updated, the value will be cached\n * and would not be updated again within the lifecycle of adapter.\n */\n onFetchProfile?: OnFetchProfileCallback;\n};\n\n/**\n * Arguments for creating the Azure Communication Services implementation of {@link TeamsCallAdapter}.\n *\n * @beta\n */\nexport type TeamsCallAdapterArgs = {\n userId: MicrosoftTeamsUserIdentifier;\n credential: CommunicationTokenCredential;\n locator: TeamsMeetingLinkLocator;\n /**\n * Optional parameters for the {@link TeamsCallAdapter} created\n */\n options?: TeamsAdapterOptions;\n};\n\n/**\n * Create a {@link CallAdapter} backed by Azure Communication Services.\n *\n * This is the default implementation of {@link CallAdapter} provided by this library.\n *\n * Note: `displayName` can be a maximum of 256 characters.\n *\n * @public\n */\nexport const createAzureCommunicationCallAdapter = async ({\n userId,\n displayName,\n credential,\n locator,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,\n /* @conditional-compile-remove(video-background-effects) */ options\n}: AzureCommunicationCallAdapterArgs): Promise<CallAdapter> => {\n if (!isValidIdentifier(userId)) {\n throw new Error('Invalid identifier. Please provide valid identifier object.');\n }\n\n const callClient = createStatefulCallClient({\n userId,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId\n });\n const callAgent = await callClient.createCallAgent(credential, {\n displayName\n });\n const adapter = createAzureCommunicationCallAdapterFromClient(\n callClient,\n callAgent,\n locator,\n /* @conditional-compile-remove(video-background-effects) */ options\n );\n return adapter;\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * @beta\n */\nexport const createTeamsCallAdapter = async ({\n userId,\n credential,\n locator,\n options\n}: TeamsCallAdapterArgs): Promise<TeamsCallAdapter> => {\n const callClient = createStatefulCallClient({\n userId\n });\n const callAgent = await callClient.createTeamsCallAgent(credential, {\n undefined\n });\n const adapter = createTeamsCallAdapterFromClient(callClient, callAgent, locator, options);\n return adapter;\n};\n\ntype PartialArgsType<Adapter> = Adapter extends CallAdapter\n ? Partial<AzureCommunicationCallAdapterArgs>\n : Partial<TeamsCallAdapterArgs>;\n\ntype AdapterOf<AdapterKind extends 'AzureCommunication' | 'Teams'> = AdapterKind extends 'AzureCommunication'\n ? CallAdapter\n : never | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAdapter;\n\n/**\n * @private\n */\nconst useAzureCommunicationCallAdapterGeneric = <\n AdapterKind extends 'AzureCommunication' | 'Teams',\n Adapter extends AdapterOf<AdapterKind>\n>(\n args: PartialArgsType<Adapter>,\n afterCreate?: (adapter: Adapter) => Promise<Adapter>,\n beforeDispose?: (adapter: Adapter) => Promise<void>,\n adapterKind: AdapterKind = 'AzureCommunication' as AdapterKind\n): Adapter | undefined => {\n const { credential, locator, userId } = args;\n const displayName = 'displayName' in args ? args.displayName : undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = 'alternateCallerId' in args ? args.alternateCallerId : undefined;\n /* @conditional-compile-remove(rooms) */\n const options = 'options' in args ? args.options : undefined;\n\n // State update needed to rerender the parent component when a new adapter is created.\n const [adapter, setAdapter] = useState<Adapter | undefined>(undefined);\n // Ref needed for cleanup to access the old adapter created asynchronously.\n const adapterRef = useRef<Adapter | undefined>(undefined);\n\n const afterCreateRef = useRef<((adapter: Adapter) => Promise<Adapter>) | undefined>(undefined);\n const beforeDisposeRef = useRef<((adapter: Adapter) => Promise<void>) | undefined>(undefined);\n // These refs are updated on *each* render, so that the latest values\n // are used in the `useEffect` closures below.\n // Using a Ref ensures that new values for the callbacks do not trigger the\n // useEffect blocks, and a new adapter creation / distruction is not triggered.\n afterCreateRef.current = afterCreate;\n beforeDisposeRef.current = beforeDispose;\n\n useEffect(\n () => {\n if (!credential || !locator || !userId) {\n return;\n }\n\n if (adapterKind === 'AzureCommunication' && !displayName) {\n return;\n }\n (async () => {\n if (adapterRef.current) {\n // Dispose the old adapter when a new one is created.\n //\n // This clean up function uses `adapterRef` because `adapter` can not be added to the dependency array of\n // this `useEffect` -- we do not want to trigger a new adapter creation because of the first adapter\n // creation.\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n\n let newAdapter: Adapter | undefined = undefined;\n if (adapterKind === 'AzureCommunication') {\n // This is just the type check to ensure that displayName is defined.\n if (!displayName) {\n throw new Error('Unreachable code, displayName already checked above.');\n }\n // This is just the type check to ensure that roleHint is defined.\n /* @conditional-compile-remove(rooms) */\n if (options && !('roleHint' in options)) {\n throw new Error('Unreachable code, provided a options without roleHint.');\n }\n newAdapter = (await createAzureCommunicationCallAdapter({\n credential,\n displayName: displayName,\n locator,\n userId: userId as CommunicationUserIdentifier,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,\n /* @conditional-compile-remove(rooms) */ options\n })) as Adapter;\n } else if (adapterKind === 'Teams') {\n // This is just the type check to ensure that roleHint is defined.\n /* @conditional-compile-remove(teams-identity-support)) */\n if (options && !('onFetchProfile' in options)) {\n throw new Error('Unreachable code, provided a options without roleHint.');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n newAdapter = (await createTeamsCallAdapter({\n credential,\n locator: locator as TeamsMeetingLinkLocator,\n userId: userId as MicrosoftTeamsUserIdentifier,\n options\n })) as Adapter;\n } else {\n throw new Error('Unreachable code, unknown adapterKind');\n }\n\n if (!newAdapter) {\n throw Error('Unreachable code! Get undefined adapter');\n }\n\n if (afterCreateRef.current) {\n newAdapter = await afterCreateRef.current(newAdapter);\n }\n adapterRef.current = newAdapter;\n setAdapter(newAdapter);\n })();\n },\n // Explicitly list all arguments so that caller doesn't have to memoize the `args` object.\n [\n adapterRef,\n afterCreateRef,\n beforeDisposeRef,\n credential,\n locator,\n adapterKind,\n userId,\n displayName,\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId,\n /* @conditional-compile-remove(rooms) */\n /* @conditional-compile-remove(teams-identity-support) */\n options\n ]\n );\n\n // Dispose any existing adapter when the component unmounts.\n useEffect(() => {\n return () => {\n (async () => {\n if (adapterRef.current) {\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n })();\n };\n }, []);\n\n return adapter;\n};\n\n/**\n * A custom React hook to simplify the creation of {@link CallAdapter}.\n *\n * Similar to {@link createAzureCommunicationCallAdapter}, but takes care of asynchronous\n * creation of the adapter internally.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n *\n * Note that you must memoize the arguments to avoid recreating adapter on each render.\n * See storybook for typical usage examples.\n *\n * @public\n */\nexport const useAzureCommunicationCallAdapter = (\n /**\n * Arguments to be passed to {@link createAzureCommunicationCallAdapter}.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n */\n args: Partial<AzureCommunicationCallAdapterArgs>,\n /**\n * Optional callback to modify the adapter once it is created.\n *\n * If set, must return the modified adapter.\n */\n afterCreate?: (adapter: CallAdapter) => Promise<CallAdapter>,\n /**\n * Optional callback called before the adapter is disposed.\n *\n * This is useful for clean up tasks, e.g., leaving any ongoing calls.\n */\n beforeDispose?: (adapter: CallAdapter) => Promise<void>\n): CallAdapter | undefined => {\n return useAzureCommunicationCallAdapterGeneric(args, afterCreate, beforeDispose, 'AzureCommunication');\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * A custom React hook to simplify the creation of {@link TeamsCallAdapter}.\n *\n * Similar to {@link createTeamsAzureCommunicationCallAdapter}, but takes care of asynchronous\n * creation of the adapter internally.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n *\n * Note that you must memoize the arguments to avoid recreating adapter on each render.\n * See storybook for typical usage examples.\n *\n * @beta\n */\nexport const useTeamsCallAdapter = (\n /**\n * Arguments to be passed to {@link createAzureCommunicationCallAdapter}.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n */\n args: Partial<TeamsCallAdapterArgs>,\n /**\n * Optional callback to modify the adapter once it is created.\n *\n * If set, must return the modified adapter.\n */\n afterCreate?: (adapter: TeamsCallAdapter) => Promise<TeamsCallAdapter>,\n /**\n * Optional callback called before the adapter is disposed.\n *\n * This is useful for clean up tasks, e.g., leaving any ongoing calls.\n */\n beforeDispose?: (adapter: TeamsCallAdapter) => Promise<void>\n): TeamsCallAdapter | undefined => {\n return useAzureCommunicationCallAdapterGeneric(args, afterCreate, beforeDispose, 'Teams');\n};\n\n/**\n * Create a {@link CallAdapter} using the provided {@link StatefulCallClient}.\n *\n * Useful if you want to keep a reference to {@link StatefulCallClient}.\n * Consider using {@link createAzureCommunicationCallAdapter} for a simpler API.\n *\n * @public\n */\nexport const createAzureCommunicationCallAdapterFromClient: (\n callClient: StatefulCallClient,\n callAgent: CallAgent,\n locator: CallAdapterLocator,\n /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(video-background-effects) */ options?: AzureCommunicationCallAdapterOptions\n) => Promise<CallAdapter> = async (\n callClient: StatefulCallClient,\n callAgent: CallAgent,\n locator: CallAdapterLocator,\n options?\n): Promise<CallAdapter> => {\n const deviceManager = (await callClient.getDeviceManager()) as StatefulDeviceManager;\n /* @conditional-compile-remove(unsupported-browser) */\n await callClient.feature(Features.DebugInfo).getEnvironmentInfo();\n return new AzureCommunicationCallAdapter(\n callClient,\n locator,\n callAgent,\n deviceManager,\n /* @conditional-compile-remove(rooms) */ options\n );\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * Create a {@link TeamsCallAdapter} using the provided {@link StatefulCallClient}.\n *\n * Useful if you want to keep a reference to {@link StatefulCallClient}.\n * Consider using {@link createAzureCommunicationCallAdapter} for a simpler API.\n *\n * @beta\n */\nexport const createTeamsCallAdapterFromClient = async (\n callClient: StatefulCallClient,\n callAgent: TeamsCallAgent,\n locator: CallAdapterLocator,\n options?: TeamsAdapterOptions\n): Promise<TeamsCallAdapter> => {\n const deviceManager = (await callClient.getDeviceManager()) as StatefulDeviceManager;\n /* @conditional-compile-remove(unsupported-browser) */\n await callClient.feature(Features.DebugInfo).getEnvironmentInfo();\n return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager, options);\n};\n\nconst isCallError = (e: Error): e is CallError => {\n return e['target'] !== undefined && e['innerError'] !== undefined;\n};\n\n/* @conditional-compile-remove(teams-adhoc-call) */\n/* @conditional-compile-remove(PSTN-calls) */\nconst isOutboundCall = (callLocator: CallAdapterLocator): callLocator is CallParticipantsLocator => {\n return 'participantIds' in callLocator;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../calling-stateful-client/src\"\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"AzureCommunicationCallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,SAAS,EAA0B,sDAA6C;AACzF,OAAO,EAIL,wBAAwB,EAKzB,mDAA0C;AAC3C,yDAAyD;AACzD,OAAO,EAAE,iBAAiB,EAAE,mDAA0C;AAuBtE,sDAAsD;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAoBtC,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIhG,OAAO,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,yCAAgC;AACpG,OAAO,EAGL,6BAA6B,EAC7B,uBAAuB,EAKxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAkB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAA0B,MAAM,0BAA0B,CAAC;AAI9F,4EAA4E;AAC5E,MAAM,WAAW;IAMf,YAC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,CAAC,YAAY,CAAC,KAAK,SAAS,CAAC;AACpE,CAAC,CAAC;AAEF,mDAAmD;AACnD,6CAA6C;AAC7C,MAAM,cAAc,GAAG,CAAC,WAA+B,EAA0C,EAAE;IACjG,OAAO,gBAAgB,IAAI,WAAW,CAAC;AACzC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { _isInCall, _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport {\n CallClientState,\n CallError,\n CallState,\n createStatefulCallClient,\n StatefulCallClient,\n StatefulDeviceManager,\n TeamsCall,\n TeamsCallAgent as BetaTeamsCallAgent\n} from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { _isTeamsCallAgent } from '@internal/calling-stateful-client';\nimport { CallCommon } from '@internal/calling-stateful-client';\nimport {\n AudioOptions,\n CallAgent,\n GroupCallLocator,\n TeamsMeetingLinkLocator,\n LocalVideoStream as SDKLocalVideoStream,\n AudioDeviceInfo,\n VideoDeviceInfo,\n RemoteParticipant,\n PermissionConstraints,\n PropertyChangedEvent,\n StartCallOptions,\n VideoOptions,\n Call\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(video-background-effects) */\nimport { BackgroundBlurConfig, BackgroundReplacementConfig } from '@azure/communication-calling-effects';\n/* @conditional-compile-remove(teams-identity-support)) */\nimport { TeamsCallAgent } from '@azure/communication-calling';\n/* @conditional-compile-remove(rooms) */\nimport { RoomCallLocator } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { Features } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';\nimport { EventEmitter } from 'events';\nimport {\n CommonCallAdapter,\n CallEndedListener,\n CallIdChangedListener,\n CallAdapterState,\n DisplayNameChangedListener,\n IsMutedChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsSpeakingChangedListener,\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n DiagnosticChangedEventListner,\n CallAdapterCallEndedEvent,\n CallAdapter\n} from './CallAdapter';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoBackgroundImage } from './CallAdapter';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCallAdapter } from './CallAdapter';\nimport { getCallCompositePage, IsCallEndedPage, isCameraOn, isValidIdentifier } from '../utils';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { Role } from '@internal/react-components';\nimport { toFlatCommunicationIdentifier, _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CommunicationTokenCredential,\n CommunicationUserIdentifier,\n isCommunicationUserIdentifier,\n isPhoneNumberIdentifier,\n UnknownIdentifier,\n PhoneNumberIdentifier,\n CommunicationIdentifier,\n MicrosoftTeamsUserIdentifier\n} from '@azure/communication-common';\nimport { ParticipantSubscriber } from './ParticipantSubcriber';\nimport { AdapterError } from '../../common/adapters';\nimport { DiagnosticsForwarder } from './DiagnosticsForwarder';\nimport { useEffect, useRef, useState } from 'react';\nimport { CallHandlersOf, createHandlers } from './createHandlers';\nimport { createProfileStateModifier, OnFetchProfileCallback } from './OnFetchProfileCallback';\n\ntype CallTypeOf<AgentType extends CallAgent | BetaTeamsCallAgent> = AgentType extends CallAgent ? Call : TeamsCall;\n\n/** Context of call, which is a centralized context for all state updates */\nclass CallContext {\n private emitter: EventEmitter = new EventEmitter();\n private state: CallAdapterState;\n private callId: string | undefined;\n private displayNameModifier: AdapterStateModifier | undefined;\n\n constructor(\n clientState: CallClientState,\n isTeamsCall: boolean,\n options?: {\n /* @conditional-compile-remove(rooms) */ roleHint?: Role;\n maxListeners?: number;\n onFetchProfile?: OnFetchProfileCallback;\n /* @conditional-compile-remove(video-background-effects) */ videoBackgroundImages?: VideoBackgroundImage[];\n }\n ) {\n this.state = {\n isLocalPreviewMicrophoneEnabled: false,\n userId: clientState.userId,\n displayName: clientState.callAgent?.displayName,\n devices: clientState.deviceManager,\n call: undefined,\n page: 'configuration',\n latestErrors: clientState.latestErrors,\n isTeamsCall,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId: clientState.alternateCallerId,\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo: clientState.environmentInfo,\n /* @conditional-compile-remove(unsupported-browser) */ unsupportedBrowserVersionsAllowed: false,\n /* @conditional-compile-remove(rooms) */ roleHint: options?.roleHint,\n /* @conditional-compile-remove(video-background-effects) */ videoBackgroundImages: options?.videoBackgroundImages,\n cameraStatus: undefined\n };\n this.emitter.setMaxListeners(options?.maxListeners ?? 50);\n this.bindPublicMethods();\n this.displayNameModifier = options?.onFetchProfile\n ? createProfileStateModifier(options.onFetchProfile, () => {\n this.setState(this.getState());\n })\n : undefined;\n }\n\n private bindPublicMethods(): void {\n /* @conditional-compile-remove(unsupported-browser) */\n this.setAllowedUnsupportedBrowser.bind(this);\n }\n\n public onStateChange(handler: (_uiState: CallAdapterState) => void): void {\n this.emitter.on('stateChanged', handler);\n }\n\n public offStateChange(handler: (_uiState: CallAdapterState) => void): void {\n this.emitter.off('stateChanged', handler);\n }\n\n public setState(state: CallAdapterState): void {\n this.state = this.displayNameModifier ? this.displayNameModifier(state) : state;\n this.emitter.emit('stateChanged', this.state);\n }\n\n public getState(): CallAdapterState {\n return this.state;\n }\n\n public setIsLocalMicrophoneEnabled(isLocalPreviewMicrophoneEnabled: boolean): void {\n this.setState({ ...this.state, isLocalPreviewMicrophoneEnabled });\n }\n\n // This is the key to find current call object in client state\n public setCurrentCallId(callId: string | undefined): void {\n this.callId = callId;\n }\n\n public onCallEnded(handler: (callEndedData: CallAdapterCallEndedEvent) => void): void {\n this.emitter.on('callEnded', handler);\n }\n\n public offCallEnded(handler: (callEndedData: CallAdapterCallEndedEvent) => void): void {\n this.emitter.off('callEnded', handler);\n }\n\n public updateClientState(clientState: CallClientState): void {\n let call = this.callId ? clientState.calls[this.callId] : undefined;\n const latestEndedCall = clientState.callsEnded ? findLatestEndedCall(clientState.callsEnded) : undefined;\n // As the state is transitioning to a new state, trigger appropriate callback events.\n const oldPage = this.state.page;\n /* @conditional-compile-remove(unsupported-browser) */\n const environmentInfo = {\n environmentInfo: this.state.environmentInfo,\n unsupportedBrowserVersionOptedIn: this.state.unsupportedBrowserVersionsAllowed\n };\n const newPage = getCallCompositePage(\n call,\n latestEndedCall,\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo\n );\n if (!IsCallEndedPage(oldPage) && IsCallEndedPage(newPage)) {\n this.emitter.emit('callEnded', { callId: this.callId });\n // Reset the callId to undefined as the call has ended.\n this.setCurrentCallId(undefined);\n // Make sure that the call is set to undefined in the state.\n call = undefined;\n }\n\n if (this.state.page) {\n this.setState({\n ...this.state,\n userId: clientState.userId,\n displayName: clientState.callAgent?.displayName,\n call,\n page: newPage,\n endedCall: latestEndedCall,\n devices: clientState.deviceManager,\n latestErrors: clientState.latestErrors,\n cameraStatus:\n call?.localVideoStreams.find((s) => s.mediaStreamType === 'Video') ||\n clientState.deviceManager.unparentedViews.find((s) => s.mediaStreamType === 'Video')\n ? 'On'\n : 'Off'\n });\n }\n }\n\n /* @conditional-compile-remove(unsupported-browser) */\n public setAllowedUnsupportedBrowser(): void {\n this.setState({ ...this.state, unsupportedBrowserVersionsAllowed: true });\n }\n}\n\nconst findLatestEndedCall = (calls: { [key: string]: CallState }): CallState | undefined => {\n const callStates = Object.values(calls);\n if (callStates.length === 0) {\n return undefined;\n }\n let latestCall = callStates[0];\n for (const call of callStates.slice(1)) {\n if ((call.endTime?.getTime() ?? 0) > (latestCall.endTime?.getTime() ?? 0)) {\n latestCall = call;\n }\n }\n return latestCall;\n};\n\n/**\n * @private\n */\nexport type AdapterStateModifier = (state: CallAdapterState) => CallAdapterState;\n\n/**\n * @private\n */\nexport class AzureCommunicationCallAdapter<AgentType extends CallAgent | BetaTeamsCallAgent = CallAgent>\n implements CommonCallAdapter\n{\n private callClient: StatefulCallClient;\n private callAgent: AgentType;\n private deviceManager: StatefulDeviceManager;\n private localStream: SDKLocalVideoStream | undefined;\n private locator: CallAdapterLocator;\n // Never use directly, even internally. Use `call` property instead.\n private _call?: CallCommon;\n private context: CallContext;\n private diagnosticsForwarder?: DiagnosticsForwarder;\n private handlers: CallHandlersOf<AgentType>;\n private participantSubscribers = new Map<string, ParticipantSubscriber>();\n private emitter: EventEmitter = new EventEmitter();\n private onClientStateChange: (clientState: CallClientState) => void;\n\n private get call(): CallCommon | undefined {\n return this._call;\n }\n\n private set call(newCall: CallCommon | undefined) {\n this.resetDiagnosticsForwarder(newCall);\n this._call = newCall;\n }\n\n constructor(\n callClient: StatefulCallClient,\n locator: CallAdapterLocator,\n callAgent: AgentType,\n deviceManager: StatefulDeviceManager,\n options?: AzureCommunicationCallAdapterOptions & TeamsAdapterOptions\n ) {\n this.bindPublicMethods();\n this.callClient = callClient;\n this.callAgent = callAgent;\n this.locator = locator;\n this.deviceManager = deviceManager;\n const isTeamsMeeting = 'meetingLink' in this.locator;\n this.context = new CallContext(callClient.getState(), isTeamsMeeting, options);\n\n this.context.onCallEnded((endCallData) => this.emitter.emit('callEnded', endCallData));\n\n const onStateChange = (clientState: CallClientState): void => {\n // unsubscribe when the instance gets disposed\n if (!this) {\n callClient.offStateChange(onStateChange);\n return;\n }\n\n // `updateClientState` searches for the current call from all the calls in the state using a cached `call.id`\n // from the call object. `call.id` can change during a call. We must update the cached `call.id` before\n // calling `updateClientState` so that we find the correct state object for the call even when `call.id`\n // has changed.\n // https://github.com/Azure/communication-ui-library/pull/1820\n if (this.call?.id) {\n this.context.setCurrentCallId(this.call.id);\n }\n this.context.updateClientState(clientState);\n };\n\n this.handlers = createHandlers(callClient, callAgent, deviceManager, undefined);\n\n this.onClientStateChange = onStateChange;\n\n this.subscribeDeviceManagerEvents();\n\n this.callClient.onStateChange(onStateChange);\n }\n\n // TODO: update this to include the 'selectedCameraChanged' when calling adds it to the device manager\n private subscribeDeviceManagerEvents(): void {\n this.deviceManager.on('selectedMicrophoneChanged', () => {\n this.emitter.emit('selectedMicrophoneChanged');\n });\n this.deviceManager.on('selectedSpeakerChanged', () => {\n this.emitter.emit('selectedSpeakerChanged');\n });\n }\n\n private bindPublicMethods(): void {\n this.onStateChange.bind(this);\n this.offStateChange.bind(this);\n this.getState.bind(this);\n this.dispose.bind(this);\n this.joinCall.bind(this);\n this.leaveCall.bind(this);\n this.setCamera.bind(this);\n this.setMicrophone.bind(this);\n this.setSpeaker.bind(this);\n this.askDevicePermission.bind(this);\n this.queryCameras.bind(this);\n this.queryMicrophones.bind(this);\n this.querySpeakers.bind(this);\n this.startCamera.bind(this);\n this.stopCamera.bind(this);\n this.mute.bind(this);\n this.unmute.bind(this);\n this.startCall.bind(this);\n this.startScreenShare.bind(this);\n this.stopScreenShare.bind(this);\n this.removeParticipant.bind(this);\n this.createStreamView.bind(this);\n this.disposeStreamView.bind(this);\n this.on.bind(this);\n this.off.bind(this);\n this.processNewCall.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.addParticipant.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.holdCall.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.resumeCall.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.sendDtmfTone.bind(this);\n /* @conditional-compile-remove(unsupported-browser) */\n this.allowUnsupportedBrowserVersion.bind(this);\n /* @conditional-compile-remove(video-background-effects) */\n this.blurVideoBackground.bind(this);\n /* @conditional-compile-remove(video-background-effects) */\n this.replaceVideoBackground.bind(this);\n /* @conditional-compile-remove(video-background-effects) */\n this.stopVideoBackgroundEffect.bind(this);\n }\n\n public dispose(): void {\n this.resetDiagnosticsForwarder();\n this.callClient.offStateChange(this.onClientStateChange);\n this.callAgent.dispose();\n }\n\n public async queryCameras(): Promise<VideoDeviceInfo[]> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return this.deviceManager.getCameras();\n });\n }\n\n public async queryMicrophones(): Promise<AudioDeviceInfo[]> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return this.deviceManager.getMicrophones();\n });\n }\n\n public async querySpeakers(): Promise<AudioDeviceInfo[]> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return this.deviceManager.isSpeakerSelectionAvailable ? this.deviceManager.getSpeakers() : [];\n });\n }\n\n public async askDevicePermission(constrain: PermissionConstraints): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.deviceManager.askDevicePermission(constrain);\n });\n }\n\n public joinCall(microphoneOn?: boolean): CallTypeOf<AgentType> | undefined {\n if (_isInCall(this.getState().call?.state ?? 'None')) {\n throw new Error('You are already in the call!');\n }\n\n return this.teeErrorToEventEmitter(() => {\n const audioOptions: AudioOptions = { muted: !(microphoneOn ?? this.getState().isLocalPreviewMicrophoneEnabled) };\n // TODO: find a way to expose stream to here\n const videoOptions = { localVideoStreams: this.localStream ? [this.localStream] : undefined };\n /* @conditional-compile-remove(teams-adhoc-call) */\n /* @conditional-compile-remove(PSTN-calls) */\n if (isOutboundCall(this.locator)) {\n const phoneNumber = this.getState().alternateCallerId;\n return this.startCall(this.locator.participantIds, {\n alternateCallerId: phoneNumber ? { phoneNumber: phoneNumber } : undefined,\n audioOptions,\n videoOptions\n });\n }\n const call = this._joinCall(audioOptions, videoOptions);\n\n this.processNewCall(call);\n return call;\n });\n }\n\n private _joinCall(audioOptions: AudioOptions, videoOptions: VideoOptions): CallTypeOf<AgentType> {\n const isTeamsMeeting = 'meetingLink' in this.locator;\n /* @conditional-compile-remove(rooms) */\n const isRoomsCall = 'roomId' in this.locator;\n\n /* @conditional-compile-remove(teams-identity-support) */\n if (_isTeamsCallAgent(this.callAgent)) {\n if (!isTeamsMeeting) {\n throw new Error('Locator not supported by TeamsCallAgent');\n }\n\n return this.callAgent.join(this.locator as TeamsMeetingLinkLocator, {\n audioOptions,\n videoOptions\n }) as CallTypeOf<AgentType>;\n }\n if (isTeamsMeeting) {\n return this.callAgent.join(this.locator as TeamsMeetingLinkLocator, {\n audioOptions,\n videoOptions\n }) as CallTypeOf<AgentType>;\n }\n /* @conditional-compile-remove(rooms) */\n if (isRoomsCall) {\n return this.callAgent.join(this.locator as RoomCallLocator, {\n audioOptions,\n videoOptions\n }) as CallTypeOf<AgentType>;\n }\n return this.callAgent.join(this.locator as GroupCallLocator, {\n audioOptions,\n videoOptions\n }) as CallTypeOf<AgentType>;\n }\n\n public async createStreamView(\n remoteUserId?: string,\n options?: VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> {\n if (remoteUserId === undefined) {\n return await this.handlers.onCreateLocalStreamView(options);\n } else {\n return await this.handlers.onCreateRemoteStreamView(remoteUserId, options);\n }\n }\n\n public async disposeStreamView(remoteUserId?: string): Promise<void> {\n if (remoteUserId === undefined) {\n await this.handlers.onDisposeLocalStreamView();\n } else {\n await this.handlers.onDisposeRemoteStreamView(remoteUserId);\n }\n }\n\n public async leaveCall(forEveryone?: boolean): Promise<void> {\n await this.handlers.onHangUp(forEveryone);\n this.unsubscribeCallEvents();\n this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, undefined);\n // We set the adapter.call object to undefined immediately when a call is ended.\n // We do not set the context.callId to undefined because it is a part of the immutable data flow loop.\n this.call = undefined;\n this.stopCamera();\n this.mute();\n }\n\n public async setCamera(device: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onSelectCamera(device, options);\n });\n }\n\n public async setMicrophone(device: AudioDeviceInfo): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onSelectMicrophone(device);\n });\n }\n\n public async setSpeaker(device: AudioDeviceInfo): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onSelectSpeaker(device);\n });\n }\n\n public async startCamera(options?: VideoStreamOptions): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (!isCameraOn(this.getState())) {\n await this.handlers.onToggleCamera(options);\n }\n });\n }\n\n public async stopCamera(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (isCameraOn(this.getState())) {\n await this.handlers.onToggleCamera();\n }\n });\n }\n\n public async mute(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n this.context.setIsLocalMicrophoneEnabled(false);\n if (_isInCall(this.call?.state) && !this.call?.isMuted) {\n await this.handlers.onToggleMicrophone();\n }\n });\n }\n\n public async unmute(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n this.context.setIsLocalMicrophoneEnabled(true);\n if (_isInCall(this.call?.state) && this.call?.isMuted) {\n await this.handlers.onToggleMicrophone();\n }\n });\n }\n\n public async startScreenShare(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (!this.call?.isScreenSharingOn) {\n await this.handlers.onToggleScreenShare();\n }\n });\n }\n\n public async stopScreenShare(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (this.call?.isScreenSharingOn) {\n await this.handlers.onToggleScreenShare();\n }\n });\n }\n\n /* @conditional-compile-remove(unsupported-browser) */\n public allowUnsupportedBrowserVersion(): void {\n this.context.setAllowedUnsupportedBrowser();\n this.context.updateClientState(this.callClient.getState());\n }\n\n /* @conditional-compile-remove(video-background-effects) */\n public async blurVideoBackground(backgroundBlurConfig?: BackgroundBlurConfig): Promise<void> {\n await this.handlers.onBlurVideoBackground(backgroundBlurConfig);\n }\n /* @conditional-compile-remove(video-background-effects) */\n public async replaceVideoBackground(backgroundReplacementConfig: BackgroundReplacementConfig): Promise<void> {\n await this.handlers.onReplaceVideoBackground(backgroundReplacementConfig);\n }\n\n /* @conditional-compile-remove(video-background-effects) */\n public async stopVideoBackgroundEffect(): Promise<void> {\n await this.handlers.onRemoveVideoBackgroundEffects();\n }\n\n public startCall(\n participants:\n | string[]\n /* @conditional-compile-remove(PSTN-calls) */\n | CommunicationIdentifier[],\n options?: StartCallOptions\n ): CallTypeOf<AgentType> | undefined {\n if (_isInCall(this.getState().call?.state ?? 'None')) {\n throw new Error('You are already in the call.');\n }\n\n const idsToAdd = participants.map((participant) => {\n // FIXME: `onStartCall` does not allow a Teams user.\n // Need some way to return an error if a Teams user is provided.\n const backendId: CommunicationIdentifier = _toCommunicationIdentifier(participant);\n if (isPhoneNumberIdentifier(backendId)) {\n if (options?.alternateCallerId === undefined) {\n throw new Error('Unable to start call, PSTN user present with no alternateCallerId.');\n }\n return backendId as PhoneNumberIdentifier;\n } else if (isCommunicationUserIdentifier(backendId)) {\n return backendId as CommunicationUserIdentifier;\n }\n return backendId as UnknownIdentifier;\n });\n\n const call = this.handlers.onStartCall(idsToAdd, options) as CallTypeOf<AgentType>;\n if (!call) {\n throw new Error('Unable to start call.');\n }\n this.processNewCall(call);\n\n return call;\n }\n\n private processNewCall(call: CallCommon): void {\n this.call = call;\n this.context.setCurrentCallId(call.id);\n\n // Resync state after callId is set\n this.context.updateClientState(this.callClient.getState());\n this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, this.call);\n this.subscribeCallEvents();\n }\n\n public async removeParticipant(\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ): Promise<void> {\n let participant = userId;\n /* @conditional-compile-remove(PSTN-calls) */\n participant = _toCommunicationIdentifier(userId);\n this.handlers.onRemoveParticipant(participant);\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(\n participant: PhoneNumberIdentifier | CommunicationUserIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> {\n if (isPhoneNumberIdentifier(participant) && options) {\n this.handlers.onAddParticipant(participant, options);\n } else if (isCommunicationUserIdentifier(participant)) {\n this.handlers.onAddParticipant(participant);\n }\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async holdCall(): Promise<void> {\n if (this.call?.state !== 'LocalHold') {\n this.handlers.onToggleHold();\n }\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async resumeCall(): Promise<void> {\n if (this.call?.state === 'LocalHold') {\n this.handlers.onToggleHold();\n }\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async sendDtmfTone(dtmfTone: DtmfTone): Promise<void> {\n this.handlers.onSendDtmfTone(dtmfTone);\n }\n\n public getState(): CallAdapterState {\n return this.context.getState();\n }\n\n public onStateChange(handler: (state: CallAdapterState) => void): void {\n this.context.onStateChange(handler);\n }\n\n public offStateChange(handler: (state: CallAdapterState) => void): void {\n this.context.offStateChange(handler);\n }\n\n on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n on(event: 'callEnded', listener: CallEndedListener): void;\n on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n on(event: 'error', errorHandler: (e: AdapterError) => void): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public on(event: string, listener: (e: any) => void): void {\n this.emitter.on(event, listener);\n }\n\n private subscribeCallEvents(): void {\n this.call?.on('remoteParticipantsUpdated', this.onRemoteParticipantsUpdated.bind(this));\n this.call?.on('isMutedChanged', this.isMyMutedChanged.bind(this));\n this.call?.on('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));\n this.call?.on('idChanged', this.callIdChanged.bind(this));\n }\n\n private unsubscribeCallEvents(): void {\n for (const subscriber of this.participantSubscribers.values()) {\n subscriber.unsubscribeAll();\n }\n this.participantSubscribers.clear();\n this.call?.off('remoteParticipantsUpdated', this.onRemoteParticipantsUpdated.bind(this));\n this.call?.off('isMutedChanged', this.isMyMutedChanged.bind(this));\n this.call?.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));\n this.call?.off('idChanged', this.callIdChanged.bind(this));\n }\n\n private isMyMutedChanged = (): void => {\n this.emitter.emit('isMutedChanged', {\n participantId: this.getState().userId,\n isMuted: this.call?.isMuted\n });\n };\n\n private onRemoteParticipantsUpdated({\n added,\n removed\n }: {\n added: RemoteParticipant[];\n removed: RemoteParticipant[];\n }): void {\n if (added && added.length > 0) {\n this.emitter.emit('participantsJoined', { joined: added });\n }\n if (removed && removed.length > 0) {\n this.emitter.emit('participantsLeft', { removed: removed });\n }\n\n added.forEach((participant) => {\n this.participantSubscribers.set(\n toFlatCommunicationIdentifier(participant.identifier),\n new ParticipantSubscriber(participant, this.emitter)\n );\n });\n\n removed.forEach((participant) => {\n const subscriber = this.participantSubscribers.get(toFlatCommunicationIdentifier(participant.identifier));\n subscriber && subscriber.unsubscribeAll();\n this.participantSubscribers.delete(toFlatCommunicationIdentifier(participant.identifier));\n });\n }\n\n private isScreenSharingOnChanged(): void {\n this.emitter.emit('isLocalScreenSharingActiveChanged', { isScreenSharingOn: this.call?.isScreenSharingOn });\n }\n\n private callIdChanged(): void {\n this.call?.id && this.emitter.emit('callIdChanged', { callId: this.call.id });\n }\n\n private resetDiagnosticsForwarder(newCall?: CallCommon): void {\n if (this.diagnosticsForwarder) {\n this.diagnosticsForwarder.unsubscribe();\n }\n if (newCall) {\n this.diagnosticsForwarder = new DiagnosticsForwarder(this.emitter, newCall);\n }\n }\n\n off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n off(event: 'callEnded', listener: CallEndedListener): void;\n off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n off(event: 'error', errorHandler: (e: AdapterError) => void): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public off(event: string, listener: (e: any) => void): void {\n this.emitter.off(event, listener);\n }\n\n private async asyncTeeErrorToEventEmitter<T>(f: () => Promise<T>): Promise<T> {\n try {\n return await f();\n } catch (error) {\n if (isCallError(error as Error)) {\n this.emitter.emit('error', error as AdapterError);\n }\n throw error;\n }\n }\n\n private teeErrorToEventEmitter<T>(f: () => T): T {\n try {\n return f();\n } catch (error) {\n if (isCallError(error as Error)) {\n this.emitter.emit('error', error as AdapterError);\n }\n throw error;\n }\n }\n}\n\n/* @conditional-compile-remove(teams-adhoc-call) */\n/* @conditional-compile-remove(PSTN-calls) */\n/**\n * Locator used by {@link createAzureCommunicationCallAdapter} to call one or more participants\n *\n * @remarks\n * This is currently in beta and only supports calling one Teams User.\n *\n * @example\n * ```\n * ['8:orgid:ab220efe-5725-4742-9792-9fba7c9ac458']\n * ```\n *\n * @beta\n */\nexport type CallParticipantsLocator = {\n participantIds: string[];\n};\n\n/**\n * Locator used by {@link createAzureCommunicationCallAdapter} to locate the call to join\n *\n * @public\n */\nexport type CallAdapterLocator =\n | TeamsMeetingLinkLocator\n | GroupCallLocator\n | /* @conditional-compile-remove(rooms) */ RoomCallLocator\n | /* @conditional-compile-remove(teams-adhoc-call) */ /* @conditional-compile-remove(PSTN-calls) */ CallParticipantsLocator;\n\n/**\n * Optional parameters to create {@link AzureCommunicationCallAdapter}\n *\n * @beta\n */\nexport type AzureCommunicationCallAdapterOptions = {\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 * Arguments for creating the Azure Communication Services implementation of {@link CallAdapter}.\n *\n * Note: `displayName` can be a maximum of 256 characters.\n *\n * @public\n */\nexport type AzureCommunicationCallAdapterArgs = {\n userId: CommunicationUserIdentifier;\n displayName: string;\n credential: CommunicationTokenCredential;\n locator: CallAdapterLocator;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * A phone number in E.164 format procured using Azure Communication Services that will be used to represent callers identity.\n * E.164 numbers are formatted as [+] [country code] [phone number including area code]. For example, +14255550123 for a US phone number.\n */\n alternateCallerId?: string;\n /* @conditional-compile-remove(rooms) */\n /**\n * Optional parameters for the {@link AzureCommunicationCallAdapter} created\n */\n options?: AzureCommunicationCallAdapterOptions;\n};\n\n/**\n * Optional parameters to create {@link AzureCommunicationCallAdapter}\n *\n * @beta\n */\nexport type TeamsAdapterOptions = {\n /**\n * Use this to fetch profile information which will override data in {@link CallAdapterState} like display name\n * The onFetchProfile is fetch-and-forget one time action for each user, once a user profile is updated, the value will be cached\n * and would not be updated again within the lifecycle of adapter.\n */\n onFetchProfile?: OnFetchProfileCallback;\n};\n\n/**\n * Arguments for creating the Azure Communication Services implementation of {@link TeamsCallAdapter}.\n *\n * @beta\n */\nexport type TeamsCallAdapterArgs = {\n userId: MicrosoftTeamsUserIdentifier;\n credential: CommunicationTokenCredential;\n locator: TeamsMeetingLinkLocator;\n /**\n * Optional parameters for the {@link TeamsCallAdapter} created\n */\n options?: TeamsAdapterOptions;\n};\n\n/**\n * Create a {@link CallAdapter} backed by Azure Communication Services.\n *\n * This is the default implementation of {@link CallAdapter} provided by this library.\n *\n * Note: `displayName` can be a maximum of 256 characters.\n *\n * @public\n */\nexport const createAzureCommunicationCallAdapter = async ({\n userId,\n displayName,\n credential,\n locator,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId\n}: AzureCommunicationCallAdapterArgs): Promise<CallAdapter> => {\n if (!isValidIdentifier(userId)) {\n throw new Error('Invalid identifier. Please provide valid identifier object.');\n }\n\n const callClient = createStatefulCallClient({\n userId,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId\n });\n const callAgent = await callClient.createCallAgent(credential, {\n displayName\n });\n const adapter = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, locator);\n return adapter;\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * @beta\n */\nexport const createTeamsCallAdapter = async ({\n userId,\n credential,\n locator,\n options\n}: TeamsCallAdapterArgs): Promise<TeamsCallAdapter> => {\n const callClient = createStatefulCallClient({\n userId\n });\n const callAgent = await callClient.createTeamsCallAgent(credential, {\n undefined\n });\n const adapter = createTeamsCallAdapterFromClient(callClient, callAgent, locator, options);\n return adapter;\n};\n\ntype PartialArgsType<Adapter> = Adapter extends CallAdapter\n ? Partial<AzureCommunicationCallAdapterArgs>\n : Partial<TeamsCallAdapterArgs>;\n\ntype AdapterOf<AdapterKind extends 'AzureCommunication' | 'Teams'> = AdapterKind extends 'AzureCommunication'\n ? CallAdapter\n : never | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAdapter;\n\n/**\n * @private\n */\nconst useAzureCommunicationCallAdapterGeneric = <\n AdapterKind extends 'AzureCommunication' | 'Teams',\n Adapter extends AdapterOf<AdapterKind>\n>(\n args: PartialArgsType<Adapter>,\n afterCreate?: (adapter: Adapter) => Promise<Adapter>,\n beforeDispose?: (adapter: Adapter) => Promise<void>,\n adapterKind: AdapterKind = 'AzureCommunication' as AdapterKind\n): Adapter | undefined => {\n const { credential, locator, userId } = args;\n const displayName = 'displayName' in args ? args.displayName : undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = 'alternateCallerId' in args ? args.alternateCallerId : undefined;\n /* @conditional-compile-remove(rooms) */\n const options = 'options' in args ? args.options : undefined;\n\n // State update needed to rerender the parent component when a new adapter is created.\n const [adapter, setAdapter] = useState<Adapter | undefined>(undefined);\n // Ref needed for cleanup to access the old adapter created asynchronously.\n const adapterRef = useRef<Adapter | undefined>(undefined);\n\n const afterCreateRef = useRef<((adapter: Adapter) => Promise<Adapter>) | undefined>(undefined);\n const beforeDisposeRef = useRef<((adapter: Adapter) => Promise<void>) | undefined>(undefined);\n // These refs are updated on *each* render, so that the latest values\n // are used in the `useEffect` closures below.\n // Using a Ref ensures that new values for the callbacks do not trigger the\n // useEffect blocks, and a new adapter creation / distruction is not triggered.\n afterCreateRef.current = afterCreate;\n beforeDisposeRef.current = beforeDispose;\n\n useEffect(\n () => {\n if (!credential || !locator || !userId) {\n return;\n }\n\n if (adapterKind === 'AzureCommunication' && !displayName) {\n return;\n }\n (async () => {\n if (adapterRef.current) {\n // Dispose the old adapter when a new one is created.\n //\n // This clean up function uses `adapterRef` because `adapter` can not be added to the dependency array of\n // this `useEffect` -- we do not want to trigger a new adapter creation because of the first adapter\n // creation.\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n\n let newAdapter: Adapter | undefined = undefined;\n if (adapterKind === 'AzureCommunication') {\n // This is just the type check to ensure that displayName is defined.\n if (!displayName) {\n throw new Error('Unreachable code, displayName already checked above.');\n }\n // This is just the type check to ensure that roleHint is defined.\n /* @conditional-compile-remove(rooms) */\n if (options && !('roleHint' in options)) {\n throw new Error('Unreachable code, provided a options without roleHint.');\n }\n newAdapter = (await createAzureCommunicationCallAdapter({\n credential,\n displayName: displayName,\n locator,\n userId: userId as CommunicationUserIdentifier,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,\n /* @conditional-compile-remove(rooms) */ options\n })) as Adapter;\n } else if (adapterKind === 'Teams') {\n // This is just the type check to ensure that roleHint is defined.\n /* @conditional-compile-remove(teams-identity-support)) */\n if (options && !('onFetchProfile' in options)) {\n throw new Error('Unreachable code, provided a options without roleHint.');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n newAdapter = (await createTeamsCallAdapter({\n credential,\n locator: locator as TeamsMeetingLinkLocator,\n userId: userId as MicrosoftTeamsUserIdentifier,\n options\n })) as Adapter;\n } else {\n throw new Error('Unreachable code, unknown adapterKind');\n }\n\n if (!newAdapter) {\n throw Error('Unreachable code! Get undefined adapter');\n }\n\n if (afterCreateRef.current) {\n newAdapter = await afterCreateRef.current(newAdapter);\n }\n adapterRef.current = newAdapter;\n setAdapter(newAdapter);\n })();\n },\n // Explicitly list all arguments so that caller doesn't have to memoize the `args` object.\n [\n adapterRef,\n afterCreateRef,\n beforeDisposeRef,\n credential,\n locator,\n adapterKind,\n userId,\n displayName,\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId,\n /* @conditional-compile-remove(rooms) */\n /* @conditional-compile-remove(teams-identity-support) */\n options\n ]\n );\n\n // Dispose any existing adapter when the component unmounts.\n useEffect(() => {\n return () => {\n (async () => {\n if (adapterRef.current) {\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n })();\n };\n }, []);\n\n return adapter;\n};\n\n/**\n * A custom React hook to simplify the creation of {@link CallAdapter}.\n *\n * Similar to {@link createAzureCommunicationCallAdapter}, but takes care of asynchronous\n * creation of the adapter internally.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n *\n * Note that you must memoize the arguments to avoid recreating adapter on each render.\n * See storybook for typical usage examples.\n *\n * @public\n */\nexport const useAzureCommunicationCallAdapter = (\n /**\n * Arguments to be passed to {@link createAzureCommunicationCallAdapter}.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n */\n args: Partial<AzureCommunicationCallAdapterArgs>,\n /**\n * Optional callback to modify the adapter once it is created.\n *\n * If set, must return the modified adapter.\n */\n afterCreate?: (adapter: CallAdapter) => Promise<CallAdapter>,\n /**\n * Optional callback called before the adapter is disposed.\n *\n * This is useful for clean up tasks, e.g., leaving any ongoing calls.\n */\n beforeDispose?: (adapter: CallAdapter) => Promise<void>\n): CallAdapter | undefined => {\n return useAzureCommunicationCallAdapterGeneric(args, afterCreate, beforeDispose, 'AzureCommunication');\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * A custom React hook to simplify the creation of {@link TeamsCallAdapter}.\n *\n * Similar to {@link createTeamsAzureCommunicationCallAdapter}, but takes care of asynchronous\n * creation of the adapter internally.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n *\n * Note that you must memoize the arguments to avoid recreating adapter on each render.\n * See storybook for typical usage examples.\n *\n * @beta\n */\nexport const useTeamsCallAdapter = (\n /**\n * Arguments to be passed to {@link createAzureCommunicationCallAdapter}.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n */\n args: Partial<TeamsCallAdapterArgs>,\n /**\n * Optional callback to modify the adapter once it is created.\n *\n * If set, must return the modified adapter.\n */\n afterCreate?: (adapter: TeamsCallAdapter) => Promise<TeamsCallAdapter>,\n /**\n * Optional callback called before the adapter is disposed.\n *\n * This is useful for clean up tasks, e.g., leaving any ongoing calls.\n */\n beforeDispose?: (adapter: TeamsCallAdapter) => Promise<void>\n): TeamsCallAdapter | undefined => {\n return useAzureCommunicationCallAdapterGeneric(args, afterCreate, beforeDispose, 'Teams');\n};\n\n/**\n * Create a {@link CallAdapter} using the provided {@link StatefulCallClient}.\n *\n * Useful if you want to keep a reference to {@link StatefulCallClient}.\n * Consider using {@link createAzureCommunicationCallAdapter} for a simpler API.\n *\n * @public\n */\nexport const createAzureCommunicationCallAdapterFromClient: (\n callClient: StatefulCallClient,\n callAgent: CallAgent,\n locator: CallAdapterLocator,\n /* @conditional-compile-remove(rooms) */ options?: AzureCommunicationCallAdapterOptions\n) => Promise<CallAdapter> = async (\n callClient: StatefulCallClient,\n callAgent: CallAgent,\n locator: CallAdapterLocator,\n options?\n): Promise<CallAdapter> => {\n const deviceManager = (await callClient.getDeviceManager()) as StatefulDeviceManager;\n /* @conditional-compile-remove(unsupported-browser) */\n await callClient.feature(Features.DebugInfo).getEnvironmentInfo();\n return new AzureCommunicationCallAdapter(\n callClient,\n locator,\n callAgent,\n deviceManager,\n /* @conditional-compile-remove(rooms) */ options\n );\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * Create a {@link TeamsCallAdapter} using the provided {@link StatefulCallClient}.\n *\n * Useful if you want to keep a reference to {@link StatefulCallClient}.\n * Consider using {@link createAzureCommunicationCallAdapter} for a simpler API.\n *\n * @beta\n */\nexport const createTeamsCallAdapterFromClient = async (\n callClient: StatefulCallClient,\n callAgent: TeamsCallAgent,\n locator: CallAdapterLocator,\n options?: TeamsAdapterOptions\n): Promise<TeamsCallAdapter> => {\n const deviceManager = (await callClient.getDeviceManager()) as StatefulDeviceManager;\n /* @conditional-compile-remove(unsupported-browser) */\n await callClient.feature(Features.DebugInfo).getEnvironmentInfo();\n return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager, options);\n};\n\nconst isCallError = (e: Error): e is CallError => {\n return e['target'] !== undefined && e['innerError'] !== undefined;\n};\n\n/* @conditional-compile-remove(teams-adhoc-call) */\n/* @conditional-compile-remove(PSTN-calls) */\nconst isOutboundCall = (callLocator: CallAdapterLocator): callLocator is CallParticipantsLocator => {\n return 'participantIds' in callLocator;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../calling-stateful-client/src\"\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
@@ -329,14 +329,6 @@ export interface CallAdapterCallOperations {
329
329
  * @beta
330
330
  */
331
331
  stopVideoBackgroundEffect(): Promise<void>;
332
- /**
333
- * Override the background picker images for background replacement effect.
334
- *
335
- * @param backgroundImages - Array of custom background images.
336
- *
337
- * @beta
338
- */
339
- updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;
340
332
  }
341
333
  /**
342
334
  * Functionality for managing devices within a call.