@azure/communication-react 1.5.1-beta.1 → 1.5.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.beta.md +76 -1
- package/CHANGELOG.json +621 -0
- package/dist/communication-react.d.ts +217 -7
- package/dist/dist-cjs/communication-react/index.js +2207 -1184
- 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/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 +4 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +37 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +22 -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 +14 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +44 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +21 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +1 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.d.ts +13 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +8 -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 +4 -0
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +28 -0
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.d.ts +29 -0
- package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js +54 -0
- package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js.map +1 -0
- 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/index-public.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +10 -2
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.d.ts +16 -0
- package/dist/dist-esm/react-components/src/components/CameraButton.js +38 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +30 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +47 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +6 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.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/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/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 +2 -2
- package/dist/dist-esm/react-components/src/components/MessageThread.js +24 -11
- 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/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/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/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 +11 -9
- 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 +8 -0
- package/dist/dist-esm/react-components/src/components/index.js +4 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.d.ts +13 -0
- package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js +35 -0
- package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.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 +2 -2
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +30 -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/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 +5 -0
- package/dist/dist-esm/react-components/src/components/utils.js +20 -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/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 +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +14 -3
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +14 -3
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +7 -0
- package/dist/dist-esm/react-components/src/theming/icons.js +19 -7
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +27 -2
- 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 +42 -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/components/CallArrangement.js +8 -2
- 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 +1 -1
- 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/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 +5 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +3 -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 +0 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +1 -31
- 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/hooks/useHandlers.js +12 -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 +1 -0
- 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/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/CallWithChatComposite/CallWithChatComposite.js +11 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +12 -8
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.d.ts +16 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js +49 -43
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +24 -0
- 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 +19 -0
- 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 +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +18 -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/components/DesktopMoreButton.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +47 -26
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.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 +16 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.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/VideoEffectsPane.d.ts +11 -0
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +19 -0
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +4 -4
- 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/package.json +12 -12
- 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
@@ -11,245 +11,129 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
11
11
|
};
|
12
12
|
import { LocalVideoStream, VideoStreamRenderer } from '@azure/communication-calling';
|
13
13
|
import { convertSdkLocalStreamToDeclarativeLocalStream, convertSdkRemoteStreamToDeclarativeRemoteStream, convertFromSDKToDeclarativeVideoStreamRendererView } from './Converter';
|
14
|
-
import { toFlatCommunicationIdentifier
|
15
|
-
import {
|
16
|
-
|
14
|
+
import { toFlatCommunicationIdentifier } from "../../acs-ui-common/src";
|
15
|
+
import { EventNames } from './Logger';
|
16
|
+
import { _logStreamEvent } from './StreamUtilsLogging';
|
17
|
+
function createViewVideo(context, internalContext, callId, stream, participantId, options) {
|
17
18
|
return __awaiter(this, void 0, void 0, function* () {
|
18
|
-
//
|
19
|
-
|
20
|
-
|
21
|
-
if (
|
22
|
-
|
19
|
+
// we can only have 3 types of createView
|
20
|
+
let streamEventType;
|
21
|
+
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
22
|
+
if (participantId) {
|
23
|
+
streamEventType = 'createViewRemote';
|
24
|
+
}
|
25
|
+
else if (callId) {
|
26
|
+
streamEventType = 'createViewLocal';
|
23
27
|
}
|
24
28
|
else {
|
25
|
-
|
29
|
+
// TODO update for when unparented view.
|
30
|
+
throw new Error('unparented createView not implemented yet here');
|
31
|
+
streamEventType = 'createViewUnparented';
|
26
32
|
}
|
27
|
-
const
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
33
|
+
const streamType = stream === null || stream === void 0 ? void 0 : stream.mediaStreamType;
|
34
|
+
const streamId = stream.id;
|
35
|
+
// we want to check to see if there is a participantId this will tell us whether its a local stream or a remote one.
|
36
|
+
const participantKey = streamEventType === 'createViewRemote' && participantId
|
37
|
+
? typeof participantId === 'string'
|
38
|
+
? participantId
|
39
|
+
: toFlatCommunicationIdentifier(participantId)
|
40
|
+
: undefined;
|
41
|
+
const streamLogInfo = { callId, participantKey, streamId, streamType, streamEventType };
|
42
|
+
// make different logging announcement based on whether or not we are starting a local or remote
|
43
|
+
_logStreamEvent(EventNames.CREATING_VIEW, streamLogInfo);
|
44
|
+
// if we have a participant Id and a stream get the remote info, else get the local render info from state.
|
45
|
+
const renderInfo = streamEventType === 'createViewRemote' && participantKey
|
46
|
+
? internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId)
|
47
|
+
: internalContext.getLocalRenderInfo(callId);
|
35
48
|
if (!renderInfo) {
|
36
|
-
|
37
|
-
name: EventNames.REMOTE_STREAM_NOT_FOUND,
|
38
|
-
level: 'error',
|
39
|
-
message: 'RemoteVideoStream not found in state.',
|
40
|
-
data: streamLogInfo
|
41
|
-
});
|
42
|
-
console.warn('RemoteVideoStream not found in state');
|
49
|
+
_logStreamEvent(EventNames.STREAM_NOT_FOUND, streamLogInfo);
|
43
50
|
return;
|
44
51
|
}
|
45
52
|
if (renderInfo.status === 'Rendered') {
|
46
|
-
|
47
|
-
name: EventNames.REMOTE_STREAM_ALREADY_RENDERED,
|
48
|
-
level: 'warning',
|
49
|
-
message: 'RemoteVideoStream is already rendered.',
|
50
|
-
data: streamLogInfo
|
51
|
-
});
|
52
|
-
console.warn('RemoteVideoStream is already rendered');
|
53
|
+
_logStreamEvent(EventNames.STREAM_ALREADY_RENDERED, streamLogInfo);
|
53
54
|
return;
|
54
55
|
}
|
55
56
|
if (renderInfo.status === 'Rendering') {
|
56
57
|
// Do not log to console here as this is a very common situation due to UI rerenders while
|
57
58
|
// the video rendering is in progress.
|
58
|
-
|
59
|
-
name: EventNames.REMOTE_STREAM_RENDERING,
|
60
|
-
level: 'warning',
|
61
|
-
message: 'RemoteVideoStream is rendering.',
|
62
|
-
data: streamLogInfo
|
63
|
-
});
|
59
|
+
_logStreamEvent(EventNames.STREAM_RENDERING, streamLogInfo);
|
64
60
|
return;
|
65
61
|
}
|
66
62
|
// "Stopping" only happens if the stream was in "rendering" but `disposeView` was called.
|
67
63
|
// Now that `createView` has been re-called, we can flip the state back to "rendering".
|
68
64
|
if (renderInfo.status === 'Stopping') {
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
65
|
+
if (streamEventType === 'createViewRemote' && participantKey) {
|
66
|
+
_logStreamEvent(EventNames.STREAM_STOPPING, streamLogInfo);
|
67
|
+
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Rendering', renderInfo.renderer);
|
68
|
+
}
|
69
|
+
else if (streamEventType === 'createViewLocal') {
|
70
|
+
_logStreamEvent(EventNames.STREAM_STOPPING, streamLogInfo);
|
71
|
+
internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Rendering', renderInfo.renderer);
|
72
|
+
}
|
75
73
|
return;
|
76
74
|
}
|
77
75
|
const renderer = new VideoStreamRenderer(renderInfo.stream);
|
78
|
-
|
76
|
+
streamEventType === 'createViewRemote' && participantKey
|
77
|
+
? internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Rendering', undefined)
|
78
|
+
: internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Rendering', renderer);
|
79
79
|
let view;
|
80
80
|
try {
|
81
81
|
view = yield renderer.createView(options);
|
82
82
|
}
|
83
83
|
catch (e) {
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
84
|
+
if (streamEventType === 'createViewRemote' && participantKey) {
|
85
|
+
_logStreamEvent(EventNames.CREATE_STREAM_FAIL, streamLogInfo);
|
86
|
+
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'NotRendered', undefined);
|
87
|
+
}
|
88
|
+
else if (streamEventType === 'createViewLocal') {
|
89
|
+
_logStreamEvent(EventNames.CREATE_STREAM_FAIL, streamLogInfo, e);
|
90
|
+
internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'NotRendered', undefined);
|
91
|
+
}
|
91
92
|
throw e;
|
92
93
|
}
|
93
94
|
// Since render could take some time, we need to check if the stream is still valid and if we received a signal to
|
94
95
|
// stop rendering.
|
95
|
-
const refreshedRenderInfo =
|
96
|
+
const refreshedRenderInfo = streamEventType === 'createViewRemote' && participantKey
|
97
|
+
? internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId)
|
98
|
+
: internalContext.getLocalRenderInfo(callId);
|
96
99
|
if (!refreshedRenderInfo) {
|
97
100
|
// RenderInfo was removed. This should not happen unless stream was removed from the call so dispose the renderer
|
98
|
-
// and clean up state.
|
99
|
-
|
100
|
-
name: EventNames.REMOTE_RENDER_INFO_NOT_FOUND,
|
101
|
-
level: 'error',
|
102
|
-
message: 'Cannot find remote render info after create the view.',
|
103
|
-
data: streamLogInfo
|
104
|
-
});
|
101
|
+
// and clean up the state.
|
102
|
+
_logStreamEvent(EventNames.RENDER_INFO_NOT_FOUND, streamLogInfo);
|
105
103
|
renderer.dispose();
|
106
|
-
|
104
|
+
streamEventType === 'createViewRemote' && participantKey
|
105
|
+
? context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined)
|
106
|
+
: context.setLocalVideoStreamRendererView(callId, undefined);
|
107
107
|
return;
|
108
108
|
}
|
109
109
|
if (refreshedRenderInfo.status === 'Stopping') {
|
110
110
|
// Stop render was called on this stream after we had started rendering. We will dispose this view and do not
|
111
111
|
// put the view into the state.
|
112
|
-
|
113
|
-
|
114
|
-
level: 'warning',
|
115
|
-
message: 'Render info status is stopping, dispose renderer.',
|
116
|
-
data: streamLogInfo
|
117
|
-
});
|
112
|
+
streamEventType === 'createViewRemote';
|
113
|
+
_logStreamEvent(EventNames.CREATED_STREAM_STOPPING, streamLogInfo);
|
118
114
|
renderer.dispose();
|
119
|
-
|
120
|
-
|
115
|
+
if (streamEventType === 'createViewRemote' && participantKey) {
|
116
|
+
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, refreshedRenderInfo.stream, 'NotRendered', undefined);
|
117
|
+
context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);
|
118
|
+
}
|
119
|
+
else if (streamEventType === 'createViewLocal') {
|
120
|
+
internalContext.setLocalRenderInfo(callId, refreshedRenderInfo.stream, 'NotRendered', undefined);
|
121
|
+
context.setLocalVideoStreamRendererView(callId, undefined);
|
122
|
+
}
|
121
123
|
return;
|
122
124
|
}
|
123
125
|
// Else the stream still exists and status is not telling us to stop rendering. Complete the render process by
|
124
126
|
// updating the state.
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
level: 'info',
|
130
|
-
message: `Successfully render the remote view.`,
|
131
|
-
data: {
|
132
|
-
streamLogInfo
|
133
|
-
}
|
134
|
-
});
|
135
|
-
return {
|
136
|
-
renderer,
|
137
|
-
view
|
138
|
-
};
|
139
|
-
});
|
140
|
-
}
|
141
|
-
function createViewLocalVideo(context, internalContext, callId, options) {
|
142
|
-
return __awaiter(this, void 0, void 0, function* () {
|
143
|
-
_logEvent(callingStatefulLogger, {
|
144
|
-
name: EventNames.START_LOCAL_STREAM_RENDERING,
|
145
|
-
level: 'info',
|
146
|
-
message: 'Start creating view for local video.'
|
147
|
-
});
|
148
|
-
// Render LocalVideoStream that is part of a Call
|
149
|
-
const renderInfo = internalContext.getLocalRenderInfo(callId);
|
150
|
-
if (!renderInfo) {
|
151
|
-
_logEvent(callingStatefulLogger, {
|
152
|
-
name: EventNames.LOCAL_STREAM_NOT_FOUND,
|
153
|
-
level: 'error',
|
154
|
-
message: 'LocalVideoStream not found in state.'
|
155
|
-
});
|
156
|
-
console.warn('LocalVideoStream not found in state');
|
157
|
-
return;
|
127
|
+
if (streamEventType === 'createViewRemote' && participantKey) {
|
128
|
+
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, refreshedRenderInfo.stream, 'Rendered', renderer);
|
129
|
+
context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, convertFromSDKToDeclarativeVideoStreamRendererView(view));
|
130
|
+
_logStreamEvent(EventNames.VIEW_RENDER_SUCCEED, streamLogInfo);
|
158
131
|
}
|
159
|
-
if (
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
message: 'LocalVideoStream is already rendered.'
|
164
|
-
});
|
165
|
-
console.warn('LocalVideoStream is already rendered');
|
166
|
-
return;
|
132
|
+
else if (streamEventType === 'createViewLocal') {
|
133
|
+
internalContext.setLocalRenderInfo(callId, refreshedRenderInfo.stream, 'Rendered', renderer);
|
134
|
+
context.setLocalVideoStreamRendererView(callId, convertFromSDKToDeclarativeVideoStreamRendererView(view));
|
135
|
+
_logStreamEvent(EventNames.VIEW_RENDER_SUCCEED, streamLogInfo);
|
167
136
|
}
|
168
|
-
if (renderInfo.status === 'Rendering') {
|
169
|
-
// Do not log to console here as this is a very common situation due to UI rerenders while
|
170
|
-
// the video rendering is in progress.
|
171
|
-
_logEvent(callingStatefulLogger, {
|
172
|
-
name: EventNames.LOCAL_STREAM_RENDERING,
|
173
|
-
level: 'warning',
|
174
|
-
message: 'LocalVideoStream is rendering.'
|
175
|
-
});
|
176
|
-
return;
|
177
|
-
}
|
178
|
-
// "Stopping" only happens if the stream was in "rendering" but `disposeView` was called.
|
179
|
-
// Now that `createView` has been re-called, we can flip the state back to "rendering".
|
180
|
-
if (renderInfo.status === 'Stopping') {
|
181
|
-
_logEvent(callingStatefulLogger, {
|
182
|
-
name: EventNames.LOCAL_STREAM_STOPPING,
|
183
|
-
level: 'warning',
|
184
|
-
message: 'LocalVideoStream was marked as stopping by dispose view. Resetting state to "Rendering".'
|
185
|
-
});
|
186
|
-
internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Rendering', renderInfo.renderer);
|
187
|
-
return;
|
188
|
-
}
|
189
|
-
const renderer = new VideoStreamRenderer(renderInfo.stream);
|
190
|
-
internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Rendering', renderer);
|
191
|
-
let view;
|
192
|
-
try {
|
193
|
-
view = yield renderer.createView(options);
|
194
|
-
}
|
195
|
-
catch (e) {
|
196
|
-
_logEvent(callingStatefulLogger, {
|
197
|
-
name: EventNames.CREATE_LOCAL_STREAM_FAIL,
|
198
|
-
level: 'error',
|
199
|
-
message: 'Failed to create view.',
|
200
|
-
data: {
|
201
|
-
error: e
|
202
|
-
}
|
203
|
-
});
|
204
|
-
internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'NotRendered', undefined);
|
205
|
-
throw e;
|
206
|
-
}
|
207
|
-
// Since render could take some time, we need to check if the stream is still valid and if we received a signal to
|
208
|
-
// stop rendering.
|
209
|
-
const refreshedRenderInfo = internalContext.getLocalRenderInfo(callId);
|
210
|
-
if (!refreshedRenderInfo) {
|
211
|
-
// RenderInfo was removed. This should not happen unless stream was removed from the call so dispose the renderer
|
212
|
-
// and clean up the state.
|
213
|
-
_logEvent(callingStatefulLogger, {
|
214
|
-
name: EventNames.LOCAL_RENDER_INFO_NOT_FOUND,
|
215
|
-
level: 'error',
|
216
|
-
message: 'Cannot find local render info after create the view. ',
|
217
|
-
data: {
|
218
|
-
callId
|
219
|
-
}
|
220
|
-
});
|
221
|
-
renderer.dispose();
|
222
|
-
context.setLocalVideoStreamRendererView(callId, undefined);
|
223
|
-
return;
|
224
|
-
}
|
225
|
-
if (refreshedRenderInfo.status === 'Stopping') {
|
226
|
-
// Stop render was called on this stream after we had started rendering. We will dispose this view and do not
|
227
|
-
// put the view into the state.
|
228
|
-
_logEvent(callingStatefulLogger, {
|
229
|
-
name: EventNames.LOCAL_CREATED_STREAM_STOPPING,
|
230
|
-
level: 'warning',
|
231
|
-
message: 'Render info status is stopping, dispose renderer.',
|
232
|
-
data: {
|
233
|
-
callId
|
234
|
-
}
|
235
|
-
});
|
236
|
-
renderer.dispose();
|
237
|
-
internalContext.setLocalRenderInfo(callId, refreshedRenderInfo.stream, 'NotRendered', undefined);
|
238
|
-
context.setLocalVideoStreamRendererView(callId, undefined);
|
239
|
-
return;
|
240
|
-
}
|
241
|
-
// Else The stream still exists and status is not telling us to stop rendering. Complete the render process by
|
242
|
-
// updating the state.
|
243
|
-
internalContext.setLocalRenderInfo(callId, refreshedRenderInfo.stream, 'Rendered', renderer);
|
244
|
-
context.setLocalVideoStreamRendererView(callId, convertFromSDKToDeclarativeVideoStreamRendererView(view));
|
245
|
-
_logEvent(callingStatefulLogger, {
|
246
|
-
name: EventNames.LOCAL_VIEW_RENDER_SUCCEED,
|
247
|
-
level: 'info',
|
248
|
-
message: `Successfully render the local view.`,
|
249
|
-
data: {
|
250
|
-
callId
|
251
|
-
}
|
252
|
-
});
|
253
137
|
return {
|
254
138
|
renderer,
|
255
139
|
view
|
@@ -308,6 +192,7 @@ function createViewUnparentedVideo(context, internalContext, stream, options) {
|
|
308
192
|
// Else the stream still exists and status is not telling us to stop rendering. Complete the render process by
|
309
193
|
// updating the state.
|
310
194
|
internalContext.setUnparentedRenderInfo(stream, localVideoStream, 'Rendered', renderer);
|
195
|
+
internalContext.subscribeToUnparentedViewVideoEffects(localVideoStream, context);
|
311
196
|
context.setDeviceManagerUnparentedView(stream, convertFromSDKToDeclarativeVideoStreamRendererView(view));
|
312
197
|
return {
|
313
198
|
renderer,
|
@@ -315,216 +200,110 @@ function createViewUnparentedVideo(context, internalContext, stream, options) {
|
|
315
200
|
};
|
316
201
|
});
|
317
202
|
}
|
318
|
-
function
|
319
|
-
|
320
|
-
let
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
else {
|
325
|
-
participantKey = toFlatCommunicationIdentifier(participantId);
|
326
|
-
}
|
327
|
-
const streamLogInfo = { callId, participantKey, streamId };
|
328
|
-
_logEvent(callingStatefulLogger, {
|
329
|
-
name: EventNames.START_DISPOSE_REMOTE_STREAM,
|
330
|
-
level: 'info',
|
331
|
-
message: 'Start disposing remote stream.',
|
332
|
-
data: streamLogInfo
|
333
|
-
});
|
334
|
-
context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);
|
335
|
-
const renderInfo = internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId);
|
336
|
-
if (!renderInfo) {
|
337
|
-
_logEvent(callingStatefulLogger, {
|
338
|
-
name: EventNames.REMOTE_DISPOSE_INFO_NOT_FOUND,
|
339
|
-
level: 'error',
|
340
|
-
message: 'Cannot find render info when disposing remote stream.',
|
341
|
-
data: streamLogInfo
|
342
|
-
});
|
343
|
-
return;
|
344
|
-
}
|
345
|
-
// Nothing to dispose of or clean up -- we can safely exit early here.
|
346
|
-
if (renderInfo.status === 'NotRendered') {
|
347
|
-
_logEvent(callingStatefulLogger, {
|
348
|
-
name: EventNames.REMOTE_STREAM_ALREADY_DISPOSED,
|
349
|
-
level: 'info',
|
350
|
-
message: 'RemoteVideoStream is already disposed.',
|
351
|
-
data: streamLogInfo
|
352
|
-
});
|
353
|
-
return;
|
354
|
-
}
|
355
|
-
// Status is already marked as "stopping" so we can exit early here. This is because stopping only occurs
|
356
|
-
// when the stream is being created in createView but hasn't been completed being created yet. The createView
|
357
|
-
// method will see the "stopping" status and perform the cleanup
|
358
|
-
if (renderInfo.status === 'Stopping') {
|
359
|
-
_logEvent(callingStatefulLogger, {
|
360
|
-
name: EventNames.REMOTE_STREAM_STOPPING,
|
361
|
-
level: 'info',
|
362
|
-
message: 'Remote stream is already stopping.',
|
363
|
-
data: streamLogInfo
|
364
|
-
});
|
365
|
-
return;
|
366
|
-
}
|
367
|
-
// If the stream is in the middle of being rendered (i.e. has state "Rendering"), we need the status as
|
368
|
-
// "stopping" without performing any cleanup. This will tell the `createView` method that it should stop
|
369
|
-
// rendering and clean up the state once the view has finished being created.
|
370
|
-
if (renderInfo.status === 'Rendering') {
|
371
|
-
_logEvent(callingStatefulLogger, {
|
372
|
-
name: EventNames.REMOTE_STREAM_STOPPING,
|
373
|
-
level: 'info',
|
374
|
-
message: 'Remote stream is still rendering. Changing status to stopping.',
|
375
|
-
data: streamLogInfo
|
376
|
-
});
|
377
|
-
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Stopping', undefined);
|
378
|
-
return;
|
203
|
+
function disposeViewVideo(context, internalContext, callId, stream, participantId) {
|
204
|
+
// we can only have 3 types of createView
|
205
|
+
let streamEventType;
|
206
|
+
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
207
|
+
if (participantId) {
|
208
|
+
streamEventType = 'disposeViewRemote';
|
379
209
|
}
|
380
|
-
|
381
|
-
|
382
|
-
if (renderInfo.renderer) {
|
383
|
-
_logEvent(callingStatefulLogger, {
|
384
|
-
name: EventNames.DISPOSING_REMOTE_RENDERER,
|
385
|
-
level: 'info',
|
386
|
-
message: 'Disposing remote view renderer.',
|
387
|
-
data: streamLogInfo
|
388
|
-
});
|
389
|
-
renderInfo.renderer.dispose();
|
210
|
+
else if (callId) {
|
211
|
+
streamEventType = 'disposeViewLocal';
|
390
212
|
}
|
391
213
|
else {
|
392
|
-
|
393
|
-
|
394
|
-
level: 'error',
|
395
|
-
message: 'Cannot find remote view renderer.',
|
396
|
-
data: streamLogInfo
|
397
|
-
});
|
214
|
+
// TODO update for when unparented view.
|
215
|
+
streamEventType = 'disposeViewUnparented';
|
398
216
|
}
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
}
|
408
|
-
|
217
|
+
const streamType = stream.mediaStreamType;
|
218
|
+
const streamId = stream.id;
|
219
|
+
// we want to check to see if there is a participantId this will tell us whether its a local stream or a remote one.
|
220
|
+
const participantKey = streamEventType === 'disposeViewRemote' && participantId
|
221
|
+
? typeof participantId === 'string'
|
222
|
+
? participantId
|
223
|
+
: toFlatCommunicationIdentifier(participantId)
|
224
|
+
: undefined;
|
225
|
+
const streamLogInfo = { callId, participantKey, streamId, streamType };
|
226
|
+
_logStreamEvent(EventNames.START_DISPOSE_STREAM, streamLogInfo);
|
227
|
+
if (streamEventType === 'disposeViewRemote' && participantKey) {
|
228
|
+
context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);
|
229
|
+
}
|
230
|
+
const renderInfo = streamEventType === 'disposeViewRemote' && participantKey
|
231
|
+
? internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId)
|
232
|
+
: internalContext.getLocalRenderInfo(callId);
|
409
233
|
if (!renderInfo) {
|
410
|
-
|
411
|
-
name: EventNames.LOCAL_DISPOSE_INFO_NOT_FOUND,
|
412
|
-
level: 'error',
|
413
|
-
message: 'Cannot find render info when disposing local stream.',
|
414
|
-
data: streamLogInfo
|
415
|
-
});
|
234
|
+
_logStreamEvent(EventNames.DISPOSE_INFO_NOT_FOUND, streamLogInfo);
|
416
235
|
return;
|
417
236
|
}
|
418
237
|
// Nothing to dispose of or clean up -- we can safely exit early here.
|
419
238
|
if (renderInfo.status === 'NotRendered') {
|
420
|
-
|
421
|
-
name: EventNames.LOCAL_STREAM_ALREADY_DISPOSED,
|
422
|
-
level: 'info',
|
423
|
-
message: 'LocalVideoStream is already disposed.'
|
424
|
-
});
|
239
|
+
_logStreamEvent(EventNames.STREAM_ALREADY_DISPOSED, streamLogInfo);
|
425
240
|
return;
|
426
241
|
}
|
427
242
|
// Status is already marked as "stopping" so we can exit early here. This is because stopping only occurs
|
428
243
|
// when the stream is being created in createView but hasn't been completed being created yet. The createView
|
429
244
|
// method will see the "stopping" status and perform the cleanup
|
430
245
|
if (renderInfo.status === 'Stopping') {
|
431
|
-
|
432
|
-
name: EventNames.LOCAL_STREAM_STOPPING,
|
433
|
-
level: 'info',
|
434
|
-
message: 'Local stream is already stopping.',
|
435
|
-
data: streamLogInfo
|
436
|
-
});
|
246
|
+
_logStreamEvent(EventNames.STREAM_STOPPING, streamLogInfo);
|
437
247
|
return;
|
438
248
|
}
|
439
249
|
// If the stream is in the middle of being rendered (i.e. has state "Rendering"), we need the status as
|
440
250
|
// "stopping" without performing any cleanup. This will tell the `createView` method that it should stop
|
441
251
|
// rendering and clean up the state once the view has finished being created.
|
442
252
|
if (renderInfo.status === 'Rendering') {
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
data: streamLogInfo
|
448
|
-
});
|
449
|
-
internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Stopping', renderInfo.renderer);
|
253
|
+
_logStreamEvent(EventNames.STREAM_STOPPING, streamLogInfo);
|
254
|
+
streamEventType === 'disposeViewRemote' && participantKey
|
255
|
+
? internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Stopping', undefined)
|
256
|
+
: internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Stopping', renderInfo.renderer);
|
450
257
|
return;
|
451
258
|
}
|
452
259
|
if (renderInfo.renderer) {
|
453
|
-
|
454
|
-
name: EventNames.DISPOSING_LOCAL_RENDERER,
|
455
|
-
level: 'info',
|
456
|
-
message: 'Disposing local view renderer.',
|
457
|
-
data: streamLogInfo
|
458
|
-
});
|
260
|
+
_logStreamEvent(EventNames.DISPOSING_RENDERER, streamLogInfo);
|
459
261
|
renderInfo.renderer.dispose();
|
460
|
-
//
|
461
|
-
|
462
|
-
|
463
|
-
|
262
|
+
// Else the state must be in the "Rendered" state, so we can dispose the renderer and clean up the state.
|
263
|
+
if (streamEventType === 'disposeViewRemote' && participantKey) {
|
264
|
+
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'NotRendered', undefined);
|
265
|
+
}
|
266
|
+
else if (streamEventType === 'disposeViewLocal') {
|
267
|
+
internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'NotRendered', undefined);
|
268
|
+
context.setLocalVideoStreamRendererView(callId, undefined);
|
269
|
+
}
|
464
270
|
}
|
465
271
|
else {
|
466
|
-
|
467
|
-
name: EventNames.LOCAL_RENDERER_NOT_FOUND,
|
468
|
-
level: 'error',
|
469
|
-
message: 'Cannot find renderer when disposing local stream.',
|
470
|
-
data: streamLogInfo
|
471
|
-
});
|
272
|
+
_logStreamEvent(EventNames.RENDERER_NOT_FOUND, streamLogInfo);
|
472
273
|
}
|
473
274
|
}
|
474
275
|
function disposeViewUnparentedVideo(context, internalContext, stream) {
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
message: 'Start disposing unparented local stream.'
|
479
|
-
});
|
276
|
+
const streamType = stream.mediaStreamType;
|
277
|
+
const streamLogInfo = { streamType, streamEventType: 'disposeViewUnparented' };
|
278
|
+
_logStreamEvent(EventNames.START_DISPOSE_STREAM, streamLogInfo);
|
480
279
|
context.deleteDeviceManagerUnparentedView(stream);
|
481
280
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
482
281
|
if (!renderInfo) {
|
483
|
-
|
484
|
-
name: EventNames.LOCAL_DISPOSE_INFO_NOT_FOUND,
|
485
|
-
level: 'error',
|
486
|
-
message: 'Cannot find render info when disposing unparented local stream.'
|
487
|
-
});
|
282
|
+
_logStreamEvent(EventNames.DISPOSE_INFO_NOT_FOUND, streamLogInfo);
|
488
283
|
return;
|
489
284
|
}
|
490
285
|
if (renderInfo.status === 'Rendering') {
|
491
|
-
|
492
|
-
name: EventNames.LOCAL_STREAM_STOPPING,
|
493
|
-
level: 'info',
|
494
|
-
message: 'Unparented local stream is still rendering. Changing status to stopping.'
|
495
|
-
});
|
286
|
+
_logStreamEvent(EventNames.STREAM_STOPPING, streamLogInfo);
|
496
287
|
internalContext.setUnparentedRenderInfo(stream, renderInfo.stream, 'Stopping', undefined);
|
497
288
|
}
|
498
289
|
else {
|
499
290
|
internalContext.deleteUnparentedRenderInfo(stream);
|
500
291
|
}
|
501
292
|
if (renderInfo.renderer) {
|
502
|
-
|
503
|
-
name: EventNames.DISPOSING_LOCAL_RENDERER,
|
504
|
-
level: 'info',
|
505
|
-
message: 'Disposing unparented local view renderer.'
|
506
|
-
});
|
293
|
+
_logStreamEvent(EventNames.DISPOSING_RENDERER, streamLogInfo);
|
507
294
|
renderInfo.renderer.dispose();
|
508
295
|
}
|
509
296
|
else {
|
510
|
-
|
511
|
-
name: EventNames.LOCAL_RENDERER_NOT_FOUND,
|
512
|
-
level: 'error',
|
513
|
-
message: 'Cannot find renderer when disposing unparented local stream.'
|
514
|
-
});
|
297
|
+
_logStreamEvent(EventNames.RENDERER_NOT_FOUND, streamLogInfo);
|
515
298
|
}
|
516
299
|
}
|
517
300
|
/**
|
518
301
|
* @private
|
519
302
|
*/
|
520
303
|
export function createView(context, internalContext, callId, participantId, stream, options) {
|
521
|
-
|
522
|
-
|
523
|
-
return
|
524
|
-
}
|
525
|
-
else if (!('id' in stream) && callId) {
|
526
|
-
// Render LocalVideoStream that is part of a Call
|
527
|
-
return createViewLocalVideo(context, internalContext, callId, options);
|
304
|
+
const streamType = stream.mediaStreamType;
|
305
|
+
if (callId) {
|
306
|
+
return createViewVideo(context, internalContext, callId, stream, participantId, options);
|
528
307
|
}
|
529
308
|
else if (!('id' in stream) && !callId) {
|
530
309
|
// Render LocalVideoStream that is not part of a Call
|
@@ -533,11 +312,7 @@ export function createView(context, internalContext, callId, participantId, stre
|
|
533
312
|
return context.withAsyncErrorTeedToState(() => __awaiter(this, void 0, void 0, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
|
534
313
|
}
|
535
314
|
else {
|
536
|
-
|
537
|
-
name: EventNames.CREATE_STREAM_INVALID_PARAMS,
|
538
|
-
level: 'warning',
|
539
|
-
message: 'Create View invalid combination of parameters.'
|
540
|
-
});
|
315
|
+
_logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
|
541
316
|
return Promise.resolve(undefined);
|
542
317
|
}
|
543
318
|
}
|
@@ -545,13 +320,9 @@ export function createView(context, internalContext, callId, participantId, stre
|
|
545
320
|
* @private
|
546
321
|
*/
|
547
322
|
export function disposeView(context, internalContext, callId, participantId, stream) {
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
}
|
552
|
-
else if (!('id' in stream) && callId) {
|
553
|
-
// Stop rendering LocalVideoStream that is part of a Call
|
554
|
-
disposeViewLocalVideo(context, internalContext, callId);
|
323
|
+
const streamType = stream.mediaStreamType;
|
324
|
+
if (callId) {
|
325
|
+
disposeViewVideo(context, internalContext, callId, stream, participantId);
|
555
326
|
}
|
556
327
|
else if (!('id' in stream) && !callId) {
|
557
328
|
// Stop rendering LocalVideoStream that is not part of a Call
|
@@ -560,11 +331,7 @@ export function disposeView(context, internalContext, callId, participantId, str
|
|
560
331
|
context.withErrorTeedToState(() => disposeViewUnparentedVideo(context, internalContext, stream), 'Call.stopVideo')();
|
561
332
|
}
|
562
333
|
else {
|
563
|
-
|
564
|
-
name: EventNames.DISPOSE_STREAM_INVALID_PARAMS,
|
565
|
-
level: 'warning',
|
566
|
-
message: 'Dispose View invalid combination of parameters.'
|
567
|
-
});
|
334
|
+
_logStreamEvent(EventNames.DISPOSE_STREAM_INVALID_PARAMS, { streamType });
|
568
335
|
return;
|
569
336
|
}
|
570
337
|
}
|