@azure/communication-react 1.14.1-alpha-202403210013 → 1.14.1-alpha-202403270012

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 (393) hide show
  1. package/dist/communication-react.d.ts +45 -39
  2. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BgK9tOAk.js → RichTextSendBoxWrapper-Yty3fOoA.js} +6 -6
  3. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BgK9tOAk.js.map → RichTextSendBoxWrapper-Yty3fOoA.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{index-B_kqOVlM.js → index-BEomNZbT.js} +1864 -1452
  5. package/dist/dist-cjs/communication-react/index-BEomNZbT.js.map +1 -0
  6. package/dist/dist-cjs/communication-react/index.js +3 -3
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  8. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -2
  10. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +0 -1
  12. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  13. package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js +0 -2
  14. package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js.map +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +17 -16
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +2 -4
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -2
  20. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  22. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +0 -6
  23. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +0 -4
  25. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +1 -9
  26. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +12 -7
  28. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  29. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +3 -10
  30. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  31. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +1 -2
  32. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  33. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -2
  34. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +0 -5
  35. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -1
  37. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +19 -13
  38. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -5
  40. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  41. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +0 -1
  42. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
  43. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +0 -5
  44. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
  45. package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js +0 -2
  46. package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js.map +1 -1
  47. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js +0 -3
  48. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js.map +1 -1
  49. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  50. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +4 -1
  51. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  52. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +11 -14
  53. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  54. package/dist/dist-esm/communication-react/src/index.js +0 -1
  55. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  56. package/dist/dist-esm/react-components/src/components/AttachmentCard.d.ts +41 -0
  57. package/dist/dist-esm/react-components/src/components/AttachmentCard.js +108 -0
  58. package/dist/dist-esm/react-components/src/components/AttachmentCard.js.map +1 -0
  59. package/dist/dist-esm/react-components/src/components/AttachmentCardGroup.d.ts +16 -0
  60. package/dist/dist-esm/react-components/src/components/{FileCardGroup.js → AttachmentCardGroup.js} +5 -5
  61. package/dist/dist-esm/react-components/src/components/AttachmentCardGroup.js.map +1 -0
  62. package/dist/dist-esm/react-components/src/components/AttachmentDownloadCards.d.ts +49 -0
  63. package/dist/dist-esm/react-components/src/components/{FileDownloadCards.js → AttachmentDownloadCards.js} +28 -27
  64. package/dist/dist-esm/react-components/src/components/AttachmentDownloadCards.js.map +1 -0
  65. package/dist/dist-esm/react-components/src/components/{FileUploadCards.d.ts → AttachmentUploadCards.d.ts} +15 -15
  66. package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.js +24 -0
  67. package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.js.map +1 -0
  68. package/dist/dist-esm/react-components/src/components/CameraButton.js +0 -1
  69. package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
  70. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
  71. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  72. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +1 -1
  73. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +10 -10
  74. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  75. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.d.ts +1 -1
  76. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js +6 -6
  77. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
  78. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -1
  79. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  80. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -1
  81. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +6 -6
  82. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  83. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +10 -8
  84. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  85. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +1 -1
  86. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  87. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -1
  88. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +6 -6
  89. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  90. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +10 -8
  91. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  92. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +1 -10
  93. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  94. package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
  95. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +5 -3
  96. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
  97. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.d.ts +40 -0
  98. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js +77 -0
  99. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js.map +1 -0
  100. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +4 -5
  101. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -3
  102. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  103. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +6 -4
  104. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  105. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +1 -1
  106. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +3 -1
  108. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +21 -6
  109. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
  110. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +1 -8
  111. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +55 -30
  112. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +2 -2
  114. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +12 -12
  115. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -1
  116. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +10 -10
  117. package/dist/dist-esm/react-components/src/components/SendBox.js +44 -34
  118. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +2 -2
  120. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +7 -5
  121. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +1 -1
  122. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.d.ts +15 -0
  123. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js +58 -0
  124. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js.map +1 -0
  125. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.d.ts +14 -0
  126. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js +149 -0
  127. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js.map +1 -0
  128. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.d.ts +4 -0
  129. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js +14 -2
  130. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js.map +1 -1
  131. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.d.ts +11 -0
  132. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.js +23 -0
  133. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.js.map +1 -0
  134. package/dist/dist-esm/react-components/src/components/VideoGallery.js +7 -3
  135. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +5 -6
  137. package/dist/dist-esm/react-components/src/components/VideoTile.js +3 -51
  138. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  139. package/dist/dist-esm/react-components/src/components/index.d.ts +7 -5
  140. package/dist/dist-esm/react-components/src/components/index.js +3 -3
  141. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  142. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +9 -0
  143. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.js +27 -0
  144. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.js.map +1 -0
  145. package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.d.ts +70 -0
  146. package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.js +259 -0
  147. package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.js.map +1 -0
  148. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +1 -1
  149. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +2 -2
  150. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
  151. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +4 -0
  152. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +5 -1
  153. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +1 -1
  154. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +2 -2
  155. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +5 -4
  156. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
  157. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +2 -2
  158. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +8 -1
  159. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  160. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -1
  161. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +6 -5
  162. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  163. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +1 -1
  164. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +16 -13
  165. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  166. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -1
  167. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +5 -3
  168. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  169. package/dist/dist-esm/react-components/src/components/utils/common.d.ts +3 -3
  170. package/dist/dist-esm/react-components/src/components/utils/common.js +5 -5
  171. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  172. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  173. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +6 -6
  174. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +6 -6
  175. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +6 -6
  176. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +6 -6
  177. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +6 -6
  178. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +6 -6
  179. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +6 -6
  180. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +6 -6
  181. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +6 -6
  182. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +6 -6
  183. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +6 -6
  184. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +6 -6
  185. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +6 -6
  186. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +6 -6
  187. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +6 -6
  188. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +6 -6
  189. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +6 -6
  190. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +6 -6
  191. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +6 -6
  192. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +6 -6
  193. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +6 -6
  194. package/dist/dist-esm/react-components/src/theming/FluentV9ThemeProvider.js +1 -1
  195. package/dist/dist-esm/react-components/src/theming/FluentV9ThemeProvider.js.map +1 -1
  196. package/dist/dist-esm/react-components/src/theming/icons.js +3 -10
  197. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  198. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +151 -0
  199. package/dist/dist-esm/{react-composites/src/composites/ChatComposite/file-sharing/FileUploadHandler.js → react-components/src/types/Attachment.js} +1 -1
  200. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -0
  201. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -1
  202. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  203. package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +5 -0
  204. package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
  205. package/dist/dist-esm/react-components/src/types/index.d.ts +1 -0
  206. package/dist/dist-esm/react-components/src/types/index.js +1 -0
  207. package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
  208. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +3 -3
  209. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  210. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  211. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +2 -3
  212. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +18 -60
  213. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  214. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  215. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js +0 -2
  216. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js.map +1 -1
  217. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +3 -9
  218. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
  219. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  220. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +14 -65
  221. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  222. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -9
  223. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  224. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.d.ts +1 -1
  225. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js +10 -10
  226. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js.map +1 -1
  227. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +0 -9
  228. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  229. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +2 -0
  230. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +25 -13
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.d.ts +10 -2
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js +3 -3
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js.map +1 -1
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.d.ts +0 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js +1 -2
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js.map +1 -1
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +12 -7
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +4 -18
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +2 -9
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +2 -22
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +1 -6
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +1 -6
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +6 -9
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +2 -0
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -2
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +5 -27
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.js +0 -3
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.js.map +1 -1
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +5 -0
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +5 -1
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  263. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.d.ts +2 -2
  264. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +3 -12
  265. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
  266. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/getFirstSpotlightedRemoteParticipantSelector.d.ts +15 -0
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/getFirstSpotlightedRemoteParticipantSelector.js +32 -0
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/getFirstSpotlightedRemoteParticipantSelector.js.map +1 -0
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +10 -9
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js +28 -3
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js.map +1 -1
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.js +0 -1
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.js.map +1 -1
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -8
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/spotlightUtils.d.ts +6 -0
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/spotlightUtils.js +36 -0
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/spotlightUtils.js.map +1 -1
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/useConsoleErrors.js +0 -3
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/useConsoleErrors.js.map +1 -1
  281. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +3 -3
  282. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  283. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -2
  284. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +22 -35
  285. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  286. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +1 -1
  287. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  288. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -8
  289. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  290. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +1 -1
  291. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +8 -8
  292. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  293. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +3 -12
  294. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  295. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +4 -4
  296. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  297. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +1 -1
  298. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +10 -11
  299. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  300. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +1 -1
  302. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +22 -22
  303. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  304. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +2 -2
  305. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +11 -8
  306. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
  307. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  308. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +1 -1
  309. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
  310. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUpload.d.ts +2 -69
  311. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUpload.js.map +1 -1
  312. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js +4 -4
  313. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js.map +1 -1
  314. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -1
  315. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -1
  316. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +1 -1
  317. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +3 -3
  318. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  319. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  320. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +1 -1
  321. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  322. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +5 -10
  323. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  324. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +7 -8
  325. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  326. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +11 -15
  327. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  328. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.d.ts +4 -0
  329. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +14 -3
  330. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  331. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +2 -0
  332. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +16 -17
  333. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  334. package/dist/dist-esm/react-composites/src/composites/common/SendBox.js +8 -8
  335. package/dist/dist-esm/react-composites/src/composites/common/SendBox.js.map +1 -1
  336. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +0 -3
  337. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js +1 -6
  338. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
  339. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +0 -1
  340. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js +1 -4
  341. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
  342. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +2 -29
  343. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  344. package/dist/dist-esm/react-composites/src/composites/common/icons.js +2 -10
  345. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  346. package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependency.js +0 -1
  347. package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependency.js.map +1 -1
  348. package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependencyLazy.js +0 -1
  349. package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependencyLazy.js.map +1 -1
  350. package/dist/dist-esm/react-composites/src/composites/common/styles/ParticipantContainer.styles.d.ts +5 -1
  351. package/dist/dist-esm/react-composites/src/composites/common/styles/ParticipantContainer.styles.js +29 -0
  352. package/dist/dist-esm/react-composites/src/composites/common/styles/ParticipantContainer.styles.js.map +1 -1
  353. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +5 -0
  354. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  355. package/dist/dist-esm/react-composites/src/composites/index.js +0 -2
  356. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  357. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +2 -0
  358. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +2 -0
  359. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +2 -0
  360. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +2 -0
  361. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +2 -0
  362. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +2 -0
  363. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +2 -0
  364. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +2 -0
  365. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +2 -0
  366. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +2 -0
  367. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +2 -0
  368. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +2 -0
  369. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +2 -0
  370. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +2 -0
  371. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +2 -0
  372. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +2 -0
  373. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +2 -0
  374. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +2 -0
  375. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +2 -0
  376. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +2 -0
  377. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +2 -0
  378. package/package.json +1 -1
  379. package/dist/dist-cjs/communication-react/index-B_kqOVlM.js.map +0 -1
  380. package/dist/dist-esm/react-components/src/components/FileCard.d.ts +0 -39
  381. package/dist/dist-esm/react-components/src/components/FileCard.js +0 -92
  382. package/dist/dist-esm/react-components/src/components/FileCard.js.map +0 -1
  383. package/dist/dist-esm/react-components/src/components/FileCardGroup.d.ts +0 -16
  384. package/dist/dist-esm/react-components/src/components/FileCardGroup.js.map +0 -1
  385. package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +0 -114
  386. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +0 -1
  387. package/dist/dist-esm/react-components/src/components/FileUploadCards.js +0 -34
  388. package/dist/dist-esm/react-components/src/components/FileUploadCards.js.map +0 -1
  389. package/dist/dist-esm/react-components/src/components/styles/IconButton.styles.d.ts +0 -5
  390. package/dist/dist-esm/react-components/src/components/styles/IconButton.styles.js +0 -17
  391. package/dist/dist-esm/react-components/src/components/styles/IconButton.styles.js.map +0 -1
  392. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadHandler.d.ts +0 -10
  393. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadHandler.js.map +0 -1
@@ -15,7 +15,7 @@ export declare class CallSubscriber {
15
15
  private _participantSubscribers;
16
16
  private _recordingSubscriber;
17
17
  private _transcriptionSubscriber;
18
- private _localRecordingSubscriber;
18
+ private _localRecordingSubscriber?;
19
19
  private _pptLiveSubscriber;
20
20
  private _optimalVideoCountSubscriber;
21
21
  private _TeamsCaptionsSubscriber?;
@@ -32,6 +32,7 @@ export declare class CallSubscriber {
32
32
  private removeParticipantListener;
33
33
  private stateChanged;
34
34
  private initCaptionSubscriber;
35
+ private initLocalRecordingNotificationSubscriber;
35
36
  private idChanged;
36
37
  private isScreenSharingOnChanged;
37
38
  private isMuteChanged;
@@ -5,7 +5,6 @@ import { toFlatCommunicationIdentifier } from "../../acs-ui-common/src";
5
5
  /* @conditional-compile-remove(close-captions) */
6
6
  import { TeamsCaptionsSubscriber } from './CaptionsSubscriber';
7
7
  import { convertSdkLocalStreamToDeclarativeLocalStream, convertSdkParticipantToDeclarativeParticipant } from './Converter';
8
- /* @conditional-compile-remove(video-background-effects) */
9
8
  import { LocalVideoStreamVideoEffectsSubscriber } from './LocalVideoStreamVideoEffectsSubscriber';
10
9
  import { ParticipantSubscriber } from './ParticipantSubscriber';
11
10
  import { RecordingSubscriber } from './RecordingSubscriber';
@@ -37,12 +36,13 @@ export class CallSubscriber {
37
36
  this._call.on('stateChanged', this.stateChanged);
38
37
  /* @conditional-compile-remove(close-captions) */
39
38
  this._call.on('stateChanged', this.initCaptionSubscriber);
39
+ /* @conditional-compile-remove(local-recording-notification) */
40
+ this._call.on('stateChanged', this.initLocalRecordingNotificationSubscriber);
40
41
  this._call.on('idChanged', this.idChanged);
41
42
  this._call.on('isScreenSharingOnChanged', this.isScreenSharingOnChanged);
42
43
  this._call.on('remoteParticipantsUpdated', this.remoteParticipantsUpdated);
43
44
  this._call.on('localVideoStreamsUpdated', this.localVideoStreamsUpdated);
44
45
  this._call.on('isMutedChanged', this.isMuteChanged);
45
- /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(capabilities) */
46
46
  this._call.on('roleChanged', this.callRoleChangedHandler);
47
47
  this._call.feature(Features.DominantSpeakers).on('dominantSpeakersChanged', this.dominantSpeakersChanged);
48
48
  /* @conditional-compile-remove(total-participant-count) */
@@ -58,16 +58,17 @@ export class CallSubscriber {
58
58
  }
59
59
  };
60
60
  this.unsubscribe = () => {
61
- var _a, _b, _c, _d;
61
+ var _a, _b, _c, _d, _e;
62
62
  this._call.off('stateChanged', this.stateChanged);
63
63
  /* @conditional-compile-remove(close-captions) */
64
64
  this._call.off('stateChanged', this.initCaptionSubscriber);
65
+ /* @conditional-compile-remove(local-recording-notification) */
66
+ this._call.off('stateChanged', this.initLocalRecordingNotificationSubscriber);
65
67
  this._call.off('idChanged', this.idChanged);
66
68
  this._call.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged);
67
69
  this._call.off('remoteParticipantsUpdated', this.remoteParticipantsUpdated);
68
70
  this._call.off('localVideoStreamsUpdated', this.localVideoStreamsUpdated);
69
71
  this._call.off('isMutedChanged', this.isMuteChanged);
70
- /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(capabilities) */
71
72
  this._call.off('roleChanged', this.callRoleChangedHandler);
72
73
  /* @conditional-compile-remove(total-participant-count) */
73
74
  this._call.off('totalParticipantCountChanged', this.totalParticipantCountChangedHandler);
@@ -86,19 +87,19 @@ export class CallSubscriber {
86
87
  this._recordingSubscriber.unsubscribe();
87
88
  this._transcriptionSubscriber.unsubscribe();
88
89
  /* @conditional-compile-remove(local-recording-notification) */
89
- this._localRecordingSubscriber.unsubscribe();
90
+ (_a = this._localRecordingSubscriber) === null || _a === void 0 ? void 0 : _a.unsubscribe();
90
91
  this._optimalVideoCountSubscriber.unsubscribe();
91
92
  /* @conditional-compile-remove(ppt-live) */
92
93
  this._pptLiveSubscriber.unsubscribe();
93
94
  /* @conditional-compile-remove(close-captions) */
94
- (_a = this._TeamsCaptionsSubscriber) === null || _a === void 0 ? void 0 : _a.unsubscribe();
95
+ (_b = this._TeamsCaptionsSubscriber) === null || _b === void 0 ? void 0 : _b.unsubscribe();
95
96
  /* @conditional-compile-remove(acs-close-captions) */
96
- (_b = this._CaptionsSubscriber) === null || _b === void 0 ? void 0 : _b.unsubscribe();
97
- (_c = this._raiseHandSubscriber) === null || _c === void 0 ? void 0 : _c.unsubscribe();
97
+ (_c = this._CaptionsSubscriber) === null || _c === void 0 ? void 0 : _c.unsubscribe();
98
+ (_d = this._raiseHandSubscriber) === null || _d === void 0 ? void 0 : _d.unsubscribe();
98
99
  /* @conditional-compile-remove(capabilities) */
99
100
  this._capabilitiesSubscriber.unsubscribe();
100
101
  /* @conditional-compile-remove(reaction) */
101
- (_d = this._reactionSubscriber) === null || _d === void 0 ? void 0 : _d.unsubscribe();
102
+ (_e = this._reactionSubscriber) === null || _e === void 0 ? void 0 : _e.unsubscribe();
102
103
  /* @conditional-compile-remove(spotlight) */
103
104
  this._spotlightSubscriber.unsubscribe();
104
105
  };
@@ -121,6 +122,15 @@ export class CallSubscriber {
121
122
  this._call.off('stateChanged', this.initCaptionSubscriber);
122
123
  }
123
124
  };
125
+ /* @conditional-compile-remove(local-recording-notification) */
126
+ this.initLocalRecordingNotificationSubscriber = () => {
127
+ // Subscribe to LocalRecordingFeature as it is only available in interop scenarios
128
+ // Will throw an error if not in interop scenarios
129
+ if (this._call.state === 'Connected' && this._call.kind === 'TeamsCall' && !this._localRecordingSubscriber) {
130
+ this._localRecordingSubscriber = new LocalRecordingSubscriber(this._callIdRef, this._context, this._call.feature(Features.LocalRecording));
131
+ this._call.off('stateChanged', this.initLocalRecordingNotificationSubscriber);
132
+ }
133
+ };
124
134
  this.idChanged = () => {
125
135
  this._internalContext.setCallId(this._call.id, this._callIdRef.callId);
126
136
  this._context.setCallId(this._call.id, this._callIdRef.callId);
@@ -132,7 +142,6 @@ export class CallSubscriber {
132
142
  this.isMuteChanged = () => {
133
143
  this._context.setCallIsMicrophoneMuted(this._callIdRef.callId, this._call.isMuted);
134
144
  };
135
- /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(capabilities) */
136
145
  this.callRoleChangedHandler = () => {
137
146
  this._context.setRole(this._callIdRef.callId, this._call.role);
138
147
  };
@@ -192,8 +201,6 @@ export class CallSubscriber {
192
201
  this._diagnosticsSubscriber = new UserFacingDiagnosticsSubscriber(this._callIdRef, this._context, this._call.feature(Features.UserFacingDiagnostics));
193
202
  this._participantSubscribers = new Map();
194
203
  this._recordingSubscriber = new RecordingSubscriber(this._callIdRef, this._context, this._call.feature(Features.Recording));
195
- /* @conditional-compile-remove(local-recording-notification) */
196
- this._localRecordingSubscriber = new LocalRecordingSubscriber(this._callIdRef, this._context, this._call.feature(Features.LocalRecording));
197
204
  /* @conditional-compile-remove(ppt-live) */
198
205
  this._pptLiveSubscriber = new PPTLiveSubscriber(this._callIdRef, this._context, this._call);
199
206
  this._transcriptionSubscriber = new TranscriptionSubscriber(this._callIdRef, this._context, this._call.feature(Features.Transcription));
@@ -205,7 +212,6 @@ export class CallSubscriber {
205
212
  context: this._context,
206
213
  localOptimalVideoCountFeature: this._call.feature(Features.OptimalVideoCount)
207
214
  });
208
- /* @conditional-compile-remove(video-background-effects) */
209
215
  this._localVideoStreamVideoEffectsSubscribers = new Map();
210
216
  /* @conditional-compile-remove(capabilities) */
211
217
  this._capabilitiesSubscriber = new CapabilitiesSubscriber(this._callIdRef, this._context, this._call.feature(Features.Capabilities));
@@ -1 +1 @@
1
- {"version":3,"file":"CallSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/CallSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,QAAQ,EAAuC,MAAM,8BAA8B,CAAC;AAK7F,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAIxE,iDAAiD;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EACL,6CAA6C,EAC7C,6CAA6C,EAC9C,MAAM,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,gBAAgB,CAAC,CAC9F,CAAC;IACJ,CAAC;IAEO,yBAAyB,CAAC,WAA8B;QAC9D,MAAM,cAAc,GAAG,6BAA6B,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC7E,MAAM,qBAAqB,GAAG,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAC/E,IAAI,qBAAqB,EAAE,CAAC;YAC1B,qBAAqB,CAAC,WAAW,EAAE,CAAC;YACpC,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CAsIF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Features, LocalVideoStream, RemoteParticipant } from '@azure/communication-calling';\n/* @conditional-compile-remove(acs-close-captions) */\nimport { Captions } from '@azure/communication-calling';\n/* @conditional-compile-remove(close-captions) */\nimport { TeamsCaptions } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallCommon } from './BetaToStableTypes';\nimport { CallContext } from './CallContext';\nimport { CallIdRef } from './CallIdRef';\n/* @conditional-compile-remove(close-captions) */\nimport { TeamsCaptionsSubscriber } from './CaptionsSubscriber';\nimport {\n convertSdkLocalStreamToDeclarativeLocalStream,\n convertSdkParticipantToDeclarativeParticipant\n} from './Converter';\nimport { InternalCallContext } from './InternalCallContext';\n/* @conditional-compile-remove(video-background-effects) */\nimport { LocalVideoStreamVideoEffectsSubscriber } from './LocalVideoStreamVideoEffectsSubscriber';\nimport { ParticipantSubscriber } from './ParticipantSubscriber';\nimport { RecordingSubscriber } from './RecordingSubscriber';\n/* @conditional-compile-remove(ppt-live) */\nimport { PPTLiveSubscriber } from './PPTLiveSubscriber';\nimport { disposeView } from './StreamUtils';\nimport { TranscriptionSubscriber } from './TranscriptionSubscriber';\nimport { UserFacingDiagnosticsSubscriber } from './UserFacingDiagnosticsSubscriber';\nimport { RaiseHandSubscriber } from './RaiseHandSubscriber';\nimport { OptimalVideoCountSubscriber } from './OptimalVideoCountSubscriber';\n/* @conditional-compile-remove(capabilities) */\nimport { CapabilitiesSubscriber } from './CapabilitiesSubscriber';\n/* @conditional-compile-remove(reaction) */\nimport { ReactionSubscriber } from './ReactionSubscriber';\n/* @conditional-compile-remove(spotlight) */\nimport { SpotlightSubscriber } from './SpotlightSubscriber';\n/* @conditional-compile-remove(acs-close-captions) */\nimport { CaptionsSubscriber } from './CaptionsSubscriber';\n/* @conditional-compile-remove(local-recording-notification) */\nimport { LocalRecordingSubscriber } from './LocalRecordingSubscriber';\n\n/**\n * Keeps track of the listeners assigned to a particular call because when we get an event from SDK, it doesn't tell us\n * which call it is for. If we keep track of this then we know which call in the state that needs an update and also\n * which property of that call. Also we can use this when unregistering to a call.\n */\nexport class CallSubscriber {\n private _call: CallCommon;\n private _callIdRef: CallIdRef;\n private _context: CallContext;\n private _internalContext: InternalCallContext;\n\n private _diagnosticsSubscriber: UserFacingDiagnosticsSubscriber;\n private _participantSubscribers: Map<string, ParticipantSubscriber>;\n private _recordingSubscriber: RecordingSubscriber;\n private _transcriptionSubscriber: TranscriptionSubscriber;\n /* @conditional-compile-remove(local-recording-notification) */\n private _localRecordingSubscriber: LocalRecordingSubscriber;\n /* @conditional-compile-remove(ppt-live) */\n private _pptLiveSubscriber: PPTLiveSubscriber;\n private _optimalVideoCountSubscriber: OptimalVideoCountSubscriber;\n /* @conditional-compile-remove(close-captions) */\n private _TeamsCaptionsSubscriber?: TeamsCaptionsSubscriber;\n /* @conditional-compile-remove(acs-close-captions) */\n private _CaptionsSubscriber?: CaptionsSubscriber;\n private _raiseHandSubscriber?: RaiseHandSubscriber;\n /* @conditional-compile-remove(reaction) */\n private _reactionSubscriber?: ReactionSubscriber;\n /* @conditional-compile-remove(video-background-effects) */\n private _localVideoStreamVideoEffectsSubscribers: Map<string, LocalVideoStreamVideoEffectsSubscriber>;\n /* @conditional-compile-remove(capabilities) */\n private _capabilitiesSubscriber: CapabilitiesSubscriber;\n /* @conditional-compile-remove(spotlight) */\n private _spotlightSubscriber: SpotlightSubscriber;\n\n constructor(call: CallCommon, context: CallContext, internalContext: InternalCallContext) {\n this._call = call;\n this._callIdRef = { callId: call.id };\n this._context = context;\n this._internalContext = internalContext;\n\n this._diagnosticsSubscriber = new UserFacingDiagnosticsSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.UserFacingDiagnostics)\n );\n this._participantSubscribers = new Map<string, ParticipantSubscriber>();\n this._recordingSubscriber = new RecordingSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Recording)\n );\n /* @conditional-compile-remove(local-recording-notification) */\n this._localRecordingSubscriber = new LocalRecordingSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.LocalRecording)\n );\n /* @conditional-compile-remove(ppt-live) */\n this._pptLiveSubscriber = new PPTLiveSubscriber(this._callIdRef, this._context, this._call);\n this._transcriptionSubscriber = new TranscriptionSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Transcription)\n );\n this._raiseHandSubscriber = new RaiseHandSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.RaiseHand)\n );\n /* @conditional-compile-remove(reaction) */\n this._reactionSubscriber = new ReactionSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Reaction)\n );\n this._optimalVideoCountSubscriber = new OptimalVideoCountSubscriber({\n callIdRef: this._callIdRef,\n context: this._context,\n localOptimalVideoCountFeature: this._call.feature(Features.OptimalVideoCount)\n });\n /* @conditional-compile-remove(video-background-effects) */\n this._localVideoStreamVideoEffectsSubscribers = new Map();\n\n /* @conditional-compile-remove(capabilities) */\n this._capabilitiesSubscriber = new CapabilitiesSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Capabilities)\n );\n\n /* @conditional-compile-remove(spotlight) */\n this._spotlightSubscriber = new SpotlightSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Spotlight)\n );\n\n this.subscribe();\n }\n\n private subscribe = (): void => {\n this._call.on('stateChanged', this.stateChanged);\n /* @conditional-compile-remove(close-captions) */\n this._call.on('stateChanged', this.initCaptionSubscriber);\n this._call.on('idChanged', this.idChanged);\n this._call.on('isScreenSharingOnChanged', this.isScreenSharingOnChanged);\n this._call.on('remoteParticipantsUpdated', this.remoteParticipantsUpdated);\n this._call.on('localVideoStreamsUpdated', this.localVideoStreamsUpdated);\n this._call.on('isMutedChanged', this.isMuteChanged);\n /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(capabilities) */\n this._call.on('roleChanged', this.callRoleChangedHandler);\n this._call.feature(Features.DominantSpeakers).on('dominantSpeakersChanged', this.dominantSpeakersChanged);\n /* @conditional-compile-remove(total-participant-count) */\n this._call.on('totalParticipantCountChanged', this.totalParticipantCountChangedHandler);\n\n for (const localVideoStream of this._call.localVideoStreams) {\n this._internalContext.setLocalRenderInfo(\n this._callIdRef.callId,\n localVideoStream.mediaStreamType,\n localVideoStream,\n 'NotRendered',\n undefined\n );\n }\n\n if (this._call.remoteParticipants.length > 0) {\n this._call.remoteParticipants.forEach((participant: RemoteParticipant) => {\n this.addParticipantListener(participant);\n });\n\n this._context.setCallRemoteParticipants(\n this._callIdRef.callId,\n this._call.remoteParticipants.map(convertSdkParticipantToDeclarativeParticipant),\n []\n );\n }\n };\n\n public unsubscribe = (): void => {\n this._call.off('stateChanged', this.stateChanged);\n /* @conditional-compile-remove(close-captions) */\n this._call.off('stateChanged', this.initCaptionSubscriber);\n this._call.off('idChanged', this.idChanged);\n this._call.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged);\n this._call.off('remoteParticipantsUpdated', this.remoteParticipantsUpdated);\n this._call.off('localVideoStreamsUpdated', this.localVideoStreamsUpdated);\n this._call.off('isMutedChanged', this.isMuteChanged);\n /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(capabilities) */\n this._call.off('roleChanged', this.callRoleChangedHandler);\n /* @conditional-compile-remove(total-participant-count) */\n this._call.off('totalParticipantCountChanged', this.totalParticipantCountChangedHandler);\n\n this._participantSubscribers.forEach((participantSubscriber: ParticipantSubscriber) => {\n participantSubscriber.unsubscribe();\n });\n this._participantSubscribers.clear();\n\n // If we are unsubscribing that means we no longer want to display any video for this call (callEnded or callAgent\n // disposed) and we should not be updating it any more. So if video is rendering we stop rendering.\n for (const localVideoStream of this._call.localVideoStreams) {\n const mediaStreamType = localVideoStream.mediaStreamType;\n disposeView(\n this._context,\n this._internalContext,\n this._callIdRef.callId,\n undefined,\n convertSdkLocalStreamToDeclarativeLocalStream(localVideoStream)\n );\n this._internalContext.deleteLocalRenderInfo(this._callIdRef.callId, mediaStreamType);\n }\n\n this._diagnosticsSubscriber.unsubscribe();\n this._recordingSubscriber.unsubscribe();\n this._transcriptionSubscriber.unsubscribe();\n /* @conditional-compile-remove(local-recording-notification) */\n this._localRecordingSubscriber.unsubscribe();\n this._optimalVideoCountSubscriber.unsubscribe();\n /* @conditional-compile-remove(ppt-live) */\n this._pptLiveSubscriber.unsubscribe();\n /* @conditional-compile-remove(close-captions) */\n this._TeamsCaptionsSubscriber?.unsubscribe();\n /* @conditional-compile-remove(acs-close-captions) */\n this._CaptionsSubscriber?.unsubscribe();\n this._raiseHandSubscriber?.unsubscribe();\n /* @conditional-compile-remove(capabilities) */\n this._capabilitiesSubscriber.unsubscribe();\n /* @conditional-compile-remove(reaction) */\n this._reactionSubscriber?.unsubscribe();\n /* @conditional-compile-remove(spotlight) */\n this._spotlightSubscriber.unsubscribe();\n };\n\n private addParticipantListener(participant: RemoteParticipant): void {\n const participantKey = toFlatCommunicationIdentifier(participant.identifier);\n this._participantSubscribers.get(participantKey)?.unsubscribe();\n this._participantSubscribers.set(\n participantKey,\n new ParticipantSubscriber(this._callIdRef, participant, this._context, this._internalContext)\n );\n }\n\n private removeParticipantListener(participant: RemoteParticipant): void {\n const participantKey = toFlatCommunicationIdentifier(participant.identifier);\n const participantSubscriber = this._participantSubscribers.get(participantKey);\n if (participantSubscriber) {\n participantSubscriber.unsubscribe();\n this._participantSubscribers.delete(participantKey);\n }\n }\n\n private stateChanged = (): void => {\n this._context.setCallState(this._callIdRef.callId, this._call.state);\n };\n\n /* @conditional-compile-remove(close-captions) */\n private initCaptionSubscriber = (): void => {\n // subscribe to captions here so that we don't call captions when call is not initialized\n if (\n this._call.state === 'Connected' &&\n !this._TeamsCaptionsSubscriber &&\n /* @conditional-compile-remove(acs-close-captions) */ !this._CaptionsSubscriber\n ) {\n if (this._call.feature(Features.Captions).captions.kind === 'TeamsCaptions') {\n this._TeamsCaptionsSubscriber = new TeamsCaptionsSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Captions).captions as TeamsCaptions\n );\n } else {\n /* @conditional-compile-remove(acs-close-captions) */\n this._CaptionsSubscriber = new CaptionsSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Captions).captions as Captions\n );\n }\n this._call.off('stateChanged', this.initCaptionSubscriber);\n }\n };\n\n private idChanged = (): void => {\n this._internalContext.setCallId(this._call.id, this._callIdRef.callId);\n this._context.setCallId(this._call.id, this._callIdRef.callId);\n this._callIdRef.callId = this._call.id;\n };\n\n private isScreenSharingOnChanged = (): void => {\n this._context.setCallIsScreenSharingOn(this._callIdRef.callId, this._call.isScreenSharingOn);\n };\n\n private isMuteChanged = (): void => {\n this._context.setCallIsMicrophoneMuted(this._callIdRef.callId, this._call.isMuted);\n };\n\n /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(capabilities) */\n private callRoleChangedHandler = (): void => {\n this._context.setRole(this._callIdRef.callId, this._call.role);\n };\n\n /* @conditional-compile-remove(total-participant-count) */\n private totalParticipantCountChangedHandler = (): void => {\n this._context.setTotalParticipantCount(this._callIdRef.callId, this._call.totalParticipantCount);\n };\n\n private remoteParticipantsUpdated = (event: { added: RemoteParticipant[]; removed: RemoteParticipant[] }): void => {\n event.added.forEach((participant: RemoteParticipant) => {\n this.addParticipantListener(participant);\n });\n event.removed.forEach((participant: RemoteParticipant) => {\n this.removeParticipantListener(participant);\n });\n\n // Remove any added participants from remoteParticipantsEnded if they are there and add any removed participants to\n // remoteParticipantsEnded.\n this._context.setCallRemoteParticipantsEnded(\n this._callIdRef.callId,\n event.removed.map(convertSdkParticipantToDeclarativeParticipant),\n event.added.map((participant: RemoteParticipant) => {\n return toFlatCommunicationIdentifier(participant.identifier);\n })\n );\n\n // Add added participants to remoteParticipants and remove removed participants from remoteParticipants.\n this._context.setCallRemoteParticipants(\n this._callIdRef.callId,\n event.added.map(convertSdkParticipantToDeclarativeParticipant),\n event.removed.map((participant: RemoteParticipant) => {\n return toFlatCommunicationIdentifier(participant.identifier);\n })\n );\n };\n\n private localVideoStreamsUpdated = (event: { added: LocalVideoStream[]; removed: LocalVideoStream[] }): void => {\n for (const localVideoStream of event.added) {\n const mediaStreamType = localVideoStream.mediaStreamType;\n // IMPORTANT: The internalContext should be set before context. This is done to ensure that the internal context\n // has the required data when component re-renders due to external state changes.\n this._internalContext.setLocalRenderInfo(\n this._callIdRef.callId,\n mediaStreamType,\n localVideoStream,\n 'NotRendered',\n undefined\n );\n\n // Subscribe to video effect changes\n this._localVideoStreamVideoEffectsSubscribers.get(mediaStreamType)?.unsubscribe();\n this._localVideoStreamVideoEffectsSubscribers.set(\n mediaStreamType,\n new LocalVideoStreamVideoEffectsSubscriber({\n parent: this._callIdRef,\n context: this._context,\n localVideoStream: localVideoStream,\n localVideoStreamEffectsAPI: localVideoStream.feature(Features.VideoEffects)\n })\n );\n }\n for (const localVideoStream of event.removed) {\n const mediaStreamType = localVideoStream.mediaStreamType;\n this._localVideoStreamVideoEffectsSubscribers.get(mediaStreamType)?.unsubscribe();\n disposeView(\n this._context,\n this._internalContext,\n this._callIdRef.callId,\n undefined,\n convertSdkLocalStreamToDeclarativeLocalStream(localVideoStream)\n );\n\n this._internalContext.deleteLocalRenderInfo(this._callIdRef.callId, mediaStreamType);\n }\n\n this._context.setCallLocalVideoStream(\n this._callIdRef.callId,\n event.added.map(convertSdkLocalStreamToDeclarativeLocalStream),\n event.removed.map(convertSdkLocalStreamToDeclarativeLocalStream)\n );\n };\n\n private dominantSpeakersChanged = (): void => {\n const dominantSpeakers = this._call.feature(Features.DominantSpeakers).dominantSpeakers;\n this._context.setCallDominantSpeakers(this._callIdRef.callId, dominantSpeakers);\n };\n}\n"]}
1
+ {"version":3,"file":"CallSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/CallSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,QAAQ,EAAuC,MAAM,8BAA8B,CAAC;AAK7F,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAIxE,iDAAiD;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EACL,6CAA6C,EAC7C,6CAA6C,EAC9C,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,2CAA2C;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,+CAA+C;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,2CAA2C;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,4CAA4C;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;A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E,CAAC;YACpC,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CAmJF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Features, LocalVideoStream, RemoteParticipant } from '@azure/communication-calling';\n/* @conditional-compile-remove(acs-close-captions) */\nimport { Captions } from '@azure/communication-calling';\n/* @conditional-compile-remove(close-captions) */\nimport { TeamsCaptions } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallCommon } from './BetaToStableTypes';\nimport { CallContext } from './CallContext';\nimport { CallIdRef } from './CallIdRef';\n/* @conditional-compile-remove(close-captions) */\nimport { TeamsCaptionsSubscriber } from './CaptionsSubscriber';\nimport {\n convertSdkLocalStreamToDeclarativeLocalStream,\n convertSdkParticipantToDeclarativeParticipant\n} from './Converter';\nimport { InternalCallContext } from './InternalCallContext';\n\nimport { LocalVideoStreamVideoEffectsSubscriber } from './LocalVideoStreamVideoEffectsSubscriber';\nimport { ParticipantSubscriber } from './ParticipantSubscriber';\nimport { RecordingSubscriber } from './RecordingSubscriber';\n/* @conditional-compile-remove(ppt-live) */\nimport { PPTLiveSubscriber } from './PPTLiveSubscriber';\nimport { disposeView } from './StreamUtils';\nimport { TranscriptionSubscriber } from './TranscriptionSubscriber';\nimport { UserFacingDiagnosticsSubscriber } from './UserFacingDiagnosticsSubscriber';\nimport { RaiseHandSubscriber } from './RaiseHandSubscriber';\nimport { OptimalVideoCountSubscriber } from './OptimalVideoCountSubscriber';\n/* @conditional-compile-remove(capabilities) */\nimport { CapabilitiesSubscriber } from './CapabilitiesSubscriber';\n/* @conditional-compile-remove(reaction) */\nimport { ReactionSubscriber } from './ReactionSubscriber';\n/* @conditional-compile-remove(spotlight) */\nimport { SpotlightSubscriber } from './SpotlightSubscriber';\n/* @conditional-compile-remove(acs-close-captions) */\nimport { CaptionsSubscriber } from './CaptionsSubscriber';\n/* @conditional-compile-remove(local-recording-notification) */\nimport { LocalRecordingSubscriber } from './LocalRecordingSubscriber';\n\n/**\n * Keeps track of the listeners assigned to a particular call because when we get an event from SDK, it doesn't tell us\n * which call it is for. If we keep track of this then we know which call in the state that needs an update and also\n * which property of that call. Also we can use this when unregistering to a call.\n */\nexport class CallSubscriber {\n private _call: CallCommon;\n private _callIdRef: CallIdRef;\n private _context: CallContext;\n private _internalContext: InternalCallContext;\n\n private _diagnosticsSubscriber: UserFacingDiagnosticsSubscriber;\n private _participantSubscribers: Map<string, ParticipantSubscriber>;\n private _recordingSubscriber: RecordingSubscriber;\n private _transcriptionSubscriber: TranscriptionSubscriber;\n /* @conditional-compile-remove(local-recording-notification) */\n private _localRecordingSubscriber?: LocalRecordingSubscriber;\n /* @conditional-compile-remove(ppt-live) */\n private _pptLiveSubscriber: PPTLiveSubscriber;\n private _optimalVideoCountSubscriber: OptimalVideoCountSubscriber;\n /* @conditional-compile-remove(close-captions) */\n private _TeamsCaptionsSubscriber?: TeamsCaptionsSubscriber;\n /* @conditional-compile-remove(acs-close-captions) */\n private _CaptionsSubscriber?: CaptionsSubscriber;\n private _raiseHandSubscriber?: RaiseHandSubscriber;\n /* @conditional-compile-remove(reaction) */\n private _reactionSubscriber?: ReactionSubscriber;\n\n private _localVideoStreamVideoEffectsSubscribers: Map<string, LocalVideoStreamVideoEffectsSubscriber>;\n /* @conditional-compile-remove(capabilities) */\n private _capabilitiesSubscriber: CapabilitiesSubscriber;\n /* @conditional-compile-remove(spotlight) */\n private _spotlightSubscriber: SpotlightSubscriber;\n\n constructor(call: CallCommon, context: CallContext, internalContext: InternalCallContext) {\n this._call = call;\n this._callIdRef = { callId: call.id };\n this._context = context;\n this._internalContext = internalContext;\n\n this._diagnosticsSubscriber = new UserFacingDiagnosticsSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.UserFacingDiagnostics)\n );\n this._participantSubscribers = new Map<string, ParticipantSubscriber>();\n this._recordingSubscriber = new RecordingSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Recording)\n );\n /* @conditional-compile-remove(ppt-live) */\n this._pptLiveSubscriber = new PPTLiveSubscriber(this._callIdRef, this._context, this._call);\n this._transcriptionSubscriber = new TranscriptionSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Transcription)\n );\n this._raiseHandSubscriber = new RaiseHandSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.RaiseHand)\n );\n /* @conditional-compile-remove(reaction) */\n this._reactionSubscriber = new ReactionSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Reaction)\n );\n this._optimalVideoCountSubscriber = new OptimalVideoCountSubscriber({\n callIdRef: this._callIdRef,\n context: this._context,\n localOptimalVideoCountFeature: this._call.feature(Features.OptimalVideoCount)\n });\n\n this._localVideoStreamVideoEffectsSubscribers = new Map();\n\n /* @conditional-compile-remove(capabilities) */\n this._capabilitiesSubscriber = new CapabilitiesSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Capabilities)\n );\n\n /* @conditional-compile-remove(spotlight) */\n this._spotlightSubscriber = new SpotlightSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Spotlight)\n );\n\n this.subscribe();\n }\n\n private subscribe = (): void => {\n this._call.on('stateChanged', this.stateChanged);\n /* @conditional-compile-remove(close-captions) */\n this._call.on('stateChanged', this.initCaptionSubscriber);\n /* @conditional-compile-remove(local-recording-notification) */\n this._call.on('stateChanged', this.initLocalRecordingNotificationSubscriber);\n this._call.on('idChanged', this.idChanged);\n this._call.on('isScreenSharingOnChanged', this.isScreenSharingOnChanged);\n this._call.on('remoteParticipantsUpdated', this.remoteParticipantsUpdated);\n this._call.on('localVideoStreamsUpdated', this.localVideoStreamsUpdated);\n this._call.on('isMutedChanged', this.isMuteChanged);\n this._call.on('roleChanged', this.callRoleChangedHandler);\n this._call.feature(Features.DominantSpeakers).on('dominantSpeakersChanged', this.dominantSpeakersChanged);\n /* @conditional-compile-remove(total-participant-count) */\n this._call.on('totalParticipantCountChanged', this.totalParticipantCountChangedHandler);\n\n for (const localVideoStream of this._call.localVideoStreams) {\n this._internalContext.setLocalRenderInfo(\n this._callIdRef.callId,\n localVideoStream.mediaStreamType,\n localVideoStream,\n 'NotRendered',\n undefined\n );\n }\n\n if (this._call.remoteParticipants.length > 0) {\n this._call.remoteParticipants.forEach((participant: RemoteParticipant) => {\n this.addParticipantListener(participant);\n });\n\n this._context.setCallRemoteParticipants(\n this._callIdRef.callId,\n this._call.remoteParticipants.map(convertSdkParticipantToDeclarativeParticipant),\n []\n );\n }\n };\n\n public unsubscribe = (): void => {\n this._call.off('stateChanged', this.stateChanged);\n /* @conditional-compile-remove(close-captions) */\n this._call.off('stateChanged', this.initCaptionSubscriber);\n /* @conditional-compile-remove(local-recording-notification) */\n this._call.off('stateChanged', this.initLocalRecordingNotificationSubscriber);\n this._call.off('idChanged', this.idChanged);\n this._call.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged);\n this._call.off('remoteParticipantsUpdated', this.remoteParticipantsUpdated);\n this._call.off('localVideoStreamsUpdated', this.localVideoStreamsUpdated);\n this._call.off('isMutedChanged', this.isMuteChanged);\n this._call.off('roleChanged', this.callRoleChangedHandler);\n /* @conditional-compile-remove(total-participant-count) */\n this._call.off('totalParticipantCountChanged', this.totalParticipantCountChangedHandler);\n\n this._participantSubscribers.forEach((participantSubscriber: ParticipantSubscriber) => {\n participantSubscriber.unsubscribe();\n });\n this._participantSubscribers.clear();\n\n // If we are unsubscribing that means we no longer want to display any video for this call (callEnded or callAgent\n // disposed) and we should not be updating it any more. So if video is rendering we stop rendering.\n for (const localVideoStream of this._call.localVideoStreams) {\n const mediaStreamType = localVideoStream.mediaStreamType;\n disposeView(\n this._context,\n this._internalContext,\n this._callIdRef.callId,\n undefined,\n convertSdkLocalStreamToDeclarativeLocalStream(localVideoStream)\n );\n this._internalContext.deleteLocalRenderInfo(this._callIdRef.callId, mediaStreamType);\n }\n\n this._diagnosticsSubscriber.unsubscribe();\n this._recordingSubscriber.unsubscribe();\n this._transcriptionSubscriber.unsubscribe();\n /* @conditional-compile-remove(local-recording-notification) */\n this._localRecordingSubscriber?.unsubscribe();\n this._optimalVideoCountSubscriber.unsubscribe();\n /* @conditional-compile-remove(ppt-live) */\n this._pptLiveSubscriber.unsubscribe();\n /* @conditional-compile-remove(close-captions) */\n this._TeamsCaptionsSubscriber?.unsubscribe();\n /* @conditional-compile-remove(acs-close-captions) */\n this._CaptionsSubscriber?.unsubscribe();\n this._raiseHandSubscriber?.unsubscribe();\n /* @conditional-compile-remove(capabilities) */\n this._capabilitiesSubscriber.unsubscribe();\n /* @conditional-compile-remove(reaction) */\n this._reactionSubscriber?.unsubscribe();\n /* @conditional-compile-remove(spotlight) */\n this._spotlightSubscriber.unsubscribe();\n };\n\n private addParticipantListener(participant: RemoteParticipant): void {\n const participantKey = toFlatCommunicationIdentifier(participant.identifier);\n this._participantSubscribers.get(participantKey)?.unsubscribe();\n this._participantSubscribers.set(\n participantKey,\n new ParticipantSubscriber(this._callIdRef, participant, this._context, this._internalContext)\n );\n }\n\n private removeParticipantListener(participant: RemoteParticipant): void {\n const participantKey = toFlatCommunicationIdentifier(participant.identifier);\n const participantSubscriber = this._participantSubscribers.get(participantKey);\n if (participantSubscriber) {\n participantSubscriber.unsubscribe();\n this._participantSubscribers.delete(participantKey);\n }\n }\n\n private stateChanged = (): void => {\n this._context.setCallState(this._callIdRef.callId, this._call.state);\n };\n\n /* @conditional-compile-remove(close-captions) */\n private initCaptionSubscriber = (): void => {\n // subscribe to captions here so that we don't call captions when call is not initialized\n if (\n this._call.state === 'Connected' &&\n !this._TeamsCaptionsSubscriber &&\n /* @conditional-compile-remove(acs-close-captions) */ !this._CaptionsSubscriber\n ) {\n if (this._call.feature(Features.Captions).captions.kind === 'TeamsCaptions') {\n this._TeamsCaptionsSubscriber = new TeamsCaptionsSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Captions).captions as TeamsCaptions\n );\n } else {\n /* @conditional-compile-remove(acs-close-captions) */\n this._CaptionsSubscriber = new CaptionsSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Captions).captions as Captions\n );\n }\n this._call.off('stateChanged', this.initCaptionSubscriber);\n }\n };\n\n /* @conditional-compile-remove(local-recording-notification) */\n private initLocalRecordingNotificationSubscriber = (): void => {\n // Subscribe to LocalRecordingFeature as it is only available in interop scenarios\n // Will throw an error if not in interop scenarios\n if (this._call.state === 'Connected' && this._call.kind === 'TeamsCall' && !this._localRecordingSubscriber) {\n this._localRecordingSubscriber = new LocalRecordingSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.LocalRecording)\n );\n this._call.off('stateChanged', this.initLocalRecordingNotificationSubscriber);\n }\n };\n\n private idChanged = (): void => {\n this._internalContext.setCallId(this._call.id, this._callIdRef.callId);\n this._context.setCallId(this._call.id, this._callIdRef.callId);\n this._callIdRef.callId = this._call.id;\n };\n\n private isScreenSharingOnChanged = (): void => {\n this._context.setCallIsScreenSharingOn(this._callIdRef.callId, this._call.isScreenSharingOn);\n };\n\n private isMuteChanged = (): void => {\n this._context.setCallIsMicrophoneMuted(this._callIdRef.callId, this._call.isMuted);\n };\n\n private callRoleChangedHandler = (): void => {\n this._context.setRole(this._callIdRef.callId, this._call.role);\n };\n\n /* @conditional-compile-remove(total-participant-count) */\n private totalParticipantCountChangedHandler = (): void => {\n this._context.setTotalParticipantCount(this._callIdRef.callId, this._call.totalParticipantCount);\n };\n\n private remoteParticipantsUpdated = (event: { added: RemoteParticipant[]; removed: RemoteParticipant[] }): void => {\n event.added.forEach((participant: RemoteParticipant) => {\n this.addParticipantListener(participant);\n });\n event.removed.forEach((participant: RemoteParticipant) => {\n this.removeParticipantListener(participant);\n });\n\n // Remove any added participants from remoteParticipantsEnded if they are there and add any removed participants to\n // remoteParticipantsEnded.\n this._context.setCallRemoteParticipantsEnded(\n this._callIdRef.callId,\n event.removed.map(convertSdkParticipantToDeclarativeParticipant),\n event.added.map((participant: RemoteParticipant) => {\n return toFlatCommunicationIdentifier(participant.identifier);\n })\n );\n\n // Add added participants to remoteParticipants and remove removed participants from remoteParticipants.\n this._context.setCallRemoteParticipants(\n this._callIdRef.callId,\n event.added.map(convertSdkParticipantToDeclarativeParticipant),\n event.removed.map((participant: RemoteParticipant) => {\n return toFlatCommunicationIdentifier(participant.identifier);\n })\n );\n };\n\n private localVideoStreamsUpdated = (event: { added: LocalVideoStream[]; removed: LocalVideoStream[] }): void => {\n for (const localVideoStream of event.added) {\n const mediaStreamType = localVideoStream.mediaStreamType;\n // IMPORTANT: The internalContext should be set before context. This is done to ensure that the internal context\n // has the required data when component re-renders due to external state changes.\n this._internalContext.setLocalRenderInfo(\n this._callIdRef.callId,\n mediaStreamType,\n localVideoStream,\n 'NotRendered',\n undefined\n );\n\n // Subscribe to video effect changes\n this._localVideoStreamVideoEffectsSubscribers.get(mediaStreamType)?.unsubscribe();\n this._localVideoStreamVideoEffectsSubscribers.set(\n mediaStreamType,\n new LocalVideoStreamVideoEffectsSubscriber({\n parent: this._callIdRef,\n context: this._context,\n localVideoStream: localVideoStream,\n localVideoStreamEffectsAPI: localVideoStream.feature(Features.VideoEffects)\n })\n );\n }\n for (const localVideoStream of event.removed) {\n const mediaStreamType = localVideoStream.mediaStreamType;\n this._localVideoStreamVideoEffectsSubscribers.get(mediaStreamType)?.unsubscribe();\n disposeView(\n this._context,\n this._internalContext,\n this._callIdRef.callId,\n undefined,\n convertSdkLocalStreamToDeclarativeLocalStream(localVideoStream)\n );\n\n this._internalContext.deleteLocalRenderInfo(this._callIdRef.callId, mediaStreamType);\n }\n\n this._context.setCallLocalVideoStream(\n this._callIdRef.callId,\n event.added.map(convertSdkLocalStreamToDeclarativeLocalStream),\n event.removed.map(convertSdkLocalStreamToDeclarativeLocalStream)\n );\n };\n\n private dominantSpeakersChanged = (): void => {\n const dominantSpeakers = this._call.feature(Features.DominantSpeakers).dominantSpeakers;\n this._context.setCallDominantSpeakers(this._callIdRef.callId, dominantSpeakers);\n };\n}\n"]}
@@ -3,19 +3,16 @@
3
3
  import { toFlatCommunicationIdentifier } from "../../acs-ui-common/src";
4
4
  /* @conditional-compile-remove(teams-identity-support) */
5
5
  import { _isACSCall } from './TypeGuards';
6
- /* @conditional-compile-remove(video-background-effects) */
7
6
  import { Features } from '@azure/communication-calling';
8
7
  /**
9
8
  * @private
10
9
  */
11
10
  export function convertSdkLocalStreamToDeclarativeLocalStream(stream) {
12
- /* @conditional-compile-remove(video-background-effects) */
13
11
  const localVideoStreamEffectsAPI = stream.feature(Features.VideoEffects);
14
12
  return {
15
13
  source: stream.source,
16
14
  mediaStreamType: stream.mediaStreamType,
17
15
  view: undefined,
18
- /* @conditional-compile-remove(video-background-effects) */
19
16
  videoEffects: convertFromSDKToDeclarativeVideoStreamVideoEffects(localVideoStreamEffectsAPI.activeEffects)
20
17
  };
21
18
  }
@@ -100,7 +97,6 @@ export function convertSdkCallToDeclarativeCall(call) {
100
97
  screenShareRemoteParticipant: undefined,
101
98
  startTime: new Date(),
102
99
  endTime: undefined,
103
- /* @conditional-compile-remove(rooms) */
104
100
  role: call.role,
105
101
  /* @conditional-compile-remove(close-captions) */
106
102
  captionsFeature: {
@@ -159,7 +155,6 @@ export function convertFromTeamsSDKToCaptionInfoState(caption) {
159
155
  export function convertFromSDKToCaptionInfoState(caption) {
160
156
  return Object.assign({ captionText: caption.spokenText }, caption);
161
157
  }
162
- /* @conditional-compile-remove(video-background-effects) */
163
158
  /** @private */
164
159
  export function convertFromSDKToDeclarativeVideoStreamVideoEffects(videoEffects) {
165
160
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"Converter.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/Converter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAclC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAYxE,yDAAyD;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,2DAA2D;AAC3D,OAAO,EAAE,Q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ACV;AACJ,CAAC;AAED,qDAAqD;AACrD;;GAEG;AACH,MAAM,UAAU,gCAAgC,CAAC,OAAwB;IACvE,uBACE,WAAW,EAAE,OAAO,CAAC,UAAU,IAC5B,OAAO,EACV;AACJ,CAAC;AAED,2DAA2D;AAC3D,eAAe;AACf,MAAM,UAAU,kDAAkD,CAChE,YAA+B;IAE/B,OAAO;QACL,aAAa,EAAE,YAAY;KAC5B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,+BAA+B,CAAC,UAAsB;IACpE,OAAO;QACL,uBAAuB,EAAE,UAAU,CAAC,KAAK;KAC1C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n RemoteParticipant as SdkRemoteParticipant,\n RemoteVideoStream as SdkRemoteVideoStream,\n LocalVideoStream as SdkLocalVideoStream,\n VideoStreamRendererView\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(close-captions) */\nimport { TeamsCaptionsInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(acs-close-captions) */\nimport { CaptionsInfo as AcsCaptionsInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { CallKind } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallState,\n RemoteParticipantState as DeclarativeRemoteParticipant,\n RemoteVideoStreamState as DeclarativeRemoteVideoStream,\n LocalVideoStreamState as DeclarativeLocalVideoStream,\n IncomingCallState as DeclarativeIncomingCall,\n VideoStreamRendererViewState as DeclarativeVideoStreamRendererView\n} from './CallClientState';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionsInfo } from './CallClientState';\n\n/* @conditional-compile-remove(teams-identity-support) */\nimport { _isACSCall } from './TypeGuards';\nimport { CallCommon, IncomingCallCommon } from './BetaToStableTypes';\n\n/* @conditional-compile-remove(video-background-effects) */\nimport { Features } from '@azure/communication-calling';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoEffectName } from '@azure/communication-calling';\n/* @conditional-compile-remove(video-background-effects) */\nimport { LocalVideoStreamVideoEffectsState } from './CallClientState';\nimport { RaisedHand } from '@azure/communication-calling';\nimport { RaisedHandState } from './CallClientState';\n\n/**\n * @private\n */\nexport function convertSdkLocalStreamToDeclarativeLocalStream(\n stream: SdkLocalVideoStream\n): DeclarativeLocalVideoStream {\n /* @conditional-compile-remove(video-background-effects) */\n const localVideoStreamEffectsAPI = stream.feature(Features.VideoEffects);\n\n return {\n source: stream.source,\n mediaStreamType: stream.mediaStreamType,\n view: undefined,\n /* @conditional-compile-remove(video-background-effects) */\n videoEffects: convertFromSDKToDeclarativeVideoStreamVideoEffects(localVideoStreamEffectsAPI.activeEffects)\n };\n}\n\n/**\n * @private\n */\nexport function convertSdkRemoteStreamToDeclarativeRemoteStream(\n stream: SdkRemoteVideoStream\n): DeclarativeRemoteVideoStream {\n return {\n id: stream.id,\n mediaStreamType: stream.mediaStreamType,\n isAvailable: stream.isAvailable,\n /* @conditional-compile-remove(video-stream-is-receiving-flag) */\n isReceiving: stream.isReceiving,\n view: undefined,\n streamSize: stream.size\n };\n}\n\n/**\n * @private\n */\nexport function convertSdkParticipantToDeclarativeParticipant(\n participant: SdkRemoteParticipant\n): DeclarativeRemoteParticipant {\n const declarativeVideoStreams: { [key: number]: DeclarativeRemoteVideoStream } = {};\n for (const videoStream of participant.videoStreams) {\n declarativeVideoStreams[videoStream.id] = convertSdkRemoteStreamToDeclarativeRemoteStream(videoStream);\n }\n return {\n identifier: participant.identifier,\n displayName: participant.displayName,\n state: participant.state,\n callEndReason: participant.callEndReason,\n videoStreams: declarativeVideoStreams,\n isMuted: participant.isMuted,\n isSpeaking: participant.isSpeaking,\n raisedHand: undefined,\n /* @conditional-compile-remove(hide-attendee-name) */\n role: participant.role,\n /* @conditional-compile-remove(spotlight) */\n spotlight: undefined\n };\n}\n\n/**\n * @private\n *\n * Note at the time of writing only one LocalVideoStream is supported by the SDK.\n */\nexport function convertSdkCallToDeclarativeCall(call: CallCommon): CallState {\n const declarativeRemoteParticipants: { [key: string]: DeclarativeRemoteParticipant } = {};\n call.remoteParticipants.forEach((participant: SdkRemoteParticipant) => {\n declarativeRemoteParticipants[toFlatCommunicationIdentifier(participant.identifier)] =\n convertSdkParticipantToDeclarativeParticipant(participant);\n });\n return {\n id: call.id,\n /* @conditional-compile-remove(teams-identity-support) */\n kind: _isACSCall(call) ? ('Call' as CallKind) : ('TeamsCall' as CallKind),\n callerInfo: call.callerInfo,\n state: call.state,\n callEndReason: call.callEndReason,\n diagnostics: {\n network: {\n latest: {}\n },\n media: {\n latest: {}\n }\n },\n direction: call.direction,\n isMuted: call.isMuted,\n isScreenSharingOn: call.isScreenSharingOn,\n localVideoStreams: call.localVideoStreams.map(convertSdkLocalStreamToDeclarativeLocalStream),\n remoteParticipants: declarativeRemoteParticipants,\n remoteParticipantsEnded: {},\n recording: { isRecordingActive: false },\n /* @conditional-compile-remove(local-recording-notification) */\n localRecording: { isLocalRecordingActive: false },\n /* @conditional-compile-remove(ppt-live) */\n pptLive: { isActive: false },\n raiseHand: { raisedHands: [] },\n /* @conditional-compile-remove(reaction) */\n localParticipantReaction: undefined,\n transcription: { isTranscriptionActive: false },\n screenShareRemoteParticipant: undefined,\n startTime: new Date(),\n endTime: undefined,\n /* @conditional-compile-remove(rooms) */\n role: call.role,\n /* @conditional-compile-remove(close-captions) */\n captionsFeature: {\n captions: [],\n supportedSpokenLanguages: [],\n supportedCaptionLanguages: [],\n currentCaptionLanguage: '',\n currentSpokenLanguage: '',\n isCaptionsFeatureActive: false,\n startCaptionsInProgress: false\n },\n /* @conditional-compile-remove(call-transfer) */\n transfer: {\n acceptedTransfers: {}\n },\n optimalVideoCount: {\n maxRemoteVideoStreams: call.feature(Features.OptimalVideoCount).optimalVideoCount\n },\n /* @conditional-compile-remove(hide-attendee-name) */\n // TODO: Replace this once the SDK supports hide attendee name\n hideAttendeeNames: false\n };\n}\n\n/**\n * @private\n */\nexport function convertSdkIncomingCallToDeclarativeIncomingCall(call: IncomingCallCommon): DeclarativeIncomingCall {\n return {\n id: call.id,\n callerInfo: call.callerInfo,\n startTime: new Date(),\n endTime: undefined\n };\n}\n\n/**\n * @private\n */\nexport function convertFromSDKToDeclarativeVideoStreamRendererView(\n view: VideoStreamRendererView\n): DeclarativeVideoStreamRendererView {\n return {\n scalingMode: view.scalingMode,\n isMirrored: view.isMirrored,\n target: view.target\n };\n}\n\n/* @conditional-compile-remove(close-captions) */\n/**\n * @private\n */\nexport function convertFromTeamsSDKToCaptionInfoState(caption: TeamsCaptionsInfo): CaptionsInfo {\n return {\n ...caption\n };\n}\n\n/* @conditional-compile-remove(acs-close-captions) */\n/**\n * @private\n */\nexport function convertFromSDKToCaptionInfoState(caption: AcsCaptionsInfo): CaptionsInfo {\n return {\n captionText: caption.spokenText,\n ...caption\n };\n}\n\n/* @conditional-compile-remove(video-background-effects) */\n/** @private */\nexport function convertFromSDKToDeclarativeVideoStreamVideoEffects(\n videoEffects: VideoEffectName[]\n): LocalVideoStreamVideoEffectsState {\n return {\n activeEffects: videoEffects\n };\n}\n\n/**\n * @private\n */\nexport function convertFromSDKToRaisedHandState(raisedHand: RaisedHand): RaisedHandState {\n return {\n raisedHandOrderPosition: raisedHand.order\n };\n}\n"]}
1
+ {"version":3,"file":"Converter.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/Converter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAclC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAYxE,yDAAyD;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAQxD;;GAEG;AACH,MAAM,UAAU,6CAA6C,CAC3D,MAA2B;IAE3B,MAAM,0BAA0B,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEzE,OAAO;QACL,MAAM,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KAC5B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,+BAA+B,CAAC,UAAsB;IACpE,OAAO;QACL,uBAAuB,EAAE,UAAU,CAAC,KAAK;KAC1C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n RemoteParticipant as SdkRemoteParticipant,\n RemoteVideoStream as SdkRemoteVideoStream,\n LocalVideoStream as SdkLocalVideoStream,\n VideoStreamRendererView\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(close-captions) */\nimport { TeamsCaptionsInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(acs-close-captions) */\nimport { CaptionsInfo as AcsCaptionsInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { CallKind } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallState,\n RemoteParticipantState as DeclarativeRemoteParticipant,\n RemoteVideoStreamState as DeclarativeRemoteVideoStream,\n LocalVideoStreamState as DeclarativeLocalVideoStream,\n IncomingCallState as DeclarativeIncomingCall,\n VideoStreamRendererViewState as DeclarativeVideoStreamRendererView\n} from './CallClientState';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionsInfo } from './CallClientState';\n\n/* @conditional-compile-remove(teams-identity-support) */\nimport { _isACSCall } from './TypeGuards';\nimport { CallCommon, IncomingCallCommon } from './BetaToStableTypes';\n\nimport { Features } from '@azure/communication-calling';\n\nimport { VideoEffectName } from '@azure/communication-calling';\n\nimport { LocalVideoStreamVideoEffectsState } from './CallClientState';\nimport { RaisedHand } from '@azure/communication-calling';\nimport { RaisedHandState } from './CallClientState';\n\n/**\n * @private\n */\nexport function convertSdkLocalStreamToDeclarativeLocalStream(\n stream: SdkLocalVideoStream\n): DeclarativeLocalVideoStream {\n const localVideoStreamEffectsAPI = stream.feature(Features.VideoEffects);\n\n return {\n source: stream.source,\n mediaStreamType: stream.mediaStreamType,\n view: undefined,\n\n videoEffects: convertFromSDKToDeclarativeVideoStreamVideoEffects(localVideoStreamEffectsAPI.activeEffects)\n };\n}\n\n/**\n * @private\n */\nexport function convertSdkRemoteStreamToDeclarativeRemoteStream(\n stream: SdkRemoteVideoStream\n): DeclarativeRemoteVideoStream {\n return {\n id: stream.id,\n mediaStreamType: stream.mediaStreamType,\n isAvailable: stream.isAvailable,\n /* @conditional-compile-remove(video-stream-is-receiving-flag) */\n isReceiving: stream.isReceiving,\n view: undefined,\n streamSize: stream.size\n };\n}\n\n/**\n * @private\n */\nexport function convertSdkParticipantToDeclarativeParticipant(\n participant: SdkRemoteParticipant\n): DeclarativeRemoteParticipant {\n const declarativeVideoStreams: { [key: number]: DeclarativeRemoteVideoStream } = {};\n for (const videoStream of participant.videoStreams) {\n declarativeVideoStreams[videoStream.id] = convertSdkRemoteStreamToDeclarativeRemoteStream(videoStream);\n }\n return {\n identifier: participant.identifier,\n displayName: participant.displayName,\n state: participant.state,\n callEndReason: participant.callEndReason,\n videoStreams: declarativeVideoStreams,\n isMuted: participant.isMuted,\n isSpeaking: participant.isSpeaking,\n raisedHand: undefined,\n /* @conditional-compile-remove(hide-attendee-name) */\n role: participant.role,\n /* @conditional-compile-remove(spotlight) */\n spotlight: undefined\n };\n}\n\n/**\n * @private\n *\n * Note at the time of writing only one LocalVideoStream is supported by the SDK.\n */\nexport function convertSdkCallToDeclarativeCall(call: CallCommon): CallState {\n const declarativeRemoteParticipants: { [key: string]: DeclarativeRemoteParticipant } = {};\n call.remoteParticipants.forEach((participant: SdkRemoteParticipant) => {\n declarativeRemoteParticipants[toFlatCommunicationIdentifier(participant.identifier)] =\n convertSdkParticipantToDeclarativeParticipant(participant);\n });\n return {\n id: call.id,\n /* @conditional-compile-remove(teams-identity-support) */\n kind: _isACSCall(call) ? ('Call' as CallKind) : ('TeamsCall' as CallKind),\n callerInfo: call.callerInfo,\n state: call.state,\n callEndReason: call.callEndReason,\n diagnostics: {\n network: {\n latest: {}\n },\n media: {\n latest: {}\n }\n },\n direction: call.direction,\n isMuted: call.isMuted,\n isScreenSharingOn: call.isScreenSharingOn,\n localVideoStreams: call.localVideoStreams.map(convertSdkLocalStreamToDeclarativeLocalStream),\n remoteParticipants: declarativeRemoteParticipants,\n remoteParticipantsEnded: {},\n recording: { isRecordingActive: false },\n /* @conditional-compile-remove(local-recording-notification) */\n localRecording: { isLocalRecordingActive: false },\n /* @conditional-compile-remove(ppt-live) */\n pptLive: { isActive: false },\n raiseHand: { raisedHands: [] },\n /* @conditional-compile-remove(reaction) */\n localParticipantReaction: undefined,\n transcription: { isTranscriptionActive: false },\n screenShareRemoteParticipant: undefined,\n startTime: new Date(),\n endTime: undefined,\n role: call.role,\n /* @conditional-compile-remove(close-captions) */\n captionsFeature: {\n captions: [],\n supportedSpokenLanguages: [],\n supportedCaptionLanguages: [],\n currentCaptionLanguage: '',\n currentSpokenLanguage: '',\n isCaptionsFeatureActive: false,\n startCaptionsInProgress: false\n },\n /* @conditional-compile-remove(call-transfer) */\n transfer: {\n acceptedTransfers: {}\n },\n optimalVideoCount: {\n maxRemoteVideoStreams: call.feature(Features.OptimalVideoCount).optimalVideoCount\n },\n /* @conditional-compile-remove(hide-attendee-name) */\n // TODO: Replace this once the SDK supports hide attendee name\n hideAttendeeNames: false\n };\n}\n\n/**\n * @private\n */\nexport function convertSdkIncomingCallToDeclarativeIncomingCall(call: IncomingCallCommon): DeclarativeIncomingCall {\n return {\n id: call.id,\n callerInfo: call.callerInfo,\n startTime: new Date(),\n endTime: undefined\n };\n}\n\n/**\n * @private\n */\nexport function convertFromSDKToDeclarativeVideoStreamRendererView(\n view: VideoStreamRendererView\n): DeclarativeVideoStreamRendererView {\n return {\n scalingMode: view.scalingMode,\n isMirrored: view.isMirrored,\n target: view.target\n };\n}\n\n/* @conditional-compile-remove(close-captions) */\n/**\n * @private\n */\nexport function convertFromTeamsSDKToCaptionInfoState(caption: TeamsCaptionsInfo): CaptionsInfo {\n return {\n ...caption\n };\n}\n\n/* @conditional-compile-remove(acs-close-captions) */\n/**\n * @private\n */\nexport function convertFromSDKToCaptionInfoState(caption: AcsCaptionsInfo): CaptionsInfo {\n return {\n captionText: caption.spokenText,\n ...caption\n };\n}\n\n/** @private */\nexport function convertFromSDKToDeclarativeVideoStreamVideoEffects(\n videoEffects: VideoEffectName[]\n): LocalVideoStreamVideoEffectsState {\n return {\n activeEffects: videoEffects\n };\n}\n\n/**\n * @private\n */\nexport function convertFromSDKToRaisedHandState(raisedHand: RaisedHand): RaisedHandState {\n return {\n raisedHandOrderPosition: raisedHand.order\n };\n}\n"]}
@@ -159,7 +159,6 @@ export const deviceManagerDeclaratify = (deviceManager, context, internalContext
159
159
  configurable: false,
160
160
  value: (videoDeviceInfo) => proxyDeviceManager.selectCamera(videoDeviceInfo)
161
161
  });
162
- /* @conditional-compile-remove(video-background-effects) */
163
162
  Object.defineProperty(deviceManager, 'getUnparentedVideoStreams', {
164
163
  configurable: false,
165
164
  value: () => internalContext.getUnparentedRenderInfos()
@@ -1 +1 @@
1
- {"version":3,"file":"DeviceManagerDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/DeviceManagerDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAgClC;;;;;;GAMG;AACH,MAAM,kBAAkB;IAItB,YAAY,aAA4B,EAAE,OAAoB;QAQtD,qBAAgB,GAAG,GAAS,EAAE;YACpC,mHAAmH;YACnH,4GAA4G;YAC5G,mDAAmD;YACnD,IAAI,CAAC,QAAQ,CAAC,2CAA2C,CAAC,IAAI,CAAC,cAAc,CAAC,2BAA2B,CAAC,CAAC;YAC3G,IAAI,CAAC,QAAQ,CAAC,kCAAkC,CAAC,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;YACzF,IAAI,CAAC,QAAQ,CAAC,+BAA+B,CAAC,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;QACrF,CAAC,CAAC;QAEM,cAAS,GAAG,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ACxB,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC3B,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,aAA4B,EAC5B,OAAoB,EACpB,eAAoC,EACrB,EAAE;IACjB,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC1E,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,aAAa,EAAE;QAClD,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,WAAW,EAAE;KAC9C,CAAC,CAAC;IACH,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,cAAc,EAAE;QACnD,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,CAAC,eAAgC,EAAE,EAAE,CAAC,kBAAkB,CAAC,YAAY,CAAC,eAAe,CAAC;KAC9F,CAAC,CAAC;IACH,2DAA2D;IAC3D,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,2BAA2B,EAAE;QAChE,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,GAAuB,EAAE,CAAC,eAAe,CAAC,wBAAwB,EAAE;KAC5E,CAAC,CAAC;IACH,OAAO,IAAI,KAAK,CAAC,aAAa,EAAE,kBAAkB,CAA0B,CAAC;AAC/E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AudioDeviceInfo, DeviceAccess, DeviceManager, VideoDeviceInfo } from '@azure/communication-calling';\nimport { CallContext } from './CallContext';\nimport { InternalCallContext } from './InternalCallContext';\n/* @conditional-compile-remove(video-background-effects) */\nimport { LocalVideoStream } from '@azure/communication-calling';\n\n/**\n * Defines the additional methods added by the stateful on top of {@link @azure/communication-calling#DeviceManager}.\n *\n * @public\n */\nexport interface StatefulDeviceManager extends DeviceManager {\n /**\n * Sets the selectedCamera in the {@link DeviceManagerState}. This is completely developer driven and is not tied in\n * any way to {@link @azure/communication-calling#DeviceManager}. It is entirely contained in\n * {@link StatefulDeviceManager}. See also {@link DeviceManagerState.selectedCamera}.\n */\n selectCamera: (device: VideoDeviceInfo) => void;\n\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Gets the list of unparented video streams. This is a list of video streams that have not been added to a\n * {@link @azure/communication-calling#Call}. This is useful for developers who want to interact with rendered\n * video streams before they have started a call. See also {@link @azure/communication-react#CallClient.createView}.\n *\n * @public\n */\n getUnparentedVideoStreams: () => LocalVideoStream[];\n}\n\n/**\n * ProxyDeviceManager proxies DeviceManager and subscribes to all events that affect device manager state. State updates\n * are set on the provided context. Also any queries for state are proxied and stored in state as well. Only one device\n * manager should exist for a given CallClient so if CallClient.getDeviceManager is called multiple times, either a\n * cached ProxyDeviceManager should be returned or the existing ProxyDeviceManager should be destructed via destructor()\n * and a new ProxyDeviceManager created.\n */\nclass ProxyDeviceManager implements ProxyHandler<DeviceManager> {\n private _deviceManager: DeviceManager;\n private _context: CallContext;\n\n constructor(deviceManager: DeviceManager, context: CallContext) {\n this._deviceManager = deviceManager;\n this._context = context;\n\n this.setDeviceManager();\n this.subscribe();\n }\n\n private setDeviceManager = (): void => {\n // isSpeakerSelectionAvailable, selectedMicrophone, and selectedSpeaker are properties on DeviceManager. Since they\n // are not functions we can't proxy them so we'll update whenever we think they may need updating such as at\n // construction time or when certain events happen.\n this._context.setDeviceManagerIsSpeakerSelectionAvailable(this._deviceManager.isSpeakerSelectionAvailable);\n this._context.setDeviceManagerSelectedMicrophone(this._deviceManager.selectedMicrophone);\n this._context.setDeviceManagerSelectedSpeaker(this._deviceManager.selectedSpeaker);\n };\n\n private subscribe = (): void => {\n this._deviceManager.on('videoDevicesUpdated', this.videoDevicesUpdated);\n this._deviceManager.on('audioDevicesUpdated', this.audioDevicesUpdated);\n this._deviceManager.on('selectedMicrophoneChanged', this.selectedMicrophoneChanged);\n this._deviceManager.on('selectedSpeakerChanged', this.selectedSpeakerChanged);\n };\n\n /**\n * This is used to unsubscribe DeclarativeDeviceManager from the DeviceManager events.\n */\n public unsubscribe = (): void => {\n this._deviceManager.off('videoDevicesUpdated', this.videoDevicesUpdated);\n this._deviceManager.off('audioDevicesUpdated', this.audioDevicesUpdated);\n this._deviceManager.off('selectedMicrophoneChanged', this.selectedMicrophoneChanged);\n this._deviceManager.off('selectedSpeakerChanged', this.selectedSpeakerChanged);\n };\n\n /**\n * Used to set a camera inside the proxy device manager.\n *\n * @param videoDeviceInfo VideoDeviceInfo\n */\n public selectCamera = (videoDeviceInfo: VideoDeviceInfo): void => {\n this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);\n };\n\n private videoDevicesUpdated = async (): Promise<void> => {\n // Device Manager always has a camera with '' name if there are no real camera devices available.\n // We don't want to show that in the UI.\n const realCameras = (await this._deviceManager.getCameras()).filter((c) => !!c.name);\n this._context.setDeviceManagerCameras(dedupeById(realCameras));\n };\n\n private audioDevicesUpdated = async (): Promise<void> => {\n this._context.setDeviceManagerMicrophones(dedupeById(await this._deviceManager.getMicrophones()));\n this._context.setDeviceManagerSpeakers(dedupeById(await this._deviceManager.getSpeakers()));\n };\n\n private selectedMicrophoneChanged = (): void => {\n this._context.setDeviceManagerSelectedMicrophone(this._deviceManager.selectedMicrophone);\n };\n\n private selectedSpeakerChanged = (): void => {\n this._context.setDeviceManagerSelectedSpeaker(this._deviceManager.selectedSpeaker);\n };\n\n public get<P extends keyof DeviceManager>(target: DeviceManager, prop: P): any {\n switch (prop) {\n case 'getCameras': {\n return this._context.withAsyncErrorTeedToState((): Promise<VideoDeviceInfo[]> => {\n return target.getCameras().then((cameras: VideoDeviceInfo[]) => {\n // Device Manager always has a camera with '' name if there are no real camera devices available.\n // We don't want to show that in the UI.\n const realCameras = cameras.filter((c) => !!c.name);\n this._context.setDeviceManagerCameras(dedupeById(realCameras));\n return realCameras;\n });\n }, 'DeviceManager.getCameras');\n }\n case 'getMicrophones': {\n return this._context.withAsyncErrorTeedToState((): Promise<AudioDeviceInfo[]> => {\n return target.getMicrophones().then((microphones: AudioDeviceInfo[]) => {\n this._context.setDeviceManagerMicrophones(dedupeById(microphones));\n return microphones;\n });\n }, 'DeviceManager.getMicrophones');\n }\n case 'getSpeakers': {\n return this._context.withAsyncErrorTeedToState((): Promise<AudioDeviceInfo[]> => {\n return target.getSpeakers().then((speakers: AudioDeviceInfo[]) => {\n this._context.setDeviceManagerSpeakers(dedupeById(speakers));\n return speakers;\n });\n }, 'DeviceManager.getSpeakers');\n }\n case 'selectMicrophone': {\n return this._context.withAsyncErrorTeedToState(\n (...args: Parameters<DeviceManager['selectMicrophone']>): Promise<void> => {\n return target.selectMicrophone(...args).then(() => {\n this._context.setDeviceManagerSelectedMicrophone(target.selectedMicrophone);\n });\n },\n 'DeviceManager.selectMicrophone'\n );\n }\n case 'selectSpeaker': {\n return this._context.withAsyncErrorTeedToState(\n (...args: Parameters<DeviceManager['selectSpeaker']>): Promise<void> => {\n return target.selectSpeaker(...args).then(() => {\n this._context.setDeviceManagerSelectedSpeaker(target.selectedSpeaker);\n });\n },\n 'DeviceManager.selectSpeaker'\n );\n }\n case 'askDevicePermission': {\n return this._context.withAsyncErrorTeedToState(\n (...args: Parameters<DeviceManager['askDevicePermission']>): Promise<DeviceAccess> => {\n return target.askDevicePermission(...args).then((deviceAccess: DeviceAccess) => {\n this._context.setDeviceManagerDeviceAccess(deviceAccess);\n this.setDeviceManager();\n return deviceAccess;\n });\n },\n 'DeviceManager.askDevicePermission'\n );\n }\n default:\n return Reflect.get(target, prop);\n }\n }\n}\n\n// TODO: Remove this when SDK no longer returns duplicate audio and video devices\n/** Helper function to dedupe duplicate audio and video devices obtained from SDK */\nconst dedupeById = <T extends { id: string }>(devices: T[]): T[] => {\n const ids = new Set();\n const uniqueDevices: T[] = [];\n devices.forEach((device: T) => {\n if (!ids.has(device.id)) {\n uniqueDevices.push(device);\n ids.add(device.id);\n }\n });\n return uniqueDevices;\n};\n\n/**\n * Creates a declarative DeviceManager by proxying DeviceManager with ProxyDeviceManager. The declarative DeviceManager\n * will put state updates in the given context.\n *\n * @param deviceManager - DeviceManager from SDK\n * @param context - CallContext from StatefulCallClient\n *\n * @private\n */\nexport const deviceManagerDeclaratify = (\n deviceManager: DeviceManager,\n context: CallContext,\n internalContext: InternalCallContext\n): DeviceManager => {\n const proxyDeviceManager = new ProxyDeviceManager(deviceManager, context);\n Object.defineProperty(deviceManager, 'unsubscribe', {\n configurable: false,\n value: () => proxyDeviceManager.unsubscribe()\n });\n Object.defineProperty(deviceManager, 'selectCamera', {\n configurable: false,\n value: (videoDeviceInfo: VideoDeviceInfo) => proxyDeviceManager.selectCamera(videoDeviceInfo)\n });\n /* @conditional-compile-remove(video-background-effects) */\n Object.defineProperty(deviceManager, 'getUnparentedVideoStreams', {\n configurable: false,\n value: (): LocalVideoStream[] => internalContext.getUnparentedRenderInfos()\n });\n return new Proxy(deviceManager, proxyDeviceManager) as StatefulDeviceManager;\n};\n"]}
1
+ {"version":3,"file":"DeviceManagerDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/DeviceManagerDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AA+BlC;;;;;;GAMG;AACH,MAAM,kBAAkB;IAItB,YAAY,aAA4B,EAAE,OAAoB;QAQtD,qBAAgB,GAAG,GAAS,EAAE;YACpC,mHAAmH;YACnH,4GAA4G;YAC5G,mDAAmD;YACnD,IAAI,CAAC,QAAQ,CAAC,2CAA2C,CAAC,IAAI,CAAC,cAAc,CAAC,2BAA2B,CAAC,CAAC;YAC3G,IAAI,CAAC,QAAQ,CAAC,kCAAkC,CAAC,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;YACzF,IAAI,CAAC,QAAQ,CAAC,+BAA+B,CAAC,IAA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,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;YACxB,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC3B,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,aAA4B,EAC5B,OAAoB,EACpB,eAAoC,EACrB,EAAE;IACjB,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC1E,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,aAAa,EAAE;QAClD,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,WAAW,EAAE;KAC9C,CAAC,CAAC;IACH,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,cAAc,EAAE;QACnD,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,CAAC,eAAgC,EAAE,EAAE,CAAC,kBAAkB,CAAC,YAAY,CAAC,eAAe,CAAC;KAC9F,CAAC,CAAC;IAEH,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,2BAA2B,EAAE;QAChE,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,GAAuB,EAAE,CAAC,eAAe,CAAC,wBAAwB,EAAE;KAC5E,CAAC,CAAC;IACH,OAAO,IAAI,KAAK,CAAC,aAAa,EAAE,kBAAkB,CAA0B,CAAC;AAC/E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AudioDeviceInfo, DeviceAccess, DeviceManager, VideoDeviceInfo } from '@azure/communication-calling';\nimport { CallContext } from './CallContext';\nimport { InternalCallContext } from './InternalCallContext';\n\nimport { LocalVideoStream } from '@azure/communication-calling';\n\n/**\n * Defines the additional methods added by the stateful on top of {@link @azure/communication-calling#DeviceManager}.\n *\n * @public\n */\nexport interface StatefulDeviceManager extends DeviceManager {\n /**\n * Sets the selectedCamera in the {@link DeviceManagerState}. This is completely developer driven and is not tied in\n * any way to {@link @azure/communication-calling#DeviceManager}. It is entirely contained in\n * {@link StatefulDeviceManager}. See also {@link DeviceManagerState.selectedCamera}.\n */\n selectCamera: (device: VideoDeviceInfo) => void;\n\n /**\n * Gets the list of unparented video streams. This is a list of video streams that have not been added to a\n * {@link @azure/communication-calling#Call}. This is useful for developers who want to interact with rendered\n * video streams before they have started a call. See also {@link @azure/communication-react#CallClient.createView}.\n *\n * @public\n */\n getUnparentedVideoStreams: () => LocalVideoStream[];\n}\n\n/**\n * ProxyDeviceManager proxies DeviceManager and subscribes to all events that affect device manager state. State updates\n * are set on the provided context. Also any queries for state are proxied and stored in state as well. Only one device\n * manager should exist for a given CallClient so if CallClient.getDeviceManager is called multiple times, either a\n * cached ProxyDeviceManager should be returned or the existing ProxyDeviceManager should be destructed via destructor()\n * and a new ProxyDeviceManager created.\n */\nclass ProxyDeviceManager implements ProxyHandler<DeviceManager> {\n private _deviceManager: DeviceManager;\n private _context: CallContext;\n\n constructor(deviceManager: DeviceManager, context: CallContext) {\n this._deviceManager = deviceManager;\n this._context = context;\n\n this.setDeviceManager();\n this.subscribe();\n }\n\n private setDeviceManager = (): void => {\n // isSpeakerSelectionAvailable, selectedMicrophone, and selectedSpeaker are properties on DeviceManager. Since they\n // are not functions we can't proxy them so we'll update whenever we think they may need updating such as at\n // construction time or when certain events happen.\n this._context.setDeviceManagerIsSpeakerSelectionAvailable(this._deviceManager.isSpeakerSelectionAvailable);\n this._context.setDeviceManagerSelectedMicrophone(this._deviceManager.selectedMicrophone);\n this._context.setDeviceManagerSelectedSpeaker(this._deviceManager.selectedSpeaker);\n };\n\n private subscribe = (): void => {\n this._deviceManager.on('videoDevicesUpdated', this.videoDevicesUpdated);\n this._deviceManager.on('audioDevicesUpdated', this.audioDevicesUpdated);\n this._deviceManager.on('selectedMicrophoneChanged', this.selectedMicrophoneChanged);\n this._deviceManager.on('selectedSpeakerChanged', this.selectedSpeakerChanged);\n };\n\n /**\n * This is used to unsubscribe DeclarativeDeviceManager from the DeviceManager events.\n */\n public unsubscribe = (): void => {\n this._deviceManager.off('videoDevicesUpdated', this.videoDevicesUpdated);\n this._deviceManager.off('audioDevicesUpdated', this.audioDevicesUpdated);\n this._deviceManager.off('selectedMicrophoneChanged', this.selectedMicrophoneChanged);\n this._deviceManager.off('selectedSpeakerChanged', this.selectedSpeakerChanged);\n };\n\n /**\n * Used to set a camera inside the proxy device manager.\n *\n * @param videoDeviceInfo VideoDeviceInfo\n */\n public selectCamera = (videoDeviceInfo: VideoDeviceInfo): void => {\n this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);\n };\n\n private videoDevicesUpdated = async (): Promise<void> => {\n // Device Manager always has a camera with '' name if there are no real camera devices available.\n // We don't want to show that in the UI.\n const realCameras = (await this._deviceManager.getCameras()).filter((c) => !!c.name);\n this._context.setDeviceManagerCameras(dedupeById(realCameras));\n };\n\n private audioDevicesUpdated = async (): Promise<void> => {\n this._context.setDeviceManagerMicrophones(dedupeById(await this._deviceManager.getMicrophones()));\n this._context.setDeviceManagerSpeakers(dedupeById(await this._deviceManager.getSpeakers()));\n };\n\n private selectedMicrophoneChanged = (): void => {\n this._context.setDeviceManagerSelectedMicrophone(this._deviceManager.selectedMicrophone);\n };\n\n private selectedSpeakerChanged = (): void => {\n this._context.setDeviceManagerSelectedSpeaker(this._deviceManager.selectedSpeaker);\n };\n\n public get<P extends keyof DeviceManager>(target: DeviceManager, prop: P): any {\n switch (prop) {\n case 'getCameras': {\n return this._context.withAsyncErrorTeedToState((): Promise<VideoDeviceInfo[]> => {\n return target.getCameras().then((cameras: VideoDeviceInfo[]) => {\n // Device Manager always has a camera with '' name if there are no real camera devices available.\n // We don't want to show that in the UI.\n const realCameras = cameras.filter((c) => !!c.name);\n this._context.setDeviceManagerCameras(dedupeById(realCameras));\n return realCameras;\n });\n }, 'DeviceManager.getCameras');\n }\n case 'getMicrophones': {\n return this._context.withAsyncErrorTeedToState((): Promise<AudioDeviceInfo[]> => {\n return target.getMicrophones().then((microphones: AudioDeviceInfo[]) => {\n this._context.setDeviceManagerMicrophones(dedupeById(microphones));\n return microphones;\n });\n }, 'DeviceManager.getMicrophones');\n }\n case 'getSpeakers': {\n return this._context.withAsyncErrorTeedToState((): Promise<AudioDeviceInfo[]> => {\n return target.getSpeakers().then((speakers: AudioDeviceInfo[]) => {\n this._context.setDeviceManagerSpeakers(dedupeById(speakers));\n return speakers;\n });\n }, 'DeviceManager.getSpeakers');\n }\n case 'selectMicrophone': {\n return this._context.withAsyncErrorTeedToState(\n (...args: Parameters<DeviceManager['selectMicrophone']>): Promise<void> => {\n return target.selectMicrophone(...args).then(() => {\n this._context.setDeviceManagerSelectedMicrophone(target.selectedMicrophone);\n });\n },\n 'DeviceManager.selectMicrophone'\n );\n }\n case 'selectSpeaker': {\n return this._context.withAsyncErrorTeedToState(\n (...args: Parameters<DeviceManager['selectSpeaker']>): Promise<void> => {\n return target.selectSpeaker(...args).then(() => {\n this._context.setDeviceManagerSelectedSpeaker(target.selectedSpeaker);\n });\n },\n 'DeviceManager.selectSpeaker'\n );\n }\n case 'askDevicePermission': {\n return this._context.withAsyncErrorTeedToState(\n (...args: Parameters<DeviceManager['askDevicePermission']>): Promise<DeviceAccess> => {\n return target.askDevicePermission(...args).then((deviceAccess: DeviceAccess) => {\n this._context.setDeviceManagerDeviceAccess(deviceAccess);\n this.setDeviceManager();\n return deviceAccess;\n });\n },\n 'DeviceManager.askDevicePermission'\n );\n }\n default:\n return Reflect.get(target, prop);\n }\n }\n}\n\n// TODO: Remove this when SDK no longer returns duplicate audio and video devices\n/** Helper function to dedupe duplicate audio and video devices obtained from SDK */\nconst dedupeById = <T extends { id: string }>(devices: T[]): T[] => {\n const ids = new Set();\n const uniqueDevices: T[] = [];\n devices.forEach((device: T) => {\n if (!ids.has(device.id)) {\n uniqueDevices.push(device);\n ids.add(device.id);\n }\n });\n return uniqueDevices;\n};\n\n/**\n * Creates a declarative DeviceManager by proxying DeviceManager with ProxyDeviceManager. The declarative DeviceManager\n * will put state updates in the given context.\n *\n * @param deviceManager - DeviceManager from SDK\n * @param context - CallContext from StatefulCallClient\n *\n * @private\n */\nexport const deviceManagerDeclaratify = (\n deviceManager: DeviceManager,\n context: CallContext,\n internalContext: InternalCallContext\n): DeviceManager => {\n const proxyDeviceManager = new ProxyDeviceManager(deviceManager, context);\n Object.defineProperty(deviceManager, 'unsubscribe', {\n configurable: false,\n value: () => proxyDeviceManager.unsubscribe()\n });\n Object.defineProperty(deviceManager, 'selectCamera', {\n configurable: false,\n value: (videoDeviceInfo: VideoDeviceInfo) => proxyDeviceManager.selectCamera(videoDeviceInfo)\n });\n\n Object.defineProperty(deviceManager, 'getUnparentedVideoStreams', {\n configurable: false,\n value: (): LocalVideoStream[] => internalContext.getUnparentedRenderInfos()\n });\n return new Proxy(deviceManager, proxyDeviceManager) as StatefulDeviceManager;\n};\n"]}
@@ -1,9 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import { CallIdHistory } from './CallIdHistory';
4
- /* @conditional-compile-remove(video-background-effects) */
5
4
  import { LocalVideoStreamVideoEffectsSubscriber } from './LocalVideoStreamVideoEffectsSubscriber';
6
- /* @conditional-compile-remove(video-background-effects) */
7
5
  import { Features } from '@azure/communication-calling';
8
6
  /**
9
7
  * Contains internal data used between different Declarative components to share data.
@@ -19,7 +17,6 @@ export class InternalCallContext {
19
17
  this._callIdHistory = new CallIdHistory();
20
18
  // Used for keeping track of video effects subscribers that are not part of a Call.
21
19
  // The key is the stream ID. We assume each stream ID
22
- /* @conditional-compile-remove(video-background-effects) */
23
20
  this._unparentedViewVideoEffectsSubscriber = new Map();
24
21
  }
25
22
  setCallId(newCallId, oldCallId) {
@@ -112,13 +109,11 @@ export class InternalCallContext {
112
109
  }
113
110
  deleteUnparentedRenderInfo(localVideoStream) {
114
111
  var _a;
115
- /* @conditional-compile-remove(video-background-effects) */
116
112
  (_a = this._unparentedViewVideoEffectsSubscriber.get(localVideoStream.mediaStreamType)) === null || _a === void 0 ? void 0 : _a.unsubscribe();
117
113
  this._unparentedRenderInfos.delete(localVideoStream.mediaStreamType);
118
114
  }
119
115
  subscribeToUnparentedViewVideoEffects(localVideoStream, callContext) {
120
116
  var _a;
121
- /* @conditional-compile-remove(video-background-effects) */
122
117
  {
123
118
  // Ensure we aren't setting multiple subscriptions
124
119
  (_a = this._unparentedViewVideoEffectsSubscriber.get(localVideoStream.mediaStreamType)) === null || _a === void 0 ? void 0 : _a.unsubscribe();
@@ -1 +1 @@
1
- {"version":3,"file":"InternalCallContext.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/InternalCallContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,2DAA2D;AAC3D,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AAClG,2DAA2D;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAgCxD;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAAhC;QACE,0DAA0D;QAClD,uBAAkB,GAAG,IAAI,GAAG,EAAsD,CAAC;QAE3F,gDAAgD;QACxC,sBAAiB,GAAG,IAAI,GAAG,EAAiD,CAAC;QAErF,oFAAoF;QAC5E,2BAAsB,GAAG,IAAI,GAAG,EAAoC,CAAC;QACrE,mBAAc,GAAG,IAAI,aAAa,EAAE,CAAC;QAE7C,mFAAmF;QACnF,qDAAqD;QACrD,2DAA2D;QACnD,0CAAqC,GAAG,IAAI,GAAG,EAA8D,CAAC;IAkKxH,CAAC;IAhKQ,SAAS,CAAC,SAAiB,EAAE,SAAiB;QACnD,IAAI,CAAC,cAAc,CAAC,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C,YAAY,CAAC;aAC5E,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IAED,gFAAgF;IACzE,qBAAqB;QAC1B,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;QAChC,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n LocalVideoStream,\n MediaStreamType,\n RemoteVideoStream,\n VideoStreamRenderer\n} from '@azure/communication-calling';\nimport { LocalVideoStreamState } from './CallClientState';\nimport type { CallContext } from './CallContext';\nimport { CallIdHistory } from './CallIdHistory';\n\n/* @conditional-compile-remove(video-background-effects) */\nimport { LocalVideoStreamVideoEffectsSubscriber } from './LocalVideoStreamVideoEffectsSubscriber';\n/* @conditional-compile-remove(video-background-effects) */\nimport { Features } from '@azure/communication-calling';\n\n/**\n * Internally tracked render status. Stores the status of a video render of a stream as rendering could take a long\n * time.\n *\n * 'NotRendered' - the stream has not yet been rendered\n * 'Rendering' - the stream is currently rendering\n * 'Rendered' - the stream has been rendered\n * 'Stopping' - the stream is currently rendering but has been signaled to stop\n */\nexport type RenderStatus = 'NotRendered' | 'Rendering' | 'Rendered' | 'Stopping';\n\n/**\n * Internal container to hold common state needed to keep track of renders.\n */\nexport interface RenderInfo<T> {\n status: RenderStatus;\n renderer: VideoStreamRenderer | undefined;\n stream: T;\n}\n\n/**\n * Internally used to keep track of the status, renderer, and awaiting promise, associated with a LocalVideoStream.\n */\nexport type LocalRenderInfo = RenderInfo<LocalVideoStream>;\n\n/**\n * Internally used to keep track of the status, renderer, and awaiting promise, associated with a RemoteVideoStream.\n */\nexport type RemoteRenderInfo = RenderInfo<RemoteVideoStream>;\n\n/**\n * Contains internal data used between different Declarative components to share data.\n */\nexport class InternalCallContext {\n // <CallId, <ParticipantKey, <StreamId, RemoteRenderInfo>>\n private _remoteRenderInfos = new Map<string, Map<string, Map<number, RemoteRenderInfo>>>();\n\n // <CallId, <MediaStreamType, LocalRenderInfo>>.\n private _localRenderInfos = new Map<string, Map<MediaStreamType, LocalRenderInfo>>();\n\n // Used for keeping track of rendered LocalVideoStreams that are not part of a Call.\n private _unparentedRenderInfos = new Map<MediaStreamType, LocalRenderInfo>();\n private _callIdHistory = new CallIdHistory();\n\n // Used for keeping track of video effects subscribers that are not part of a Call.\n // The key is the stream ID. We assume each stream ID\n /* @conditional-compile-remove(video-background-effects) */\n private _unparentedViewVideoEffectsSubscriber = new Map<string, LocalVideoStreamVideoEffectsSubscriber | undefined>();\n\n public setCallId(newCallId: string, oldCallId: string): void {\n this._callIdHistory.updateCallIdHistory(newCallId, oldCallId);\n const remoteRenderInfos = this._remoteRenderInfos.get(oldCallId);\n if (remoteRenderInfos) {\n this._remoteRenderInfos.delete(oldCallId);\n this._remoteRenderInfos.set(newCallId, remoteRenderInfos);\n }\n\n const localRenderInfos = this._localRenderInfos.get(oldCallId);\n if (localRenderInfos) {\n this._localRenderInfos.delete(oldCallId);\n this._localRenderInfos.set(newCallId, localRenderInfos);\n }\n }\n\n public getCallIds(): IterableIterator<string> {\n return this._remoteRenderInfos.keys();\n }\n\n public getRemoteRenderInfoForCall(callId: string): Map<string, Map<number, RemoteRenderInfo>> | undefined {\n return this._remoteRenderInfos.get(this._callIdHistory.latestCallId(callId));\n }\n\n public getRemoteRenderInfoForParticipant(\n callId: string,\n participantKey: string,\n streamId: number\n ): RemoteRenderInfo | undefined {\n const callRenderInfos = this._remoteRenderInfos.get(this._callIdHistory.latestCallId(callId));\n if (!callRenderInfos) {\n return undefined;\n }\n const participantRenderInfos = callRenderInfos.get(participantKey);\n if (!participantRenderInfos) {\n return undefined;\n }\n return participantRenderInfos.get(streamId);\n }\n\n public setRemoteRenderInfo(\n callId: string,\n participantKey: string,\n streamId: number,\n stream: RemoteVideoStream,\n status: RenderStatus,\n renderer: VideoStreamRenderer | undefined\n ): void {\n let callRenderInfos = this._remoteRenderInfos.get(this._callIdHistory.latestCallId(callId));\n if (!callRenderInfos) {\n callRenderInfos = new Map<string, Map<number, RemoteRenderInfo>>();\n this._remoteRenderInfos.set(this._callIdHistory.latestCallId(callId), callRenderInfos);\n }\n\n let participantRenderInfos = callRenderInfos.get(participantKey);\n if (!participantRenderInfos) {\n participantRenderInfos = new Map<number, RemoteRenderInfo>();\n callRenderInfos.set(participantKey, participantRenderInfos);\n }\n\n participantRenderInfos.set(streamId, { stream, status, renderer });\n }\n\n public deleteRemoteRenderInfo(callId: string, participantKey: string, streamId: number): void {\n const callRenderInfos = this._remoteRenderInfos.get(this._callIdHistory.latestCallId(callId));\n if (!callRenderInfos) {\n return;\n }\n\n const participantRenderInfos = callRenderInfos.get(participantKey);\n if (!participantRenderInfos) {\n return;\n }\n\n participantRenderInfos.delete(streamId);\n }\n\n public setLocalRenderInfo(\n callId: string,\n streamKey: MediaStreamType,\n stream: LocalVideoStream,\n status: RenderStatus,\n renderer: VideoStreamRenderer | undefined\n ): void {\n let localRenderInfosForCall = this._localRenderInfos.get(this._callIdHistory.latestCallId(callId));\n if (!localRenderInfosForCall) {\n localRenderInfosForCall = new Map<MediaStreamType, LocalRenderInfo>();\n this._localRenderInfos.set(this._callIdHistory.latestCallId(callId), localRenderInfosForCall);\n }\n\n localRenderInfosForCall.set(streamKey, { stream, status, renderer });\n }\n\n public getLocalRenderInfosForCall(callId: string): Map<MediaStreamType, LocalRenderInfo> | undefined {\n return this._localRenderInfos.get(this._callIdHistory.latestCallId(callId));\n }\n\n public getLocalRenderInfo(callId: string, streamKey: MediaStreamType): LocalRenderInfo | undefined {\n const localRenderInfosForCall = this._localRenderInfos.get(this._callIdHistory.latestCallId(callId));\n if (!localRenderInfosForCall) {\n return undefined;\n }\n\n return localRenderInfosForCall.get(streamKey);\n }\n\n public deleteLocalRenderInfo(callId: string, streamKey: MediaStreamType): void {\n const localRenderInfoForCall = this._localRenderInfos.get(this._callIdHistory.latestCallId(callId));\n if (!localRenderInfoForCall) {\n return;\n }\n\n localRenderInfoForCall.delete(streamKey);\n }\n\n public getUnparentedRenderInfo(localVideoStream: LocalVideoStreamState): LocalRenderInfo | undefined {\n return this._unparentedRenderInfos.get(localVideoStream.mediaStreamType);\n }\n\n public getUnparentedRenderInfos(): LocalVideoStream[] {\n return [...this._unparentedRenderInfos].map(([, renderInfo]) => renderInfo.stream);\n }\n\n public setUnparentedRenderInfo(\n statefulStream: LocalVideoStreamState,\n stream: LocalVideoStream,\n status: RenderStatus,\n renderer: VideoStreamRenderer | undefined\n ): void {\n this._unparentedRenderInfos.set(statefulStream.mediaStreamType, { stream, status, renderer });\n }\n\n public deleteUnparentedRenderInfo(localVideoStream: LocalVideoStreamState): void {\n /* @conditional-compile-remove(video-background-effects) */\n this._unparentedViewVideoEffectsSubscriber.get(localVideoStream.mediaStreamType)?.unsubscribe();\n\n this._unparentedRenderInfos.delete(localVideoStream.mediaStreamType);\n }\n\n public subscribeToUnparentedViewVideoEffects(localVideoStream: LocalVideoStream, callContext: CallContext): void {\n /* @conditional-compile-remove(video-background-effects) */\n {\n // Ensure we aren't setting multiple subscriptions\n this._unparentedViewVideoEffectsSubscriber.get(localVideoStream.mediaStreamType)?.unsubscribe();\n this._unparentedViewVideoEffectsSubscriber.set(\n localVideoStream.mediaStreamType,\n new LocalVideoStreamVideoEffectsSubscriber({\n parent: 'unparented',\n context: callContext,\n localVideoStream: localVideoStream,\n localVideoStreamEffectsAPI: localVideoStream.feature(Features.VideoEffects)\n })\n );\n }\n }\n\n // UnparentedRenderInfos are not cleared as they are not part of the Call state.\n public clearCallRelatedState(): void {\n this._remoteRenderInfos.clear();\n this._localRenderInfos.clear();\n }\n}\n"]}
1
+ {"version":3,"file":"InternalCallContext.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/InternalCallContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA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CAAC,MAAM,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACvE,CAAC;IAEM,qCAAqC,CAAC,gBAAkC,EAAE,WAAwB;;QACvG,CAAC;YACC,kDAAkD;YAClD,MAAA,IAAI,CAAC,qCAAqC,CAAC,GAAG,CAAC,gBAAgB,CAAC,eAAe,CAAC,0CAAE,WAAW,EAAE,CAAC;YAChG,IAAI,CAAC,qCAAqC,CAAC,GAAG,CAC5C,gBAAgB,CAAC,eAAe,EAChC,IAAI,sCAAsC,CAAC;gBACzC,MAAM,EAAE,YAAY;gBACpB,OAAO,EAAE,WAAW;gBACpB,gBAAgB,EAAE,gBAAgB;gBAClC,0BAA0B,EAAE,gBAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;aAC5E,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IAED,gFAAgF;IACzE,qBAAqB;QAC1B,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;QAChC,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n LocalVideoStream,\n MediaStreamType,\n RemoteVideoStream,\n VideoStreamRenderer\n} from '@azure/communication-calling';\nimport { LocalVideoStreamState } from './CallClientState';\nimport type { CallContext } from './CallContext';\nimport { CallIdHistory } from './CallIdHistory';\n\nimport { LocalVideoStreamVideoEffectsSubscriber } from './LocalVideoStreamVideoEffectsSubscriber';\n\nimport { Features } from '@azure/communication-calling';\n\n/**\n * Internally tracked render status. Stores the status of a video render of a stream as rendering could take a long\n * time.\n *\n * 'NotRendered' - the stream has not yet been rendered\n * 'Rendering' - the stream is currently rendering\n * 'Rendered' - the stream has been rendered\n * 'Stopping' - the stream is currently rendering but has been signaled to stop\n */\nexport type RenderStatus = 'NotRendered' | 'Rendering' | 'Rendered' | 'Stopping';\n\n/**\n * Internal container to hold common state needed to keep track of renders.\n */\nexport interface RenderInfo<T> {\n status: RenderStatus;\n renderer: VideoStreamRenderer | undefined;\n stream: T;\n}\n\n/**\n * Internally used to keep track of the status, renderer, and awaiting promise, associated with a LocalVideoStream.\n */\nexport type LocalRenderInfo = RenderInfo<LocalVideoStream>;\n\n/**\n * Internally used to keep track of the status, renderer, and awaiting promise, associated with a RemoteVideoStream.\n */\nexport type RemoteRenderInfo = RenderInfo<RemoteVideoStream>;\n\n/**\n * Contains internal data used between different Declarative components to share data.\n */\nexport class InternalCallContext {\n // <CallId, <ParticipantKey, <StreamId, RemoteRenderInfo>>\n private _remoteRenderInfos = new Map<string, Map<string, Map<number, RemoteRenderInfo>>>();\n\n // <CallId, <MediaStreamType, LocalRenderInfo>>.\n private _localRenderInfos = new Map<string, Map<MediaStreamType, LocalRenderInfo>>();\n\n // Used for keeping track of rendered LocalVideoStreams that are not part of a Call.\n private _unparentedRenderInfos = new Map<MediaStreamType, LocalRenderInfo>();\n private _callIdHistory = new CallIdHistory();\n\n // Used for keeping track of video effects subscribers that are not part of a Call.\n // The key is the stream ID. We assume each stream ID\n\n private _unparentedViewVideoEffectsSubscriber = new Map<string, LocalVideoStreamVideoEffectsSubscriber | undefined>();\n\n public setCallId(newCallId: string, oldCallId: string): void {\n this._callIdHistory.updateCallIdHistory(newCallId, oldCallId);\n const remoteRenderInfos = this._remoteRenderInfos.get(oldCallId);\n if (remoteRenderInfos) {\n this._remoteRenderInfos.delete(oldCallId);\n this._remoteRenderInfos.set(newCallId, remoteRenderInfos);\n }\n\n const localRenderInfos = this._localRenderInfos.get(oldCallId);\n if (localRenderInfos) {\n this._localRenderInfos.delete(oldCallId);\n this._localRenderInfos.set(newCallId, localRenderInfos);\n }\n }\n\n public getCallIds(): IterableIterator<string> {\n return this._remoteRenderInfos.keys();\n }\n\n public getRemoteRenderInfoForCall(callId: string): Map<string, Map<number, RemoteRenderInfo>> | undefined {\n return this._remoteRenderInfos.get(this._callIdHistory.latestCallId(callId));\n }\n\n public getRemoteRenderInfoForParticipant(\n callId: string,\n participantKey: string,\n streamId: number\n ): RemoteRenderInfo | undefined {\n const callRenderInfos = this._remoteRenderInfos.get(this._callIdHistory.latestCallId(callId));\n if (!callRenderInfos) {\n return undefined;\n }\n const participantRenderInfos = callRenderInfos.get(participantKey);\n if (!participantRenderInfos) {\n return undefined;\n }\n return participantRenderInfos.get(streamId);\n }\n\n public setRemoteRenderInfo(\n callId: string,\n participantKey: string,\n streamId: number,\n stream: RemoteVideoStream,\n status: RenderStatus,\n renderer: VideoStreamRenderer | undefined\n ): void {\n let callRenderInfos = this._remoteRenderInfos.get(this._callIdHistory.latestCallId(callId));\n if (!callRenderInfos) {\n callRenderInfos = new Map<string, Map<number, RemoteRenderInfo>>();\n this._remoteRenderInfos.set(this._callIdHistory.latestCallId(callId), callRenderInfos);\n }\n\n let participantRenderInfos = callRenderInfos.get(participantKey);\n if (!participantRenderInfos) {\n participantRenderInfos = new Map<number, RemoteRenderInfo>();\n callRenderInfos.set(participantKey, participantRenderInfos);\n }\n\n participantRenderInfos.set(streamId, { stream, status, renderer });\n }\n\n public deleteRemoteRenderInfo(callId: string, participantKey: string, streamId: number): void {\n const callRenderInfos = this._remoteRenderInfos.get(this._callIdHistory.latestCallId(callId));\n if (!callRenderInfos) {\n return;\n }\n\n const participantRenderInfos = callRenderInfos.get(participantKey);\n if (!participantRenderInfos) {\n return;\n }\n\n participantRenderInfos.delete(streamId);\n }\n\n public setLocalRenderInfo(\n callId: string,\n streamKey: MediaStreamType,\n stream: LocalVideoStream,\n status: RenderStatus,\n renderer: VideoStreamRenderer | undefined\n ): void {\n let localRenderInfosForCall = this._localRenderInfos.get(this._callIdHistory.latestCallId(callId));\n if (!localRenderInfosForCall) {\n localRenderInfosForCall = new Map<MediaStreamType, LocalRenderInfo>();\n this._localRenderInfos.set(this._callIdHistory.latestCallId(callId), localRenderInfosForCall);\n }\n\n localRenderInfosForCall.set(streamKey, { stream, status, renderer });\n }\n\n public getLocalRenderInfosForCall(callId: string): Map<MediaStreamType, LocalRenderInfo> | undefined {\n return this._localRenderInfos.get(this._callIdHistory.latestCallId(callId));\n }\n\n public getLocalRenderInfo(callId: string, streamKey: MediaStreamType): LocalRenderInfo | undefined {\n const localRenderInfosForCall = this._localRenderInfos.get(this._callIdHistory.latestCallId(callId));\n if (!localRenderInfosForCall) {\n return undefined;\n }\n\n return localRenderInfosForCall.get(streamKey);\n }\n\n public deleteLocalRenderInfo(callId: string, streamKey: MediaStreamType): void {\n const localRenderInfoForCall = this._localRenderInfos.get(this._callIdHistory.latestCallId(callId));\n if (!localRenderInfoForCall) {\n return;\n }\n\n localRenderInfoForCall.delete(streamKey);\n }\n\n public getUnparentedRenderInfo(localVideoStream: LocalVideoStreamState): LocalRenderInfo | undefined {\n return this._unparentedRenderInfos.get(localVideoStream.mediaStreamType);\n }\n\n public getUnparentedRenderInfos(): LocalVideoStream[] {\n return [...this._unparentedRenderInfos].map(([, renderInfo]) => renderInfo.stream);\n }\n\n public setUnparentedRenderInfo(\n statefulStream: LocalVideoStreamState,\n stream: LocalVideoStream,\n status: RenderStatus,\n renderer: VideoStreamRenderer | undefined\n ): void {\n this._unparentedRenderInfos.set(statefulStream.mediaStreamType, { stream, status, renderer });\n }\n\n public deleteUnparentedRenderInfo(localVideoStream: LocalVideoStreamState): void {\n this._unparentedViewVideoEffectsSubscriber.get(localVideoStream.mediaStreamType)?.unsubscribe();\n\n this._unparentedRenderInfos.delete(localVideoStream.mediaStreamType);\n }\n\n public subscribeToUnparentedViewVideoEffects(localVideoStream: LocalVideoStream, callContext: CallContext): void {\n {\n // Ensure we aren't setting multiple subscriptions\n this._unparentedViewVideoEffectsSubscriber.get(localVideoStream.mediaStreamType)?.unsubscribe();\n this._unparentedViewVideoEffectsSubscriber.set(\n localVideoStream.mediaStreamType,\n new LocalVideoStreamVideoEffectsSubscriber({\n parent: 'unparented',\n context: callContext,\n localVideoStream: localVideoStream,\n localVideoStreamEffectsAPI: localVideoStream.feature(Features.VideoEffects)\n })\n );\n }\n }\n\n // UnparentedRenderInfos are not cleared as they are not part of the Call state.\n public clearCallRelatedState(): void {\n this._remoteRenderInfos.clear();\n this._localRenderInfos.clear();\n }\n}\n"]}
@@ -1,8 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- /* @conditional-compile-remove(video-background-effects) */
4
3
  import { convertFromSDKToDeclarativeVideoStreamVideoEffects } from './Converter';
5
- /* @conditional-compile-remove(video-background-effects) */
6
4
  /**
7
5
  * Subscribes to a LocalVideoStream's video effects events and updates the call context appropriately.
8
6
  * @private
@@ -1 +1 @@
1
- {"version":3,"file":"LocalVideoStreamVideoEffectsSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,2DAA2D;AAC3D,OAAO,EAAE,kDAAkD,EAAE,MAAM,aAAa,CAAC;AAEjF,2DAA2D;AAC3D;;;GAGG;AACH,MAAM,OAAO,sCAAsC;IAMjD,YAAY,IAMX;QASO,cAAS,GAAG,GAAS,EAAE;YAC7B,IAAI,CAAC,2BAA2B,CAAC,EAAE,CAAC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAC3E,IAAI,CAAC,2BAA2B,CAAC,EAAE,CAAC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAC3E,IAAI,CAAC,2BAA2B,CAAC,EAAE,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACzE,CAAC,CAAC;QAEK,gBAAW,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAC5E,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAC5E,IAAI,CAAC,2BAA2B,CAAC,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ensed under the MIT License.\n\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoEffectErrorPayload, VideoEffectsFeature } from '@azure/communication-calling';\n/* @conditional-compile-remove(video-background-effects) */\nimport { LocalVideoStreamState } from './CallClientState';\n/* @conditional-compile-remove(video-background-effects) */\nimport { CallContext } from './CallContext';\n/* @conditional-compile-remove(video-background-effects) */\nimport { CallIdRef } from './CallIdRef';\n/* @conditional-compile-remove(video-background-effects) */\nimport { convertFromSDKToDeclarativeVideoStreamVideoEffects } from './Converter';\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * Subscribes to a LocalVideoStream's video effects events and updates the call context appropriately.\n * @private\n */\nexport class LocalVideoStreamVideoEffectsSubscriber {\n private _parent: CallIdRef | 'unparented';\n private _context: CallContext;\n private _localVideoStream: LocalVideoStreamState;\n private _localVideoStreamEffectsAPI: VideoEffectsFeature;\n\n constructor(args: {\n /** Owner of the local video stream. This is either the Call (referenced by CallIdRef) or is the device manager's unparented view (referenced by 'unparented') */\n parent: CallIdRef | 'unparented';\n context: CallContext;\n localVideoStream: LocalVideoStreamState;\n localVideoStreamEffectsAPI: VideoEffectsFeature;\n }) {\n this._parent = args.parent;\n this._context = args.context;\n this._localVideoStream = args.localVideoStream;\n this._localVideoStreamEffectsAPI = args.localVideoStreamEffectsAPI;\n\n this.subscribe();\n }\n\n private subscribe = (): void => {\n this._localVideoStreamEffectsAPI.on('effectsStarted', this.effectsStarted);\n this._localVideoStreamEffectsAPI.on('effectsStopped', this.effectsStopped);\n this._localVideoStreamEffectsAPI.on('effectsError', this.effectsError);\n };\n\n public unsubscribe = (): void => {\n this._localVideoStreamEffectsAPI.off('effectsStarted', this.effectsStarted);\n this._localVideoStreamEffectsAPI.off('effectsStopped', this.effectsStopped);\n this._localVideoStreamEffectsAPI.off('effectsError', this.effectsError);\n };\n\n private effectsStarted = (): void => {\n this.updateStatefulVideoEffects();\n };\n\n private effectsStopped = (): void => {\n this.updateStatefulVideoEffects();\n };\n\n private effectsError = (error: VideoEffectErrorPayload): void => {\n // When there is an error the effects have stopped. Ensure state is updated to reflect if effects are active or not.\n this.updateStatefulVideoEffects();\n this._context.teeErrorToState(new Error(error.message), 'VideoEffectsFeature.startEffects');\n };\n\n private updateStatefulVideoEffects = (): void => {\n const statefulVideoEffects = convertFromSDKToDeclarativeVideoStreamVideoEffects(\n this._localVideoStreamEffectsAPI.activeEffects\n );\n if (this._parent === 'unparented') {\n this._context.setDeviceManagerUnparentedViewVideoEffects(this._localVideoStream, statefulVideoEffects);\n } else {\n this._context.setCallLocalVideoStreamVideoEffects(this._parent.callId, statefulVideoEffects);\n }\n };\n}\n"]}
1
+ {"version":3,"file":"LocalVideoStreamVideoEffectsSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,OAAO,EAAE,kDAAkD,EAAE,MAAM,aAAa,CAAC;AAEjF;;;GAGG;AACH,MAAM,OAAO,sCAAsC;IAMjD,YAAY,IAMX;QASO,cAAS,GAAG,GAAS,EAAE;YAC7B,IAAI,CAAC,2BAA2B,CAAC,EAAE,CAAC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAC3E,IAAI,CAAC,2BAA2B,CAAC,EAAE,CAAC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAC3E,IAAI,CAAC,2BAA2B,CAAC,EAAE,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACzE,CAAC,CAAC;QAEK,gBAAW,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAC5E,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YAC5E,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAA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.\n\nimport { VideoEffectErrorPayload, VideoEffectsFeature } from '@azure/communication-calling';\n\nimport { LocalVideoStreamState } from './CallClientState';\n\nimport { CallContext } from './CallContext';\n\nimport { CallIdRef } from './CallIdRef';\n\nimport { convertFromSDKToDeclarativeVideoStreamVideoEffects } from './Converter';\n\n/**\n * Subscribes to a LocalVideoStream's video effects events and updates the call context appropriately.\n * @private\n */\nexport class LocalVideoStreamVideoEffectsSubscriber {\n private _parent: CallIdRef | 'unparented';\n private _context: CallContext;\n private _localVideoStream: LocalVideoStreamState;\n private _localVideoStreamEffectsAPI: VideoEffectsFeature;\n\n constructor(args: {\n /** Owner of the local video stream. This is either the Call (referenced by CallIdRef) or is the device manager's unparented view (referenced by 'unparented') */\n parent: CallIdRef | 'unparented';\n context: CallContext;\n localVideoStream: LocalVideoStreamState;\n localVideoStreamEffectsAPI: VideoEffectsFeature;\n }) {\n this._parent = args.parent;\n this._context = args.context;\n this._localVideoStream = args.localVideoStream;\n this._localVideoStreamEffectsAPI = args.localVideoStreamEffectsAPI;\n\n this.subscribe();\n }\n\n private subscribe = (): void => {\n this._localVideoStreamEffectsAPI.on('effectsStarted', this.effectsStarted);\n this._localVideoStreamEffectsAPI.on('effectsStopped', this.effectsStopped);\n this._localVideoStreamEffectsAPI.on('effectsError', this.effectsError);\n };\n\n public unsubscribe = (): void => {\n this._localVideoStreamEffectsAPI.off('effectsStarted', this.effectsStarted);\n this._localVideoStreamEffectsAPI.off('effectsStopped', this.effectsStopped);\n this._localVideoStreamEffectsAPI.off('effectsError', this.effectsError);\n };\n\n private effectsStarted = (): void => {\n this.updateStatefulVideoEffects();\n };\n\n private effectsStopped = (): void => {\n this.updateStatefulVideoEffects();\n };\n\n private effectsError = (error: VideoEffectErrorPayload): void => {\n // When there is an error the effects have stopped. Ensure state is updated to reflect if effects are active or not.\n this.updateStatefulVideoEffects();\n this._context.teeErrorToState(new Error(error.message), 'VideoEffectsFeature.startEffects');\n };\n\n private updateStatefulVideoEffects = (): void => {\n const statefulVideoEffects = convertFromSDKToDeclarativeVideoStreamVideoEffects(\n this._localVideoStreamEffectsAPI.activeEffects\n );\n if (this._parent === 'unparented') {\n this._context.setDeviceManagerUnparentedViewVideoEffects(this._localVideoStream, statefulVideoEffects);\n } else {\n this._context.setCallLocalVideoStreamVideoEffects(this._parent.callId, statefulVideoEffects);\n }\n };\n}\n"]}