@azure/communication-react 1.5.1-beta.1 → 1.5.1-beta.3
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.
- package/CHANGELOG.beta.md +123 -1
- package/CHANGELOG.json +1068 -0
- package/README.md +1 -1
- package/dist/communication-react.d.ts +602 -170
- package/dist/dist-cjs/communication-react/index.js +6134 -3678
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +13 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +36 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +49 -0
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +53 -0
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -0
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +12 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +27 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +3 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +3 -0
- package/dist/dist-esm/calling-component-bindings/src/index.js +2 -0
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +68 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +19 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +95 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +57 -0
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +19 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.d.ts +18 -0
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js +38 -0
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +6 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +18 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.d.ts +4 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +5 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +3 -0
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +5 -0
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Logger.d.ts +16 -29
- package/dist/dist-esm/calling-stateful-client/src/Logger.js +16 -29
- package/dist/dist-esm/calling-stateful-client/src/Logger.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +137 -370
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.d.ts +17 -0
- package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.js +198 -0
- package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +7 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +10 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index.js +2 -0
- package/dist/dist-esm/calling-stateful-client/src/index.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +59 -5
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/constants.d.ts +4 -0
- package/dist/dist-esm/chat-component-bindings/src/utils/constants.js +4 -0
- package/dist/dist-esm/chat-component-bindings/src/utils/constants.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +32 -26
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +15 -3
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +6 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +1 -0
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +9 -2
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.d.ts +12 -0
- package/dist/dist-esm/react-components/src/components/CameraButton.js +24 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Caption.d.ts +21 -0
- package/dist/dist-esm/react-components/src/components/Caption.js +33 -0
- package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +31 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +49 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +37 -0
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js +88 -0
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +22 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +19 -16
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +4 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +11 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +38 -20
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +14 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +96 -11
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.js +79 -55
- package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +1 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +13 -0
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +5 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/GridLayout.js +1 -1
- package/dist/dist-esm/react-components/src/components/GridLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.js +29 -24
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +38 -6
- package/dist/dist-esm/react-components/src/components/MessageThread.js +110 -51
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +12 -0
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +29 -1
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js +1 -1
- package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.d.ts +4 -2
- package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js +6 -42
- package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.d.ts +35 -0
- package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js +32 -0
- package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.js +10 -2
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.js +5 -2
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +70 -0
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js +52 -0
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VerticalGallery.d.ts +67 -0
- package/dist/dist-esm/react-components/src/components/VerticalGallery.js +113 -0
- package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.d.ts +21 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.js +65 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +75 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +44 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +88 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +80 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +55 -19
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.d.ts +10 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +12 -10
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +81 -24
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +11 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.d.ts +21 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +63 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +8 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +32 -7
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +28 -12
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js +2 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.d.ts +4 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +8 -7
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.d.ts +64 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js +79 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.d.ts +25 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.js +94 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +4 -4
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +58 -49
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +25 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +32 -4
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js +9 -12
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +12 -1
- package/dist/dist-esm/react-components/src/components/index.js +11 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +33 -0
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +60 -0
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.d.ts +34 -0
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js +86 -0
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +14 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js +16 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js +1 -0
- package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +7 -2
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +58 -2
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.d.ts +32 -0
- package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.js +66 -0
- package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +1 -0
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +6 -4
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.d.ts +11 -0
- package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.js +22 -0
- package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/utils/responsive.d.ts +6 -0
- package/dist/dist-esm/react-components/src/components/utils/responsive.js +7 -0
- package/dist/dist-esm/react-components/src/components/utils/responsive.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils.d.ts +9 -0
- package/dist/dist-esm/react-components/src/components/utils.js +24 -0
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js +6 -14
- package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js.map +1 -1
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +10 -4
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +7 -2
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +2 -0
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +5 -0
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +18 -4
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +17 -4
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +1 -1
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +11 -0
- package/dist/dist-esm/react-components/src/theming/icons.js +33 -7
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.d.ts +48 -0
- package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js +4 -0
- package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js.map +1 -0
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +21 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/types/index.js +1 -0
- package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +2 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +65 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +13 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +69 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +53 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +103 -21
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +21 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +9 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +4 -32
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +16 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +3 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +41 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +5 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +20 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.d.ts +20 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js +21 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +5 -87
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +15 -75
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +12 -6
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +17 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +66 -6
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +30 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +24 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +5 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +27 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +19 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +68 -6
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +60 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js +107 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js +38 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +30 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +286 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +83 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +81 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/components → common/ControlBar}/DesktopMoreButton.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +193 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/ControlBar}/PeopleButton.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/ControlBar}/PeopleButton.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/components → common/Drawer}/MoreDrawer.d.ts +15 -2
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/components → common/Drawer}/MoreDrawer.js +113 -9
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.js +24 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/Drawer}/PreparedMoreDrawer.d.ts +3 -2
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js +26 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.d.ts +20 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.js +55 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js +25 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/common/constants.js +11 -0
- package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +13 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +8 -14
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.js +9 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +165 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/utils.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/index.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +66 -1
- package/package.json +15 -16
- package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.d.ts +0 -14
- package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +0 -19
- package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +0 -27
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +0 -190
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.d.ts +0 -67
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js +0 -75
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeopleButton.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js +0 -22
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +0 -65
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StreamUtils.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/StreamUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAEL,gBAAgB,EAChB,mBAAmB,EAEpB,MAAM,8BAA8B,CAAC;AAItC,OAAO,EACL,6CAA6C,EAC7C,+CAA+C,EAC/C,kDAAkD,EACnD,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,6BAA6B,EAAE,SAAS,EAAE,gCAAgC;AACnF,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAY7D,SAAe,qBAAqB,CAClC,OAAoB,EACpB,eAAoC,EACpC,MAAc,EACd,aAAmD,EACnD,MAA8B,EAC9B,OAA2B;;QAE3B,kDAAkD;QAClD,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAC;QAC3B,IAAI,cAAc,CAAC;QACnB,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;YACrC,cAAc,GAAG,aAAa,CAAC;SAChC;aAAM;YACL,cAAc,GAAG,6BAA6B,CAAC,aAAa,CAAC,CAAC;SAC/D;QACD,MAAM,aAAa,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;QAE3D,SAAS,CAAC,qBAAqB,EAAE;YAC/B,IAAI,EAAE,UAAU,CAAC,oBAAoB;YACrC,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,uCAAuC;YAChD,IAAI,EAAE,aAAa;SACpB,CAAC,CAAC;QACH,MAAM,UAAU,GAAG,eAAe,CAAC,iCAAiC,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;QAEvG,IAAI,CAAC,UAAU,EAAE;YACf,SAAS,CAAC,qBAAqB,EAAE;gBAC/B,IAAI,EAAE,UAAU,CAAC,uBAAuB;gBACxC,KAAK,EAA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oC,EACpC,MAAc;IAEd,MAAM,WAAW,GAAG,eAAe,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC;IACvE,IAAI,WAAW,EAAE;QACf,KAAK,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE;YACxE,KAAK,MAAM,CAAC,CAAC,EAAE,uBAAuB,CAAC,IAAI,kBAAkB,CAAC,OAAO,EAAE,EAAE;gBACvE,+GAA+G;gBAC/G,+GAA+G;gBAC/G,WAAW,CACT,OAAO,EACP,eAAe,EACf,MAAM,EACN,cAAc,EACd,+CAA+C,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAChF,CAAC;aACH;SACF;KACF;IACD,MAAM,sBAAsB,GAAG,eAAe,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC1E,IAAI,sBAAsB,IAAI,sBAAsB,CAAC,QAAQ,EAAE;QAC7D,+GAA+G;QAC/G,+GAA+G;QAC/G,WAAW,CACT,OAAO,EACP,eAAe,EACf,MAAM,EACN,SAAS,EACT,6CAA6C,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAC7E,CAAC;KACH;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,OAAoB,EAAE,eAAoC;IACxF,MAAM,OAAO,GAAG,eAAe,CAAC,UAAU,EAAE,CAAC;IAC7C,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,uBAAuB,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;KAC3D;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CreateViewOptions,\n LocalVideoStream,\n VideoStreamRenderer,\n VideoStreamRendererView\n} from '@azure/communication-calling';\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { LocalVideoStreamState, RemoteVideoStreamState } from './CallClientState';\nimport { CallContext } from './CallContext';\nimport {\n convertSdkLocalStreamToDeclarativeLocalStream,\n convertSdkRemoteStreamToDeclarativeRemoteStream,\n convertFromSDKToDeclarativeVideoStreamRendererView\n} from './Converter';\nimport { InternalCallContext } from './InternalCallContext';\nimport { toFlatCommunicationIdentifier, _logEvent } from '@internal/acs-ui-common';\nimport { callingStatefulLogger, EventNames } from './Logger';\n\n/**\n * Return result from {@link StatefulCallClient.createView}.\n *\n * @public\n */\nexport type CreateViewResult = {\n renderer: VideoStreamRenderer;\n view: VideoStreamRendererView;\n};\n\nasync function createViewRemoteVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string,\n participantId: CommunicationIdentifierKind | string,\n stream: RemoteVideoStreamState,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n // Render RemoteVideoStream that is part of a Call\n const streamId = stream.id;\n let participantKey;\n if (typeof participantId === 'string') {\n participantKey = participantId;\n } else {\n participantKey = toFlatCommunicationIdentifier(participantId);\n }\n const streamLogInfo = { callId, participantKey, streamId };\n\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATING_REMOTE_VIEW,\n level: 'info',\n message: 'Start creating view for remote video.',\n data: streamLogInfo\n });\n const renderInfo = internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId);\n\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_NOT_FOUND,\n level: 'error',\n message: 'RemoteVideoStream not found in state.',\n data: streamLogInfo\n });\n console.warn('RemoteVideoStream not found in state');\n return;\n }\n\n if (renderInfo.status === 'Rendered') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_ALREADY_RENDERED,\n level: 'warning',\n message: 'RemoteVideoStream is already rendered.',\n data: streamLogInfo\n });\n console.warn('RemoteVideoStream is already rendered');\n return;\n }\n\n if (renderInfo.status === 'Rendering') {\n // Do not log to console here as this is a very common situation due to UI rerenders while\n // the video rendering is in progress.\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_RENDERING,\n level: 'warning',\n message: 'RemoteVideoStream is rendering.',\n data: streamLogInfo\n });\n return;\n }\n\n // \"Stopping\" only happens if the stream was in \"rendering\" but `disposeView` was called.\n // Now that `createView` has been re-called, we can flip the state back to \"rendering\".\n if (renderInfo.status === 'Stopping') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_STOPPING,\n level: 'warning',\n message: 'RemoteVideoStream was marked as stopping by dispose view. Resetting state to \"Rendering\".'\n });\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n renderInfo.stream,\n 'Rendering',\n renderInfo.renderer\n );\n return;\n }\n\n const renderer = new VideoStreamRenderer(renderInfo.stream);\n\n internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Rendering', undefined);\n\n let view;\n try {\n view = await renderer.createView(options);\n } catch (e) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATE_REMOTE_STREAM_FAIL,\n level: 'error',\n message: 'Failed to create remote view',\n data: streamLogInfo\n });\n internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'NotRendered', undefined);\n throw e;\n }\n\n // Since render could take some time, we need to check if the stream is still valid and if we received a signal to\n // stop rendering.\n const refreshedRenderInfo = internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId);\n if (!refreshedRenderInfo) {\n // RenderInfo was removed. This should not happen unless stream was removed from the call so dispose the renderer\n // and clean up state.\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_RENDER_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find remote render info after create the view.',\n data: streamLogInfo\n });\n renderer.dispose();\n context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);\n return;\n }\n\n if (refreshedRenderInfo.status === 'Stopping') {\n // Stop render was called on this stream after we had started rendering. We will dispose this view and do not\n // put the view into the state.\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_CREATED_STREAM_STOPPING,\n level: 'warning',\n message: 'Render info status is stopping, dispose renderer.',\n data: streamLogInfo\n });\n renderer.dispose();\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n refreshedRenderInfo.stream,\n 'NotRendered',\n undefined\n );\n context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);\n return;\n }\n\n // Else the stream still exists and status is not telling us to stop rendering. Complete the render process by\n // updating the state.\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n refreshedRenderInfo.stream,\n 'Rendered',\n renderer\n );\n context.setRemoteVideoStreamRendererView(\n callId,\n participantKey,\n streamId,\n convertFromSDKToDeclarativeVideoStreamRendererView(view)\n );\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_VIEW_RENDER_SUCCEED,\n level: 'info',\n message: `Successfully render the remote view.`,\n data: {\n streamLogInfo\n }\n });\n\n return {\n renderer,\n view\n };\n}\n\nasync function createViewLocalVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_LOCAL_STREAM_RENDERING,\n level: 'info',\n message: 'Start creating view for local video.'\n });\n // Render LocalVideoStream that is part of a Call\n const renderInfo = internalContext.getLocalRenderInfo(callId);\n\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_NOT_FOUND,\n level: 'error',\n message: 'LocalVideoStream not found in state.'\n });\n console.warn('LocalVideoStream not found in state');\n return;\n }\n\n if (renderInfo.status === 'Rendered') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_ALREADY_RENDERED,\n level: 'warning',\n message: 'LocalVideoStream is already rendered.'\n });\n console.warn('LocalVideoStream is already rendered');\n return;\n }\n\n if (renderInfo.status === 'Rendering') {\n // Do not log to console here as this is a very common situation due to UI rerenders while\n // the video rendering is in progress.\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_RENDERING,\n level: 'warning',\n message: 'LocalVideoStream is rendering.'\n });\n return;\n }\n\n // \"Stopping\" only happens if the stream was in \"rendering\" but `disposeView` was called.\n // Now that `createView` has been re-called, we can flip the state back to \"rendering\".\n if (renderInfo.status === 'Stopping') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_STOPPING,\n level: 'warning',\n message: 'LocalVideoStream was marked as stopping by dispose view. Resetting state to \"Rendering\".'\n });\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Rendering', renderInfo.renderer);\n return;\n }\n\n const renderer = new VideoStreamRenderer(renderInfo.stream);\n\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Rendering', renderer);\n\n let view;\n try {\n view = await renderer.createView(options);\n } catch (e) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATE_LOCAL_STREAM_FAIL,\n level: 'error',\n message: 'Failed to create view.',\n data: {\n error: e\n }\n });\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'NotRendered', undefined);\n throw e;\n }\n\n // Since render could take some time, we need to check if the stream is still valid and if we received a signal to\n // stop rendering.\n const refreshedRenderInfo = internalContext.getLocalRenderInfo(callId);\n if (!refreshedRenderInfo) {\n // RenderInfo was removed. This should not happen unless stream was removed from the call so dispose the renderer\n // and clean up the state.\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_RENDER_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find local render info after create the view. ',\n data: {\n callId\n }\n });\n renderer.dispose();\n context.setLocalVideoStreamRendererView(callId, undefined);\n return;\n }\n\n if (refreshedRenderInfo.status === 'Stopping') {\n // Stop render was called on this stream after we had started rendering. We will dispose this view and do not\n // put the view into the state.\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_CREATED_STREAM_STOPPING,\n level: 'warning',\n message: 'Render info status is stopping, dispose renderer.',\n data: {\n callId\n }\n });\n renderer.dispose();\n internalContext.setLocalRenderInfo(callId, refreshedRenderInfo.stream, 'NotRendered', undefined);\n context.setLocalVideoStreamRendererView(callId, undefined);\n return;\n }\n\n // Else The stream still exists and status is not telling us to stop rendering. Complete the render process by\n // updating the state.\n internalContext.setLocalRenderInfo(callId, refreshedRenderInfo.stream, 'Rendered', renderer);\n context.setLocalVideoStreamRendererView(callId, convertFromSDKToDeclarativeVideoStreamRendererView(view));\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_VIEW_RENDER_SUCCEED,\n level: 'info',\n message: `Successfully render the local view.`,\n data: {\n callId\n }\n });\n\n return {\n renderer,\n view\n };\n}\n\nasync function createViewUnparentedVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n stream: LocalVideoStreamState,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n const renderInfo = internalContext.getUnparentedRenderInfo(stream);\n\n if (renderInfo && renderInfo.status === 'Rendered') {\n console.warn('Unparented LocalVideoStream is already rendered');\n return;\n }\n\n if (renderInfo && renderInfo.status === 'Rendering') {\n // Do not log to console here as this is a very common situation due to UI rerenders while\n // the video rendering is in progress.\n return;\n }\n\n if (renderInfo && renderInfo.status === 'Stopping') {\n console.warn('Unparented LocalVideoStream is in the middle of stopping');\n return;\n }\n\n const localVideoStream = new LocalVideoStream(stream.source);\n const renderer = new VideoStreamRenderer(localVideoStream);\n\n internalContext.setUnparentedRenderInfo(stream, localVideoStream, 'Rendering', undefined);\n\n let view: VideoStreamRendererView;\n try {\n view = await renderer.createView(options);\n } catch (e) {\n // Special case for unparented views. Since they are not tied to anything and created by us based on the calls to\n // this function we'll delete it to clean up the data since keeping it around doesn't help us and if developer wants\n // to create a new view they can check that the view is not rendered and call this function again.\n internalContext.deleteUnparentedRenderInfo(stream);\n throw e;\n }\n\n // Since render could take some time, we need to check if the stream is still valid and if we received a signal to\n // stop rendering.\n const refreshedRenderInfo = internalContext.getUnparentedRenderInfo(stream);\n if (!refreshedRenderInfo) {\n // Unparented stream's RenderInfo was deleted. Currently this shouldn't happen but if it does we'll just dispose the\n // renderer and clean up state. If developer wanted the stream they could call this function again and that should\n // generate new working state via this function.\n renderer.dispose();\n context.deleteDeviceManagerUnparentedView(stream);\n return;\n }\n\n if (refreshedRenderInfo.status === 'Stopping') {\n // Stop render was called on this stream after we had started rendering. We will dispose this view and do not\n // put the view into the state. Special case for unparented views, delete them from state when stopped to free up\n // the memory since we were the ones generating this and not tied to any Call state.\n internalContext.deleteUnparentedRenderInfo(stream);\n context.deleteDeviceManagerUnparentedView(stream);\n return;\n }\n\n // Else the stream still exists and status is not telling us to stop rendering. Complete the render process by\n // updating the state.\n internalContext.setUnparentedRenderInfo(stream, localVideoStream, 'Rendered', renderer);\n context.setDeviceManagerUnparentedView(stream, convertFromSDKToDeclarativeVideoStreamRendererView(view));\n\n return {\n renderer,\n view\n };\n}\n\nfunction disposeViewRemoteVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string,\n participantId: CommunicationIdentifierKind | string,\n stream: RemoteVideoStreamState\n): void {\n const streamId = stream.id;\n\n let participantKey;\n if (typeof participantId === 'string') {\n participantKey = participantId;\n } else {\n participantKey = toFlatCommunicationIdentifier(participantId);\n }\n\n const streamLogInfo = { callId, participantKey, streamId };\n\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_DISPOSE_REMOTE_STREAM,\n level: 'info',\n message: 'Start disposing remote stream.',\n data: streamLogInfo\n });\n\n context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);\n\n const renderInfo = internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId);\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_DISPOSE_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find render info when disposing remote stream.',\n data: streamLogInfo\n });\n return;\n }\n\n // Nothing to dispose of or clean up -- we can safely exit early here.\n if (renderInfo.status === 'NotRendered') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_ALREADY_DISPOSED,\n level: 'info',\n message: 'RemoteVideoStream is already disposed.',\n data: streamLogInfo\n });\n return;\n }\n\n // Status is already marked as \"stopping\" so we can exit early here. This is because stopping only occurs\n // when the stream is being created in createView but hasn't been completed being created yet. The createView\n // method will see the \"stopping\" status and perform the cleanup\n if (renderInfo.status === 'Stopping') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_STOPPING,\n level: 'info',\n message: 'Remote stream is already stopping.',\n data: streamLogInfo\n });\n return;\n }\n\n // If the stream is in the middle of being rendered (i.e. has state \"Rendering\"), we need the status as\n // \"stopping\" without performing any cleanup. This will tell the `createView` method that it should stop\n // rendering and clean up the state once the view has finished being created.\n if (renderInfo.status === 'Rendering') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_STOPPING,\n level: 'info',\n message: 'Remote stream is still rendering. Changing status to stopping.',\n data: streamLogInfo\n });\n internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Stopping', undefined);\n return;\n }\n\n // Else the state must be in the \"Rendered\" state, so we can dispose the renderer and clean up the state.\n internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'NotRendered', undefined);\n\n if (renderInfo.renderer) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSING_REMOTE_RENDERER,\n level: 'info',\n message: 'Disposing remote view renderer.',\n data: streamLogInfo\n });\n renderInfo.renderer.dispose();\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_RENDERER_NOT_FOUND,\n level: 'error',\n message: 'Cannot find remote view renderer.',\n data: streamLogInfo\n });\n }\n}\n\nfunction disposeViewLocalVideo(context: CallContext, internalContext: InternalCallContext, callId: string): void {\n const streamLogInfo = { callId };\n\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_DISPOSE_LOCAL_STREAM,\n level: 'info',\n message: 'Start disposing local stream.',\n data: streamLogInfo\n });\n\n const renderInfo = internalContext.getLocalRenderInfo(callId);\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_DISPOSE_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find render info when disposing local stream.',\n data: streamLogInfo\n });\n return;\n }\n\n // Nothing to dispose of or clean up -- we can safely exit early here.\n if (renderInfo.status === 'NotRendered') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_ALREADY_DISPOSED,\n level: 'info',\n message: 'LocalVideoStream is already disposed.'\n });\n return;\n }\n\n // Status is already marked as \"stopping\" so we can exit early here. This is because stopping only occurs\n // when the stream is being created in createView but hasn't been completed being created yet. The createView\n // method will see the \"stopping\" status and perform the cleanup\n if (renderInfo.status === 'Stopping') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_STOPPING,\n level: 'info',\n message: 'Local stream is already stopping.',\n data: streamLogInfo\n });\n return;\n }\n\n // If the stream is in the middle of being rendered (i.e. has state \"Rendering\"), we need the status as\n // \"stopping\" without performing any cleanup. This will tell the `createView` method that it should stop\n // rendering and clean up the state once the view has finished being created.\n if (renderInfo.status === 'Rendering') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_STOPPING,\n level: 'info',\n message: 'Remote stream is still rendering. Changing status to stopping.',\n data: streamLogInfo\n });\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Stopping', renderInfo.renderer);\n return;\n }\n\n if (renderInfo.renderer) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSING_LOCAL_RENDERER,\n level: 'info',\n message: 'Disposing local view renderer.',\n data: streamLogInfo\n });\n renderInfo.renderer.dispose();\n\n // We will after disposing of the renderer tell the internal context and context that the\n // local view is gone so we need to update their states.\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'NotRendered', undefined);\n context.setLocalVideoStreamRendererView(callId, undefined);\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_RENDERER_NOT_FOUND,\n level: 'error',\n message: 'Cannot find renderer when disposing local stream.',\n data: streamLogInfo\n });\n }\n}\n\nfunction disposeViewUnparentedVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n stream: LocalVideoStreamState\n): void {\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_DISPOSE_LOCAL_STREAM,\n level: 'info',\n message: 'Start disposing unparented local stream.'\n });\n\n context.deleteDeviceManagerUnparentedView(stream);\n\n const renderInfo = internalContext.getUnparentedRenderInfo(stream);\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_DISPOSE_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find render info when disposing unparented local stream.'\n });\n return;\n }\n\n if (renderInfo.status === 'Rendering') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_STOPPING,\n level: 'info',\n message: 'Unparented local stream is still rendering. Changing status to stopping.'\n });\n internalContext.setUnparentedRenderInfo(stream, renderInfo.stream, 'Stopping', undefined);\n } else {\n internalContext.deleteUnparentedRenderInfo(stream);\n }\n\n if (renderInfo.renderer) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSING_LOCAL_RENDERER,\n level: 'info',\n message: 'Disposing unparented local view renderer.'\n });\n renderInfo.renderer.dispose();\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_RENDERER_NOT_FOUND,\n level: 'error',\n message: 'Cannot find renderer when disposing unparented local stream.'\n });\n }\n}\n\n/**\n * @private\n */\nexport function createView(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string | undefined,\n participantId: CommunicationIdentifierKind | string | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n if ('id' in stream && callId && participantId) {\n // Render RemoteVideoStream that is part of a Call\n return createViewRemoteVideo(context, internalContext, callId, participantId, stream, options);\n } else if (!('id' in stream) && callId) {\n // Render LocalVideoStream that is part of a Call\n return createViewLocalVideo(context, internalContext, callId, options);\n } else if (!('id' in stream) && !callId) {\n // Render LocalVideoStream that is not part of a Call\n // Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).\n // We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.\n return context.withAsyncErrorTeedToState(\n async () => await createViewUnparentedVideo(context, internalContext, stream, options),\n 'Call.startVideo'\n )();\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATE_STREAM_INVALID_PARAMS,\n level: 'warning',\n message: 'Create View invalid combination of parameters.'\n });\n return Promise.resolve(undefined);\n }\n}\n\n/**\n * @private\n */\nexport function disposeView(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string | undefined,\n participantId: CommunicationIdentifierKind | string | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState\n): void {\n if ('id' in stream && callId && participantId) {\n // Stop rendering RemoteVideoStream that is part of a Call\n disposeViewRemoteVideo(context, internalContext, callId, participantId, stream);\n } else if (!('id' in stream) && callId) {\n // Stop rendering LocalVideoStream that is part of a Call\n disposeViewLocalVideo(context, internalContext, callId);\n } else if (!('id' in stream) && !callId) {\n // Stop rendering LocalVideoStream that is not part of a Call\n // Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).\n // We do not have a stopLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.\n context.withErrorTeedToState(\n () => disposeViewUnparentedVideo(context, internalContext, stream),\n 'Call.stopVideo'\n )();\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSE_STREAM_INVALID_PARAMS,\n level: 'warning',\n message: 'Dispose View invalid combination of parameters.'\n });\n return;\n }\n}\n\n/**\n * @private\n * Only stops videos that are tied to a Call.\n */\nexport function disposeAllViewsFromCall(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string\n): void {\n const callStreams = internalContext.getRemoteRenderInfoForCall(callId);\n if (callStreams) {\n for (const [participantKey, participantStreams] of callStreams.entries()) {\n for (const [_, remoteStreamAndRenderer] of participantStreams.entries()) {\n // We don't want to accept SDK stream as parameter but we also don't cache the declarative stream so we have to\n // convert the SDK stream to declarative stream which is not pretty so this could use some further refactoring.\n disposeView(\n context,\n internalContext,\n callId,\n participantKey,\n convertSdkRemoteStreamToDeclarativeRemoteStream(remoteStreamAndRenderer.stream)\n );\n }\n }\n }\n const localStreamAndRenderer = internalContext.getLocalRenderInfo(callId);\n if (localStreamAndRenderer && localStreamAndRenderer.renderer) {\n // We don't want to accept SDK stream as parameter but we also don't cache the declarative stream so we have to\n // convert the SDK stream to declarative stream which is not pretty so this could use some further refactoring.\n disposeView(\n context,\n internalContext,\n callId,\n undefined,\n convertSdkLocalStreamToDeclarativeLocalStream(localStreamAndRenderer.stream)\n );\n }\n}\n\n/**\n * @private\n */\nexport function disposeAllViews(context: CallContext, internalContext: InternalCallContext): void {\n const callIds = internalContext.getCallIds();\n for (const callId of callIds) {\n disposeAllViewsFromCall(context, internalContext, callId);\n }\n}\n\"../../acs-ui-common/src\""]}
|
1
|
+
{"version":3,"file":"StreamUtils.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/StreamUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAEL,gBAAgB,EAEhB,mBAAmB,EAEpB,MAAM,8BAA8B,CAAC;AAItC,OAAO,EACL,6CAA6C,EAC7C,+CAA+C,EAC/C,kDAAkD,EACnD,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,6BAA6B,EAAa,gCAAgC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAYvD,SAAe,eAAe,CAC5B,OAAoB,EACpB,eAAoC,EACpC,MAAc,EACd,MAAuD,EACvD,aAAoD,EACpD,OAA2B;;QAE3B,yCAAyC;QACzC,IAAI,eAAgF,CAAC;QAErF,6GAA6G;QAE7G,IAAI,aAAa,EAAE;YACjB,eAAe,GAAG,kBAAkB,CAAC;SACtC;aAAM,IAAI,MAAM,EAAE;YACjB,eAAe,GAAG,iBAAiB,CAAC;SACrC;aAAM;YACL,wCAAwC;YACxC,MAAM,I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,CACT,OAAO,EACP,eAAe,EACf,MAAM,EACN,SAAS,EACT,6CAA6C,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAC7E,CAAC;KACH;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,OAAoB,EAAE,eAAoC;IACxF,MAAM,OAAO,GAAG,eAAe,CAAC,UAAU,EAAE,CAAC;IAC7C,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,uBAAuB,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;KAC3D;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CreateViewOptions,\n LocalVideoStream,\n RemoteVideoStream,\n VideoStreamRenderer,\n VideoStreamRendererView\n} from '@azure/communication-calling';\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { LocalVideoStreamState, RemoteVideoStreamState } from './CallClientState';\nimport { CallContext } from './CallContext';\nimport {\n convertSdkLocalStreamToDeclarativeLocalStream,\n convertSdkRemoteStreamToDeclarativeRemoteStream,\n convertFromSDKToDeclarativeVideoStreamRendererView\n} from './Converter';\nimport { InternalCallContext } from './InternalCallContext';\nimport { toFlatCommunicationIdentifier, _logEvent } from '@internal/acs-ui-common';\nimport { EventNames } from './Logger';\nimport { _logStreamEvent } from './StreamUtilsLogging';\n\n/**\n * Return result from {@link StatefulCallClient.createView}.\n *\n * @public\n */\nexport type CreateViewResult = {\n renderer: VideoStreamRenderer;\n view: VideoStreamRendererView;\n};\n\nasync function createViewVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string,\n stream?: RemoteVideoStreamState | LocalVideoStreamState,\n participantId?: CommunicationIdentifierKind | string,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n // we can only have 3 types of createView\n let streamEventType: 'createViewLocal' | 'createViewRemote' | 'createViewUnparented';\n\n // we will reuse these for local as well but we need to make sure the remote stream is passed in like before.\n\n if (participantId) {\n streamEventType = 'createViewRemote';\n } else if (callId) {\n streamEventType = 'createViewLocal';\n } else {\n // TODO update for when unparented view.\n throw new Error('unparented createView not implemented yet here');\n streamEventType = 'createViewUnparented';\n }\n\n const streamType = stream?.mediaStreamType;\n const streamId = (stream as RemoteVideoStream).id;\n\n // we want to check to see if there is a participantId this will tell us whether its a local stream or a remote one.\n const participantKey =\n streamEventType === 'createViewRemote' && participantId\n ? typeof participantId === 'string'\n ? participantId\n : toFlatCommunicationIdentifier(participantId)\n : undefined;\n\n const streamLogInfo = { callId, participantKey, streamId, streamType, streamEventType };\n\n // make different logging announcement based on whether or not we are starting a local or remote\n _logStreamEvent(EventNames.CREATING_VIEW, streamLogInfo);\n\n // if we have a participant Id and a stream get the remote info, else get the local render info from state.\n const renderInfo =\n streamEventType === 'createViewRemote' && participantKey\n ? internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId)\n : internalContext.getLocalRenderInfo(callId);\n\n if (!renderInfo) {\n _logStreamEvent(EventNames.STREAM_NOT_FOUND, streamLogInfo);\n return;\n }\n\n if (renderInfo.status === 'Rendered') {\n _logStreamEvent(EventNames.STREAM_ALREADY_RENDERED, streamLogInfo);\n return;\n }\n\n if (renderInfo.status === 'Rendering') {\n // Do not log to console here as this is a very common situation due to UI rerenders while\n // the video rendering is in progress.\n _logStreamEvent(EventNames.STREAM_RENDERING, streamLogInfo);\n return;\n }\n\n // \"Stopping\" only happens if the stream was in \"rendering\" but `disposeView` was called.\n // Now that `createView` has been re-called, we can flip the state back to \"rendering\".\n if (renderInfo.status === 'Stopping') {\n if (streamEventType === 'createViewRemote' && participantKey) {\n _logStreamEvent(EventNames.STREAM_STOPPING, streamLogInfo);\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n renderInfo.stream as RemoteVideoStream,\n 'Rendering',\n renderInfo.renderer\n );\n } else if (streamEventType === 'createViewLocal') {\n _logStreamEvent(EventNames.STREAM_STOPPING, streamLogInfo);\n internalContext.setLocalRenderInfo(\n callId,\n renderInfo.stream as LocalVideoStream,\n 'Rendering',\n renderInfo.renderer\n );\n }\n return;\n }\n\n const renderer = new VideoStreamRenderer(renderInfo.stream);\n\n streamEventType === 'createViewRemote' && participantKey\n ? internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n renderInfo.stream as RemoteVideoStream,\n 'Rendering',\n undefined\n )\n : internalContext.setLocalRenderInfo(callId, renderInfo.stream as LocalVideoStream, 'Rendering', renderer);\n\n let view;\n try {\n view = await renderer.createView(options);\n } catch (e) {\n if (streamEventType === 'createViewRemote' && participantKey) {\n _logStreamEvent(EventNames.CREATE_STREAM_FAIL, streamLogInfo);\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n renderInfo.stream as RemoteVideoStream,\n 'NotRendered',\n undefined\n );\n } else if (streamEventType === 'createViewLocal') {\n _logStreamEvent(EventNames.CREATE_STREAM_FAIL, streamLogInfo, e);\n internalContext.setLocalRenderInfo(callId, renderInfo.stream as LocalVideoStream, 'NotRendered', undefined);\n }\n throw e;\n }\n\n // Since render could take some time, we need to check if the stream is still valid and if we received a signal to\n // stop rendering.\n const refreshedRenderInfo =\n streamEventType === 'createViewRemote' && participantKey\n ? internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId)\n : internalContext.getLocalRenderInfo(callId);\n\n if (!refreshedRenderInfo) {\n // RenderInfo was removed. This should not happen unless stream was removed from the call so dispose the renderer\n // and clean up the state.\n _logStreamEvent(EventNames.RENDER_INFO_NOT_FOUND, streamLogInfo);\n renderer.dispose();\n streamEventType === 'createViewRemote' && participantKey\n ? context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined)\n : context.setLocalVideoStreamRendererView(callId, undefined);\n return;\n }\n\n if (refreshedRenderInfo.status === 'Stopping') {\n // Stop render was called on this stream after we had started rendering. We will dispose this view and do not\n // put the view into the state.\n streamEventType === 'createViewRemote';\n _logStreamEvent(EventNames.CREATED_STREAM_STOPPING, streamLogInfo);\n renderer.dispose();\n if (streamEventType === 'createViewRemote' && participantKey) {\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n refreshedRenderInfo.stream as RemoteVideoStream,\n 'NotRendered',\n undefined\n );\n context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);\n } else if (streamEventType === 'createViewLocal') {\n internalContext.setLocalRenderInfo(\n callId,\n refreshedRenderInfo.stream as LocalVideoStream,\n 'NotRendered',\n undefined\n );\n context.setLocalVideoStreamRendererView(callId, undefined);\n }\n return;\n }\n\n // Else the stream still exists and status is not telling us to stop rendering. Complete the render process by\n // updating the state.\n if (streamEventType === 'createViewRemote' && participantKey) {\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n refreshedRenderInfo.stream as RemoteVideoStream,\n 'Rendered',\n renderer\n );\n context.setRemoteVideoStreamRendererView(\n callId,\n participantKey,\n streamId,\n convertFromSDKToDeclarativeVideoStreamRendererView(view)\n );\n _logStreamEvent(EventNames.VIEW_RENDER_SUCCEED, streamLogInfo);\n } else if (streamEventType === 'createViewLocal') {\n internalContext.setLocalRenderInfo(callId, refreshedRenderInfo.stream as LocalVideoStream, 'Rendered', renderer);\n context.setLocalVideoStreamRendererView(callId, convertFromSDKToDeclarativeVideoStreamRendererView(view));\n _logStreamEvent(EventNames.VIEW_RENDER_SUCCEED, streamLogInfo);\n }\n\n return {\n renderer,\n view\n };\n}\n\nasync function createViewUnparentedVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n stream: LocalVideoStreamState,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n const renderInfo = internalContext.getUnparentedRenderInfo(stream);\n\n if (renderInfo && renderInfo.status === 'Rendered') {\n console.warn('Unparented LocalVideoStream is already rendered');\n return;\n }\n\n if (renderInfo && renderInfo.status === 'Rendering') {\n // Do not log to console here as this is a very common situation due to UI rerenders while\n // the video rendering is in progress.\n return;\n }\n\n if (renderInfo && renderInfo.status === 'Stopping') {\n console.warn('Unparented LocalVideoStream is in the middle of stopping');\n return;\n }\n\n const localVideoStream = new LocalVideoStream(stream.source);\n const renderer = new VideoStreamRenderer(localVideoStream);\n\n internalContext.setUnparentedRenderInfo(stream, localVideoStream, 'Rendering', undefined);\n\n let view: VideoStreamRendererView;\n try {\n view = await renderer.createView(options);\n } catch (e) {\n // Special case for unparented views. Since they are not tied to anything and created by us based on the calls to\n // this function we'll delete it to clean up the data since keeping it around doesn't help us and if developer wants\n // to create a new view they can check that the view is not rendered and call this function again.\n internalContext.deleteUnparentedRenderInfo(stream);\n throw e;\n }\n\n // Since render could take some time, we need to check if the stream is still valid and if we received a signal to\n // stop rendering.\n const refreshedRenderInfo = internalContext.getUnparentedRenderInfo(stream);\n if (!refreshedRenderInfo) {\n // Unparented stream's RenderInfo was deleted. Currently this shouldn't happen but if it does we'll just dispose the\n // renderer and clean up state. If developer wanted the stream they could call this function again and that should\n // generate new working state via this function.\n renderer.dispose();\n context.deleteDeviceManagerUnparentedView(stream);\n return;\n }\n\n if (refreshedRenderInfo.status === 'Stopping') {\n // Stop render was called on this stream after we had started rendering. We will dispose this view and do not\n // put the view into the state. Special case for unparented views, delete them from state when stopped to free up\n // the memory since we were the ones generating this and not tied to any Call state.\n internalContext.deleteUnparentedRenderInfo(stream);\n context.deleteDeviceManagerUnparentedView(stream);\n return;\n }\n // Else the stream still exists and status is not telling us to stop rendering. Complete the render process by\n // updating the state.\n internalContext.setUnparentedRenderInfo(stream, localVideoStream, 'Rendered', renderer);\n internalContext.subscribeToUnparentedViewVideoEffects(localVideoStream, context);\n context.setDeviceManagerUnparentedView(stream, convertFromSDKToDeclarativeVideoStreamRendererView(view));\n\n return {\n renderer,\n view\n };\n}\n\nfunction disposeViewVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string,\n stream: RemoteVideoStreamState | LocalVideoStreamState,\n participantId?: CommunicationIdentifierKind | string\n): void {\n // we can only have 3 types of createView\n let streamEventType: 'disposeViewLocal' | 'disposeViewRemote' | 'disposeViewUnparented';\n\n // we will reuse these for local as well but we need to make sure the remote stream is passed in like before.\n\n if (participantId) {\n streamEventType = 'disposeViewRemote';\n } else if (callId) {\n streamEventType = 'disposeViewLocal';\n } else {\n // TODO update for when unparented view.\n streamEventType = 'disposeViewUnparented';\n }\n\n const streamType = stream.mediaStreamType;\n const streamId = (stream as RemoteVideoStream).id;\n\n // we want to check to see if there is a participantId this will tell us whether its a local stream or a remote one.\n const participantKey =\n streamEventType === 'disposeViewRemote' && participantId\n ? typeof participantId === 'string'\n ? participantId\n : toFlatCommunicationIdentifier(participantId)\n : undefined;\n const streamLogInfo = { callId, participantKey, streamId, streamType };\n\n _logStreamEvent(EventNames.START_DISPOSE_STREAM, streamLogInfo);\n\n if (streamEventType === 'disposeViewRemote' && participantKey) {\n context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);\n }\n\n const renderInfo =\n streamEventType === 'disposeViewRemote' && participantKey\n ? internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId)\n : internalContext.getLocalRenderInfo(callId);\n\n if (!renderInfo) {\n _logStreamEvent(EventNames.DISPOSE_INFO_NOT_FOUND, streamLogInfo);\n return;\n }\n\n // Nothing to dispose of or clean up -- we can safely exit early here.\n if (renderInfo.status === 'NotRendered') {\n _logStreamEvent(EventNames.STREAM_ALREADY_DISPOSED, streamLogInfo);\n return;\n }\n\n // Status is already marked as \"stopping\" so we can exit early here. This is because stopping only occurs\n // when the stream is being created in createView but hasn't been completed being created yet. The createView\n // method will see the \"stopping\" status and perform the cleanup\n if (renderInfo.status === 'Stopping') {\n _logStreamEvent(EventNames.STREAM_STOPPING, streamLogInfo);\n return;\n }\n\n // If the stream is in the middle of being rendered (i.e. has state \"Rendering\"), we need the status as\n // \"stopping\" without performing any cleanup. This will tell the `createView` method that it should stop\n // rendering and clean up the state once the view has finished being created.\n if (renderInfo.status === 'Rendering') {\n _logStreamEvent(EventNames.STREAM_STOPPING, streamLogInfo);\n streamEventType === 'disposeViewRemote' && participantKey\n ? internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n renderInfo.stream as RemoteVideoStream,\n 'Stopping',\n undefined\n )\n : internalContext.setLocalRenderInfo(\n callId,\n renderInfo.stream as LocalVideoStream,\n 'Stopping',\n renderInfo.renderer\n );\n return;\n }\n\n if (renderInfo.renderer) {\n _logStreamEvent(EventNames.DISPOSING_RENDERER, streamLogInfo);\n renderInfo.renderer.dispose();\n // Else the state must be in the \"Rendered\" state, so we can dispose the renderer and clean up the state.\n if (streamEventType === 'disposeViewRemote' && participantKey) {\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n renderInfo.stream as RemoteVideoStream,\n 'NotRendered',\n undefined\n );\n } else if (streamEventType === 'disposeViewLocal') {\n internalContext.setLocalRenderInfo(callId, renderInfo.stream as LocalVideoStream, 'NotRendered', undefined);\n context.setLocalVideoStreamRendererView(callId, undefined);\n }\n } else {\n _logStreamEvent(EventNames.RENDERER_NOT_FOUND, streamLogInfo);\n }\n}\n\nfunction disposeViewUnparentedVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n stream: LocalVideoStreamState\n): void {\n const streamType = stream.mediaStreamType;\n const streamLogInfo = { streamType, streamEventType: 'disposeViewUnparented' };\n\n _logStreamEvent(EventNames.START_DISPOSE_STREAM, streamLogInfo);\n\n context.deleteDeviceManagerUnparentedView(stream);\n\n const renderInfo = internalContext.getUnparentedRenderInfo(stream);\n if (!renderInfo) {\n _logStreamEvent(EventNames.DISPOSE_INFO_NOT_FOUND, streamLogInfo);\n return;\n }\n\n if (renderInfo.status === 'Rendering') {\n _logStreamEvent(EventNames.STREAM_STOPPING, streamLogInfo);\n internalContext.setUnparentedRenderInfo(stream, renderInfo.stream, 'Stopping', undefined);\n } else {\n internalContext.deleteUnparentedRenderInfo(stream);\n }\n\n if (renderInfo.renderer) {\n _logStreamEvent(EventNames.DISPOSING_RENDERER, streamLogInfo);\n renderInfo.renderer.dispose();\n } else {\n _logStreamEvent(EventNames.RENDERER_NOT_FOUND, streamLogInfo);\n }\n}\n\n/**\n * @private\n */\nexport function createView(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string | undefined,\n participantId: CommunicationIdentifierKind | string | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n const streamType = stream.mediaStreamType;\n\n if (callId) {\n return createViewVideo(context, internalContext, callId, stream, participantId, options);\n } else if (!('id' in stream) && !callId) {\n // Render LocalVideoStream that is not part of a Call\n // Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).\n // We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.\n return context.withAsyncErrorTeedToState(\n async () => await createViewUnparentedVideo(context, internalContext, stream, options),\n 'Call.startVideo'\n )();\n } else {\n _logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });\n return Promise.resolve(undefined);\n }\n}\n\n/**\n * @private\n */\nexport function disposeView(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string | undefined,\n participantId: CommunicationIdentifierKind | string | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState\n): void {\n const streamType = stream.mediaStreamType;\n if (callId) {\n disposeViewVideo(context, internalContext, callId, stream, participantId);\n } else if (!('id' in stream) && !callId) {\n // Stop rendering LocalVideoStream that is not part of a Call\n // Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).\n // We do not have a stopLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.\n context.withErrorTeedToState(\n () => disposeViewUnparentedVideo(context, internalContext, stream),\n 'Call.stopVideo'\n )();\n } else {\n _logStreamEvent(EventNames.DISPOSE_STREAM_INVALID_PARAMS, { streamType });\n return;\n }\n}\n\n/**\n * @private\n * Only stops videos that are tied to a Call.\n */\nexport function disposeAllViewsFromCall(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string\n): void {\n const callStreams = internalContext.getRemoteRenderInfoForCall(callId);\n if (callStreams) {\n for (const [participantKey, participantStreams] of callStreams.entries()) {\n for (const [_, remoteStreamAndRenderer] of participantStreams.entries()) {\n // We don't want to accept SDK stream as parameter but we also don't cache the declarative stream so we have to\n // convert the SDK stream to declarative stream which is not pretty so this could use some further refactoring.\n disposeView(\n context,\n internalContext,\n callId,\n participantKey,\n convertSdkRemoteStreamToDeclarativeRemoteStream(remoteStreamAndRenderer.stream)\n );\n }\n }\n }\n const localStreamAndRenderer = internalContext.getLocalRenderInfo(callId);\n if (localStreamAndRenderer && localStreamAndRenderer.renderer) {\n // We don't want to accept SDK stream as parameter but we also don't cache the declarative stream so we have to\n // convert the SDK stream to declarative stream which is not pretty so this could use some further refactoring.\n disposeView(\n context,\n internalContext,\n callId,\n undefined,\n convertSdkLocalStreamToDeclarativeLocalStream(localStreamAndRenderer.stream)\n );\n }\n}\n\n/**\n * @private\n */\nexport function disposeAllViews(context: CallContext, internalContext: InternalCallContext): void {\n const callIds = internalContext.getCallIds();\n for (const callId of callIds) {\n disposeAllViewsFromCall(context, internalContext, callId);\n }\n}\n\"../../acs-ui-common/src\""]}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { MediaStreamType } from '@azure/communication-calling';
|
2
|
+
import { EventNames } from './Logger';
|
3
|
+
/**
|
4
|
+
* helper function to fire streamUtils logging events
|
5
|
+
*
|
6
|
+
* @param eventName Name of event from streamUtils
|
7
|
+
* @param streamLogInfo informaiton about the event and who called it
|
8
|
+
* @param error if any errors present will be added to message in logging
|
9
|
+
*/
|
10
|
+
export declare function _logStreamEvent(eventName: EventNames, streamLogInfo: {
|
11
|
+
callId?: string;
|
12
|
+
participantKey?: any;
|
13
|
+
streamId?: number;
|
14
|
+
streamType?: MediaStreamType;
|
15
|
+
streamEventType?: string;
|
16
|
+
}, error?: unknown): void;
|
17
|
+
//# sourceMappingURL=StreamUtilsLogging.d.ts.map
|
@@ -0,0 +1,198 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT license.
|
3
|
+
import { _logEvent } from "../../acs-ui-common/src";
|
4
|
+
import { callingStatefulLogger, EventNames } from './Logger';
|
5
|
+
/**
|
6
|
+
* helper function to manage logging for stream disposals
|
7
|
+
*
|
8
|
+
* @param eventName Name of event that occured when managing streams
|
9
|
+
* @param streamLogInfo Data about the stream in the event
|
10
|
+
* @returns
|
11
|
+
*/
|
12
|
+
function _logDisposeStreamEvent(eventName, streamLogInfo) {
|
13
|
+
switch (eventName) {
|
14
|
+
case EventNames.DISPOSE_STREAM_INVALID_PARAMS:
|
15
|
+
_logEvent(callingStatefulLogger, {
|
16
|
+
name: EventNames.DISPOSE_STREAM_INVALID_PARAMS,
|
17
|
+
level: 'warning',
|
18
|
+
message: 'Dispose View invalid combination of parameters.',
|
19
|
+
data: { streamType: streamLogInfo.streamType }
|
20
|
+
});
|
21
|
+
return;
|
22
|
+
case EventNames.START_DISPOSE_STREAM:
|
23
|
+
_logEvent(callingStatefulLogger, {
|
24
|
+
name: EventNames.START_DISPOSE_STREAM,
|
25
|
+
level: 'info',
|
26
|
+
message: 'Start disposing stream.',
|
27
|
+
data: streamLogInfo
|
28
|
+
});
|
29
|
+
return;
|
30
|
+
case EventNames.DISPOSE_INFO_NOT_FOUND:
|
31
|
+
_logEvent(callingStatefulLogger, {
|
32
|
+
name: EventNames.DISPOSE_INFO_NOT_FOUND,
|
33
|
+
level: 'error',
|
34
|
+
message: 'Cannot find render info when disposing stream.',
|
35
|
+
data: streamLogInfo
|
36
|
+
});
|
37
|
+
return;
|
38
|
+
case EventNames.STREAM_STOPPING:
|
39
|
+
_logEvent(callingStatefulLogger, {
|
40
|
+
name: EventNames.STREAM_STOPPING,
|
41
|
+
level: 'info',
|
42
|
+
message: 'Stream is currently marked as stopping, will continue if is local preview',
|
43
|
+
data: streamLogInfo
|
44
|
+
});
|
45
|
+
return;
|
46
|
+
case EventNames.DISPOSING_RENDERER:
|
47
|
+
_logEvent(callingStatefulLogger, {
|
48
|
+
name: EventNames.DISPOSING_RENDERER,
|
49
|
+
level: 'info',
|
50
|
+
message: 'Disposing view renderer.',
|
51
|
+
data: streamLogInfo
|
52
|
+
});
|
53
|
+
return;
|
54
|
+
case EventNames.RENDERER_NOT_FOUND:
|
55
|
+
_logEvent(callingStatefulLogger, {
|
56
|
+
name: EventNames.RENDERER_NOT_FOUND,
|
57
|
+
level: 'error',
|
58
|
+
message: 'Cannot find renderer when disposing stream.',
|
59
|
+
data: streamLogInfo
|
60
|
+
});
|
61
|
+
return;
|
62
|
+
case EventNames.STREAM_ALREADY_DISPOSED:
|
63
|
+
_logEvent(callingStatefulLogger, {
|
64
|
+
name: EventNames.STREAM_ALREADY_DISPOSED,
|
65
|
+
level: 'info',
|
66
|
+
message: 'Stream is already disposed.',
|
67
|
+
data: streamLogInfo
|
68
|
+
});
|
69
|
+
return;
|
70
|
+
default:
|
71
|
+
return;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
/**
|
75
|
+
* helper function to manage logging for local stream creations
|
76
|
+
*
|
77
|
+
* @param eventName Name of the event to occured when creating a local stream
|
78
|
+
* @param streamLogInfo Data about the stream in the event
|
79
|
+
* @param error that is thrown by caller
|
80
|
+
* @returns
|
81
|
+
*/
|
82
|
+
function _logCreateStreamEvent(eventName, streamLogInfo, error) {
|
83
|
+
switch (eventName) {
|
84
|
+
case EventNames.CREATE_STREAM_INVALID_PARAMS:
|
85
|
+
_logEvent(callingStatefulLogger, {
|
86
|
+
name: EventNames.CREATE_STREAM_INVALID_PARAMS,
|
87
|
+
level: 'warning',
|
88
|
+
message: 'Create View invalid combination of parameters.',
|
89
|
+
data: { streamType: streamLogInfo.streamType }
|
90
|
+
});
|
91
|
+
return;
|
92
|
+
case EventNames.START_STREAM_RENDERING:
|
93
|
+
_logEvent(callingStatefulLogger, {
|
94
|
+
name: EventNames.START_STREAM_RENDERING,
|
95
|
+
level: 'info',
|
96
|
+
message: 'Start creating view for local video.',
|
97
|
+
data: streamLogInfo
|
98
|
+
});
|
99
|
+
return;
|
100
|
+
case EventNames.STREAM_NOT_FOUND:
|
101
|
+
_logEvent(callingStatefulLogger, {
|
102
|
+
name: EventNames.STREAM_NOT_FOUND,
|
103
|
+
level: 'error',
|
104
|
+
message: 'Stream not found in state.',
|
105
|
+
data: { callId: streamLogInfo.callId }
|
106
|
+
});
|
107
|
+
return;
|
108
|
+
case EventNames.STREAM_ALREADY_RENDERED:
|
109
|
+
_logEvent(callingStatefulLogger, {
|
110
|
+
name: EventNames.STREAM_ALREADY_RENDERED,
|
111
|
+
level: 'warning',
|
112
|
+
message: 'Stream is already rendered.',
|
113
|
+
data: streamLogInfo
|
114
|
+
});
|
115
|
+
return;
|
116
|
+
case EventNames.STREAM_RENDERING:
|
117
|
+
_logEvent(callingStatefulLogger, {
|
118
|
+
name: EventNames.STREAM_RENDERING,
|
119
|
+
level: 'warning',
|
120
|
+
message: 'Stream is rendering.',
|
121
|
+
data: streamLogInfo
|
122
|
+
});
|
123
|
+
return;
|
124
|
+
case EventNames.STREAM_STOPPING:
|
125
|
+
_logEvent(callingStatefulLogger, {
|
126
|
+
name: EventNames.STREAM_STOPPING,
|
127
|
+
level: 'warning',
|
128
|
+
message: 'Stream was marked as stopping by dispose view. Resetting state to "Rendering".',
|
129
|
+
data: streamLogInfo
|
130
|
+
});
|
131
|
+
return;
|
132
|
+
case EventNames.CREATE_STREAM_FAIL:
|
133
|
+
_logEvent(callingStatefulLogger, {
|
134
|
+
name: EventNames.CREATE_STREAM_FAIL,
|
135
|
+
level: 'error',
|
136
|
+
message: 'Failed to create view.',
|
137
|
+
data: {
|
138
|
+
error: error,
|
139
|
+
streamType: streamLogInfo.streamType,
|
140
|
+
callId: streamLogInfo.callId
|
141
|
+
}
|
142
|
+
});
|
143
|
+
return;
|
144
|
+
case EventNames.RENDER_INFO_NOT_FOUND:
|
145
|
+
_logEvent(callingStatefulLogger, {
|
146
|
+
name: EventNames.RENDER_INFO_NOT_FOUND,
|
147
|
+
level: 'error',
|
148
|
+
message: 'Cannot find render info after create the view. ',
|
149
|
+
data: streamLogInfo
|
150
|
+
});
|
151
|
+
return;
|
152
|
+
case EventNames.CREATED_STREAM_STOPPING:
|
153
|
+
_logEvent(callingStatefulLogger, {
|
154
|
+
name: EventNames.CREATED_STREAM_STOPPING,
|
155
|
+
level: 'warning',
|
156
|
+
message: 'Render info status is stopping, dispose renderer.',
|
157
|
+
data: streamLogInfo
|
158
|
+
});
|
159
|
+
return;
|
160
|
+
case EventNames.VIEW_RENDER_SUCCEED:
|
161
|
+
_logEvent(callingStatefulLogger, {
|
162
|
+
name: EventNames.VIEW_RENDER_SUCCEED,
|
163
|
+
level: 'info',
|
164
|
+
message: `Successfully render the view.`,
|
165
|
+
data: streamLogInfo
|
166
|
+
});
|
167
|
+
return;
|
168
|
+
case EventNames.CREATING_VIEW:
|
169
|
+
_logEvent(callingStatefulLogger, {
|
170
|
+
name: EventNames.CREATING_VIEW,
|
171
|
+
level: 'info',
|
172
|
+
message: 'Start creating view for remote video.',
|
173
|
+
data: streamLogInfo
|
174
|
+
});
|
175
|
+
return;
|
176
|
+
default:
|
177
|
+
return;
|
178
|
+
}
|
179
|
+
}
|
180
|
+
/**
|
181
|
+
* helper function to fire streamUtils logging events
|
182
|
+
*
|
183
|
+
* @param eventName Name of event from streamUtils
|
184
|
+
* @param streamLogInfo informaiton about the event and who called it
|
185
|
+
* @param error if any errors present will be added to message in logging
|
186
|
+
*/
|
187
|
+
export function _logStreamEvent(eventName, streamLogInfo, error) {
|
188
|
+
if (streamLogInfo.streamEventType === 'disposeViewLocal' ||
|
189
|
+
streamLogInfo.streamEventType === 'disposeViewRemote' ||
|
190
|
+
streamLogInfo.streamEventType === 'disposeViewUnparented') {
|
191
|
+
_logDisposeStreamEvent(eventName, streamLogInfo);
|
192
|
+
}
|
193
|
+
else if (streamLogInfo.streamEventType === 'createViewLocal' ||
|
194
|
+
streamLogInfo.streamEventType === 'createViewRemote') {
|
195
|
+
_logCreateStreamEvent(eventName, streamLogInfo, error);
|
196
|
+
}
|
197
|
+
}
|
198
|
+
//# sourceMappingURL=StreamUtilsLogging.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"StreamUtilsLogging.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/StreamUtilsLogging.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,gCAAgC;AACpD,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7D;;;;;;GAMG;AACH,SAAS,sBAAsB,CAC7B,SAAqB,EACrB,aAMC;IAED,QAAQ,SAAS,EAAE;QACjB,KAAK,UAAU,CAAC,6BAA6B;YAC3C,SAAS,CAAC,qBAAqB,EAAE;gBAC/B,IAAI,EAAE,UAAU,CAAC,6BAA6B;gBAC9C,KAAK,EAAE,SAAS;gBAChB,OAAO,EAAE,iDAAiD;gBAC1D,IAAI,EAAE,EAAE,UAAU,EAAE,aAAa,CAAC,UAAU,EAAE;aAC/C,CAAC,CAAC;YACH,OAAO;QACT,KAAK,UAAU,CAAC,oBAAoB;YAClC,SAAS,CAAC,qBAAqB,EAAE;gBAC/B,IAAI,EAAE,UAAU,CAAC,oBAAoB;gBACrC,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,yBAAyB;gBAClC,IAAI,EAAE,aAAa;aACpB,CAAC,CAAC;YACH,OAAO;QACT,KAAK,UAAU,CAAC,sBAAsB;YACpC,SAAS,CAAC,qBAAqB,EAAE;gBAC/B,IAAI,EAAE,UAAU,CAAC,sBAAsB;gBACvC,KAAK,EAAE,OAAO;gBACd,OAAO,EAAE,gDAAgD;gBACzD,IAAI,EAAE,aAAa;aACpB,CAAC,CAAC;YACH,OAAO;QACT,KAAK,UAAU,CAAC,eAAe;YAC7B,SAAS,CAAC,qBAAqB,EAAE;gBAC/B,IAAI,EAAE,UAAU,CAAC,eAAe;gBAChC,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,2EAA2E;gBACpF,IAAI,EAAE,aAAa;aACpB,CAA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a,EAAE,KAAK,CAAC,CAAC;KACxD;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { MediaStreamType } from '@azure/communication-calling';\nimport { _logEvent } from '@internal/acs-ui-common';\nimport { callingStatefulLogger, EventNames } from './Logger';\n\n/**\n * helper function to manage logging for stream disposals\n *\n * @param eventName Name of event that occured when managing streams\n * @param streamLogInfo Data about the stream in the event\n * @returns\n */\nfunction _logDisposeStreamEvent(\n eventName: EventNames,\n streamLogInfo: {\n callId?: string;\n participantKey?: any;\n streamId?: number;\n streamType?: MediaStreamType;\n streamEventType?: string;\n }\n): void {\n switch (eventName) {\n case EventNames.DISPOSE_STREAM_INVALID_PARAMS:\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSE_STREAM_INVALID_PARAMS,\n level: 'warning',\n message: 'Dispose View invalid combination of parameters.',\n data: { streamType: streamLogInfo.streamType }\n });\n return;\n case EventNames.START_DISPOSE_STREAM:\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_DISPOSE_STREAM,\n level: 'info',\n message: 'Start disposing stream.',\n data: streamLogInfo\n });\n return;\n case EventNames.DISPOSE_INFO_NOT_FOUND:\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSE_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find render info when disposing stream.',\n data: streamLogInfo\n });\n return;\n case EventNames.STREAM_STOPPING:\n _logEvent(callingStatefulLogger, {\n name: EventNames.STREAM_STOPPING,\n level: 'info',\n message: 'Stream is currently marked as stopping, will continue if is local preview',\n data: streamLogInfo\n });\n return;\n case EventNames.DISPOSING_RENDERER:\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSING_RENDERER,\n level: 'info',\n message: 'Disposing view renderer.',\n data: streamLogInfo\n });\n return;\n case EventNames.RENDERER_NOT_FOUND:\n _logEvent(callingStatefulLogger, {\n name: EventNames.RENDERER_NOT_FOUND,\n level: 'error',\n message: 'Cannot find renderer when disposing stream.',\n data: streamLogInfo\n });\n return;\n case EventNames.STREAM_ALREADY_DISPOSED:\n _logEvent(callingStatefulLogger, {\n name: EventNames.STREAM_ALREADY_DISPOSED,\n level: 'info',\n message: 'Stream is already disposed.',\n data: streamLogInfo\n });\n return;\n default:\n return;\n }\n}\n\n/**\n * helper function to manage logging for local stream creations\n *\n * @param eventName Name of the event to occured when creating a local stream\n * @param streamLogInfo Data about the stream in the event\n * @param error that is thrown by caller\n * @returns\n */\nfunction _logCreateStreamEvent(\n eventName: string,\n streamLogInfo: {\n callId?: string;\n participantKey?: any;\n streamId?: number;\n streamType?: MediaStreamType;\n streamEventType?: string;\n },\n error?: unknown\n): void {\n switch (eventName) {\n case EventNames.CREATE_STREAM_INVALID_PARAMS:\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATE_STREAM_INVALID_PARAMS,\n level: 'warning',\n message: 'Create View invalid combination of parameters.',\n data: { streamType: streamLogInfo.streamType }\n });\n return;\n case EventNames.START_STREAM_RENDERING:\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_STREAM_RENDERING,\n level: 'info',\n message: 'Start creating view for local video.',\n data: streamLogInfo\n });\n return;\n case EventNames.STREAM_NOT_FOUND:\n _logEvent(callingStatefulLogger, {\n name: EventNames.STREAM_NOT_FOUND,\n level: 'error',\n message: 'Stream not found in state.',\n data: { callId: streamLogInfo.callId }\n });\n return;\n case EventNames.STREAM_ALREADY_RENDERED:\n _logEvent(callingStatefulLogger, {\n name: EventNames.STREAM_ALREADY_RENDERED,\n level: 'warning',\n message: 'Stream is already rendered.',\n data: streamLogInfo\n });\n return;\n case EventNames.STREAM_RENDERING:\n _logEvent(callingStatefulLogger, {\n name: EventNames.STREAM_RENDERING,\n level: 'warning',\n message: 'Stream is rendering.',\n data: streamLogInfo\n });\n return;\n case EventNames.STREAM_STOPPING:\n _logEvent(callingStatefulLogger, {\n name: EventNames.STREAM_STOPPING,\n level: 'warning',\n message: 'Stream was marked as stopping by dispose view. Resetting state to \"Rendering\".',\n data: streamLogInfo\n });\n return;\n case EventNames.CREATE_STREAM_FAIL:\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATE_STREAM_FAIL,\n level: 'error',\n message: 'Failed to create view.',\n data: {\n error: error,\n streamType: streamLogInfo.streamType,\n callId: streamLogInfo.callId\n }\n });\n return;\n case EventNames.RENDER_INFO_NOT_FOUND:\n _logEvent(callingStatefulLogger, {\n name: EventNames.RENDER_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find render info after create the view. ',\n data: streamLogInfo\n });\n return;\n case EventNames.CREATED_STREAM_STOPPING:\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATED_STREAM_STOPPING,\n level: 'warning',\n message: 'Render info status is stopping, dispose renderer.',\n data: streamLogInfo\n });\n return;\n case EventNames.VIEW_RENDER_SUCCEED:\n _logEvent(callingStatefulLogger, {\n name: EventNames.VIEW_RENDER_SUCCEED,\n level: 'info',\n message: `Successfully render the view.`,\n data: streamLogInfo\n });\n return;\n case EventNames.CREATING_VIEW:\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATING_VIEW,\n level: 'info',\n message: 'Start creating view for remote video.',\n data: streamLogInfo\n });\n return;\n default:\n return;\n }\n}\n\n/**\n * helper function to fire streamUtils logging events\n *\n * @param eventName Name of event from streamUtils\n * @param streamLogInfo informaiton about the event and who called it\n * @param error if any errors present will be added to message in logging\n */\nexport function _logStreamEvent(\n eventName: EventNames,\n streamLogInfo: {\n callId?: string;\n participantKey?: any;\n streamId?: number;\n streamType?: MediaStreamType;\n streamEventType?: string;\n },\n error?: unknown\n): void {\n if (\n streamLogInfo.streamEventType === 'disposeViewLocal' ||\n streamLogInfo.streamEventType === 'disposeViewRemote' ||\n streamLogInfo.streamEventType === 'disposeViewUnparented'\n ) {\n _logDisposeStreamEvent(eventName, streamLogInfo);\n } else if (\n streamLogInfo.streamEventType === 'createViewLocal' ||\n streamLogInfo.streamEventType === 'createViewRemote'\n ) {\n _logCreateStreamEvent(eventName, streamLogInfo, error);\n }\n}\n\"../../acs-ui-common/src\""]}
|
@@ -16,4 +16,11 @@ export declare const _isTeamsCall: (call: CallCommon) => call is import("@azure/
|
|
16
16
|
* @internal
|
17
17
|
*/
|
18
18
|
export declare const _isTeamsCallAgent: (callAgent: CallAgentCommon) => callAgent is import("@azure/communication-calling").TeamsCallAgent;
|
19
|
+
/**
|
20
|
+
* @internal
|
21
|
+
* Determine whether a call is:
|
22
|
+
* A TeamsCall
|
23
|
+
* or a ACS Call joining the teams meeting
|
24
|
+
*/
|
25
|
+
export declare const _isTeamsMeetingCall: (call: CallCommon) => boolean;
|
19
26
|
//# sourceMappingURL=TypeGuards.d.ts.map
|
@@ -32,4 +32,14 @@ export const _isTeamsCallAgent = (callAgent) => {
|
|
32
32
|
return callAgent.kind === 'TeamsCallAgent';
|
33
33
|
return false;
|
34
34
|
};
|
35
|
+
/* @conditional-compile-remove(close-captions) */
|
36
|
+
/**
|
37
|
+
* @internal
|
38
|
+
* Determine whether a call is:
|
39
|
+
* A TeamsCall
|
40
|
+
* or a ACS Call joining the teams meeting
|
41
|
+
*/
|
42
|
+
export const _isTeamsMeetingCall = (call) => {
|
43
|
+
return _isTeamsCall(call) || (_isACSCall(call) && !call.info.groupId && !call.info.roomId); // there should be a better way to determine if a call is joining a teams meeting ideally should be a meetingID in the info object
|
44
|
+
};
|
35
45
|
//# sourceMappingURL=TypeGuards.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TypeGuards.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TypeGuards.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAgB,EAAgB,EAAE;IAC3D,yDAAyD;IACzD,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC;IAC1C,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAA0B,EAA0B,EAAE;IACpF,yDAAyD;IACzD,OAAO,CAAC,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,KAAK,WAAW,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAgB,EAAqB,EAAE;IAClE,yDAAyD;IACzD,OAAO,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC;IACjC,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAA0B,EAA+B,EAAE;IAC3F,yDAAyD;IACzD,OAAO,SAAS,CAAC,IAAI,KAAK,gBAAgB,CAAC;IAC3C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Call, CallAgent } from '@azure/communication-calling';\nimport { CallAgentCommon, CallCommon, TeamsCall, TeamsCallAgent } from './BetaToStableTypes';\n\n/**\n * @internal\n */\nexport const _isACSCall = (call: CallCommon): call is Call => {\n /* @conditional-compile-remove(teams-identity-support) */\n return !call.kind || call.kind === 'Call';\n return true;\n};\n\n/**\n * @internal\n */\nexport const _isACSCallAgent = (callAgent: CallAgentCommon): callAgent is CallAgent => {\n /* @conditional-compile-remove(teams-identity-support) */\n return !callAgent.kind || callAgent.kind === 'CallAgent';\n return true;\n};\n\n/**\n * @internal\n */\nexport const _isTeamsCall = (call: CallCommon): call is TeamsCall => {\n /* @conditional-compile-remove(teams-identity-support) */\n return call.kind === 'TeamsCall';\n return false;\n};\n\n/**\n * @internal\n */\nexport const _isTeamsCallAgent = (callAgent: CallAgentCommon): callAgent is TeamsCallAgent => {\n /* @conditional-compile-remove(teams-identity-support) */\n return callAgent.kind === 'TeamsCallAgent';\n return false;\n};\n"]}
|
1
|
+
{"version":3,"file":"TypeGuards.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TypeGuards.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAgB,EAAgB,EAAE;IAC3D,yDAAyD;IACzD,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC;IAC1C,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAA0B,EAA0B,EAAE;IACpF,yDAAyD;IACzD,OAAO,CAAC,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,KAAK,WAAW,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAgB,EAAqB,EAAE;IAClE,yDAAyD;IACzD,OAAO,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC;IACjC,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAA0B,EAA+B,EAAE;IAC3F,yDAAyD;IACzD,OAAO,SAAS,CAAC,IAAI,KAAK,gBAAgB,CAAC;IAC3C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,iDAAiD;AACjD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAgB,EAAW,EAAE;IAC/D,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,kIAAkI;AAChO,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Call, CallAgent } from '@azure/communication-calling';\nimport { CallAgentCommon, CallCommon, TeamsCall, TeamsCallAgent } from './BetaToStableTypes';\n\n/**\n * @internal\n */\nexport const _isACSCall = (call: CallCommon): call is Call => {\n /* @conditional-compile-remove(teams-identity-support) */\n return !call.kind || call.kind === 'Call';\n return true;\n};\n\n/**\n * @internal\n */\nexport const _isACSCallAgent = (callAgent: CallAgentCommon): callAgent is CallAgent => {\n /* @conditional-compile-remove(teams-identity-support) */\n return !callAgent.kind || callAgent.kind === 'CallAgent';\n return true;\n};\n\n/**\n * @internal\n */\nexport const _isTeamsCall = (call: CallCommon): call is TeamsCall => {\n /* @conditional-compile-remove(teams-identity-support) */\n return call.kind === 'TeamsCall';\n return false;\n};\n\n/**\n * @internal\n */\nexport const _isTeamsCallAgent = (callAgent: CallAgentCommon): callAgent is TeamsCallAgent => {\n /* @conditional-compile-remove(teams-identity-support) */\n return callAgent.kind === 'TeamsCallAgent';\n return false;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/**\n * @internal\n * Determine whether a call is:\n * A TeamsCall\n * or a ACS Call joining the teams meeting\n */\nexport const _isTeamsMeetingCall = (call: CallCommon): boolean => {\n return _isTeamsCall(call) || (_isACSCall(call) && !call.info.groupId && !call.info.roomId); // there should be a better way to determine if a call is joining a teams meeting ideally should be a meetingID in the info object\n};\n"]}
|
@@ -5,4 +5,5 @@ export type { CallAgentState, CallClientState, CallError, CallErrors, CallErrorT
|
|
5
5
|
export type { CreateViewResult } from './StreamUtils';
|
6
6
|
export type { DeclarativeCallAgent, IncomingCallManagement } from './CallAgentDeclarative';
|
7
7
|
export type { DeclarativeIncomingCall } from './IncomingCallDeclarative';
|
8
|
+
export type { CaptionsCallFeatureState, CaptionsInfo } from './CallClientState';
|
8
9
|
//# sourceMappingURL=index-public.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-public.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index-public.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { createStatefulCallClient } from './StatefulCallClient';\nexport type { StatefulCallClient, StatefulCallClientArgs, StatefulCallClientOptions } from './StatefulCallClient';\nexport type { StatefulDeviceManager } from './DeviceManagerDeclarative';\nexport type {\n CallAgentState,\n CallClientState,\n CallError,\n CallErrors,\n CallErrorTarget,\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n IncomingCallState,\n LocalVideoStreamState,\n MediaDiagnosticsState,\n NetworkDiagnosticsState,\n RecordingCallFeatureState as RecordingCallFeature,\n RemoteParticipantState,\n RemoteVideoStreamState,\n TranscriptionCallFeatureState as TranscriptionCallFeature,\n VideoStreamRendererViewState\n} from './CallClientState';\nexport type { CreateViewResult } from './StreamUtils';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent, IncomingCallManagement } from './CallAgentDeclarative';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeIncomingCall } from './IncomingCallDeclarative';\n"]}
|
1
|
+
{"version":3,"file":"index-public.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index-public.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { createStatefulCallClient } from './StatefulCallClient';\nexport type { StatefulCallClient, StatefulCallClientArgs, StatefulCallClientOptions } from './StatefulCallClient';\nexport type { StatefulDeviceManager } from './DeviceManagerDeclarative';\nexport type {\n CallAgentState,\n CallClientState,\n CallError,\n CallErrors,\n CallErrorTarget,\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n IncomingCallState,\n LocalVideoStreamState,\n MediaDiagnosticsState,\n NetworkDiagnosticsState,\n RecordingCallFeatureState as RecordingCallFeature,\n RemoteParticipantState,\n RemoteVideoStreamState,\n TranscriptionCallFeatureState as TranscriptionCallFeature,\n VideoStreamRendererViewState\n} from './CallClientState';\nexport type { CreateViewResult } from './StreamUtils';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent, IncomingCallManagement } from './CallAgentDeclarative';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeIncomingCall } from './IncomingCallDeclarative';\n/* @conditional-compile-remove(close-captions) */\nexport type { CaptionsCallFeatureState, CaptionsInfo } from './CallClientState';\n"]}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export * from './index-public';
|
2
2
|
export { _isACSCall, _isACSCallAgent, _isTeamsCall, _isTeamsCallAgent } from './TypeGuards';
|
3
|
+
export { _isTeamsMeetingCall } from './TypeGuards';
|
3
4
|
export type { CallAgentCommon, CallCommon, TeamsCall, TeamsCallAgent, IncomingCallCommon } from './BetaToStableTypes';
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
@@ -2,4 +2,6 @@
|
|
2
2
|
// Licensed under the MIT license.
|
3
3
|
export * from './index-public';
|
4
4
|
export { _isACSCall, _isACSCallAgent, _isTeamsCall, _isTeamsCallAgent } from './TypeGuards';
|
5
|
+
/* @conditional-compile-remove(close-captions) */
|
6
|
+
export { _isTeamsMeetingCall } from './TypeGuards';
|
5
7
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport * from './index-public';\n\nexport { _isACSCall, _isACSCallAgent, _isTeamsCall, _isTeamsCallAgent } from './TypeGuards';\n\nexport type { CallAgentCommon, CallCommon, TeamsCall, TeamsCallAgent, IncomingCallCommon } from './BetaToStableTypes';\n"]}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE5F,iDAAiD;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport * from './index-public';\n\nexport { _isACSCall, _isACSCallAgent, _isTeamsCall, _isTeamsCallAgent } from './TypeGuards';\n\n/* @conditional-compile-remove(close-captions) */\nexport { _isTeamsMeetingCall } from './TypeGuards';\n\nexport type { CallAgentCommon, CallCommon, TeamsCall, TeamsCallAgent, IncomingCallCommon } from './BetaToStableTypes';\n"]}
|
@@ -5,9 +5,15 @@ import { toFlatCommunicationIdentifier } from "../../acs-ui-common/src";
|
|
5
5
|
import { memoizeFnAll } from "../../acs-ui-common/src";
|
6
6
|
import { createSelector } from 'reselect';
|
7
7
|
import { ACSKnownMessageType } from './utils/constants';
|
8
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
9
|
+
import { DEFAULT_DATA_LOSS_PREVENTION_POLICY_URL } from './utils/constants';
|
8
10
|
import { updateMessagesWithAttached } from './utils/updateMessagesWithAttached';
|
9
11
|
const memoizedAllConvertChatMessage = memoizeFnAll((_key, chatMessage, userId, isSeen, isLargeGroup) => {
|
10
12
|
const messageType = chatMessage.type.toLowerCase();
|
13
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
14
|
+
if (chatMessage.policyViolation) {
|
15
|
+
return convertToUiBlockedMessage(chatMessage, userId, isSeen, isLargeGroup);
|
16
|
+
}
|
11
17
|
if (messageType === ACSKnownMessageType.text ||
|
12
18
|
messageType === ACSKnownMessageType.richtextHtml ||
|
13
19
|
messageType === ACSKnownMessageType.html) {
|
@@ -31,6 +37,50 @@ const extractAttachedFilesMetadata = (metadata) => {
|
|
31
37
|
return [];
|
32
38
|
}
|
33
39
|
};
|
40
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
41
|
+
const extractInlineImageFilesMetadata = (attachments) => {
|
42
|
+
return attachments.map((attachment) => {
|
43
|
+
var _a, _b;
|
44
|
+
return ({
|
45
|
+
attachmentType: attachment.attachmentType,
|
46
|
+
id: attachment.id,
|
47
|
+
name: (_a = attachment.name) !== null && _a !== void 0 ? _a : '',
|
48
|
+
extension: (_b = attachment.contentType) !== null && _b !== void 0 ? _b : '',
|
49
|
+
url: attachment.url,
|
50
|
+
previewUrl: attachment.previewUrl
|
51
|
+
});
|
52
|
+
});
|
53
|
+
};
|
54
|
+
/* @conditional-compile-remove(file-sharing) @conditional-compile-remove(teams-inline-images) */
|
55
|
+
const extractFilesMetadata = (message) => {
|
56
|
+
var _a, _b;
|
57
|
+
let fileMetadata = [];
|
58
|
+
/* @conditional-compile-remove(file-sharing) */
|
59
|
+
if (message.metadata) {
|
60
|
+
fileMetadata = fileMetadata.concat(extractAttachedFilesMetadata(message.metadata));
|
61
|
+
}
|
62
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
63
|
+
if ((_a = message.content) === null || _a === void 0 ? void 0 : _a.attachments) {
|
64
|
+
fileMetadata = fileMetadata.concat(extractInlineImageFilesMetadata((_b = message.content) === null || _b === void 0 ? void 0 : _b.attachments));
|
65
|
+
}
|
66
|
+
return fileMetadata;
|
67
|
+
};
|
68
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
69
|
+
const convertToUiBlockedMessage = (message, userId, isSeen, isLargeGroup) => {
|
70
|
+
const messageSenderId = message.sender !== undefined ? toFlatCommunicationIdentifier(message.sender) : userId;
|
71
|
+
return {
|
72
|
+
messageType: 'blocked',
|
73
|
+
createdOn: message.createdOn,
|
74
|
+
warningText: undefined,
|
75
|
+
status: !isLargeGroup && message.status === 'delivered' && isSeen ? 'seen' : message.status,
|
76
|
+
senderDisplayName: message.senderDisplayName,
|
77
|
+
senderId: messageSenderId,
|
78
|
+
messageId: message.id,
|
79
|
+
deletedOn: message.deletedOn,
|
80
|
+
mine: messageSenderId === userId,
|
81
|
+
link: DEFAULT_DATA_LOSS_PREVENTION_POLICY_URL
|
82
|
+
};
|
83
|
+
};
|
34
84
|
const convertToUiChatMessage = (message, userId, isSeen, isLargeGroup) => {
|
35
85
|
var _a;
|
36
86
|
const messageSenderId = message.sender !== undefined ? toFlatCommunicationIdentifier(message.sender) : userId;
|
@@ -48,8 +98,8 @@ const convertToUiChatMessage = (message, userId, isSeen, isLargeGroup) => {
|
|
48
98
|
deletedOn: message.deletedOn,
|
49
99
|
mine: messageSenderId === userId,
|
50
100
|
metadata: message.metadata,
|
51
|
-
/* @conditional-compile-remove(file-sharing) */
|
52
|
-
attachedFilesMetadata:
|
101
|
+
/* @conditional-compile-remove(file-sharing) @conditional-compile-remove(teams-inline-images) */
|
102
|
+
attachedFilesMetadata: extractFilesMetadata(message)
|
53
103
|
};
|
54
104
|
};
|
55
105
|
const convertToUiSystemMessage = (message) => {
|
@@ -119,7 +169,7 @@ export const messageThreadSelector = createSelector([getUserId, getChatMessages,
|
|
119
169
|
// TODO: Add support for topicUpdated system messages in MessageThread component.
|
120
170
|
// message.type === ACSKnownMessageType.topicUpdated ||
|
121
171
|
message.clientMessageId !== undefined)
|
122
|
-
.filter(
|
172
|
+
.filter(isMessageValidToRender)
|
123
173
|
.map((message) => {
|
124
174
|
var _a;
|
125
175
|
return memoizedFn((_a = message.id) !== null && _a !== void 0 ? _a : message.clientMessageId, message, userId, message.createdOn <= latestReadTime, isLargeGroup);
|
@@ -127,7 +177,7 @@ export const messageThreadSelector = createSelector([getUserId, getChatMessages,
|
|
127
177
|
updateMessagesWithAttached(convertedMessages);
|
128
178
|
return {
|
129
179
|
userId,
|
130
|
-
showMessageStatus:
|
180
|
+
showMessageStatus: true,
|
131
181
|
messages: convertedMessages,
|
132
182
|
participantCount,
|
133
183
|
readReceiptsBySenderId
|
@@ -139,7 +189,7 @@ const sanitizedMessageContentType = (type) => {
|
|
139
189
|
? lowerCaseType
|
140
190
|
: 'unknown';
|
141
191
|
};
|
142
|
-
const
|
192
|
+
const isMessageValidToRender = (message) => {
|
143
193
|
var _a, _b;
|
144
194
|
if (message.deletedOn) {
|
145
195
|
return false;
|
@@ -147,6 +197,10 @@ const messagesWithContentOrFileSharingMetadata = (message) => {
|
|
147
197
|
if ((_a = message.metadata) === null || _a === void 0 ? void 0 : _a['fileSharingMetadata']) {
|
148
198
|
return true;
|
149
199
|
}
|
200
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
201
|
+
if (message.policyViolation) {
|
202
|
+
return true;
|
203
|
+
}
|
150
204
|
return !!(message.content && ((_b = message.content) === null || _b === void 0 ? void 0 : _b.message) !== '');
|
151
205
|
};
|
152
206
|
//# sourceMappingURL=messageThreadSelector.js.map
|