@azure/communication-react 1.13.0-beta.1 → 1.13.0
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/dist/communication-react.d.ts +157 -1968
- package/dist/dist-cjs/communication-react/index.js +2068 -7634
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/areEqual.d.ts +0 -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 +1 -2
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -5
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +0 -12
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -13
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +0 -4
- 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 +2 -10
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -14
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +0 -10
- package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -15
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -4
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -12
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +0 -6
- package/dist/dist-esm/calling-component-bindings/src/index.js +0 -8
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +2 -8
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +3 -4
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +2 -14
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +1 -20
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +0 -7
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +0 -12
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +2 -9
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +0 -3
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +5 -6
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +1 -15
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +1 -2
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -5
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +3 -24
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -5
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +1 -40
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +8 -12
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +0 -8
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -7
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js +0 -11
- package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +1 -25
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +2 -33
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +2 -2
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +0 -8
- 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 +0 -2
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +1 -5
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +0 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +5 -173
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.d.ts +2 -5
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.js +2 -24
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -3
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js +1 -1
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +1 -4
- 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 +0 -2
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +1 -28
- package/dist/dist-esm/communication-react/src/index.js +0 -14
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/communication-react/src/mergedHooks.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Announcer/Announcer.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Announcer/LiveMessage.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Announcer/MessageBlock.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Announcer.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Caption.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +1 -20
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +2 -7
- 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 -7
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +12 -43
- 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 +1 -23
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +8 -37
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -11
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +2 -10
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -35
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +1 -56
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.d.ts +1 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js +5 -27
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ComplianceBanner/BannerMessage.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ComplianceBanner/ComplianceBanner.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ComplianceBanner/DelayedUpdateBanner.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ControlButtonTooltip.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +7 -8
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +2 -2
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerLightDismiss.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/EndCallButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/FileCard.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +1 -41
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +4 -25
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileUploadCards.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/HighContrastAwareIcon.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -18
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/MessageStatusIndicator.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +2 -47
- package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -16
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +0 -14
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +0 -3
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -21
- package/dist/dist-esm/react-components/src/components/ParticipantList.js +4 -22
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/PictureInPictureInPicture/PictureInPictureInPicture.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/RaiseHandButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +6 -25
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/SendBox.d.ts +0 -42
- package/dist/dist-esm/react-components/src/components/SendBox.js +9 -81
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +1 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/StreamMedia.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/SystemMessage.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/TypingIndicator.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -2
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -2
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -24
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -2
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +1 -1
- 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 +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FocusContentLayout.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +1 -5
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +3 -18
- 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 +0 -9
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +6 -42
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +1 -9
- package/dist/dist-esm/react-components/src/components/VideoTile.js +7 -41
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.js +56 -56
- package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -21
- package/dist/dist-esm/react-components/src/components/index.js +0 -12
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +12 -5
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +5 -3
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.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/SendBox.styles.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -3
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +6 -3
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +14 -6
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/common.js +0 -4
- package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -5
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +0 -1
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -60
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +4 -2
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +9 -3
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -13
- package/dist/dist-esm/react-components/src/theming/icons.js +3 -111
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/themes.d.ts +2 -21
- package/dist/dist-esm/react-components/src/theming/themes.js +0 -16
- package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -34
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/OnRender.d.ts +0 -9
- package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +1 -44
- package/dist/dist-esm/react-components/src/types/ReactionTypes.js +1 -2
- package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +0 -6
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js +0 -2
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +1 -74
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +15 -28
- 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 +29 -105
- 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 +50 -75
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +101 -289
- 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 +17 -99
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
- 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/createHandlers.d.ts +1 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +1 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +3 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +0 -2
- 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.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +11 -25
- 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.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -38
- 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/CapabilitiesChangedNotificationBar.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -27
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -20
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -27
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +5 -31
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +2 -5
- 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/MutedNotification.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/StartCallButton.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SvgWithWordWrapping.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/RaiseHand.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +2 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +7 -20
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +4 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +0 -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/CallPage.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +44 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +6 -80
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/{HoldPage.d.ts → DtmfDialpadPage.d.ts} +8 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +80 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +3 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js +11 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.js +18 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +26 -0
- 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.d.ts +15 -16
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +24 -97
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/timerUtils.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/timerUtils.js +30 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/timerUtils.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +1 -62
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -31
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButton.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButtonWithUnreadMessagesBadge.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/NotificationIcon.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -32
- 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 +10 -33
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +16 -108
- 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 +5 -55
- 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 -10
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +7 -37
- 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 +0 -13
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +1 -37
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -22
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +1 -9
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -21
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatHeader.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +6 -133
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +3 -32
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +5 -129
- 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/AzureCommunicationFileUploadAdapter.d.ts +0 -28
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +1 -159
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -17
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js +1 -8
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +1 -3
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/usePropsFor.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -6
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +0 -15
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +0 -6
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +2 -3
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +25 -14
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +40 -27
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DtmfDialerButton.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DtmfDialerButton.js +41 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DtmfDialerButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionSettingsDrawer.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +8 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +43 -28
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/MoreButton.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -3
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +2 -14
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +4 -24
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +5 -13
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +8 -13
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +20 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +29 -2
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +4 -4
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +0 -45
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +0 -91
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +0 -19
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +0 -91
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +0 -23
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -49
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +0 -1
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.d.ts +0 -32
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js +0 -129
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -43
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -75
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -68
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -39
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +0 -49
- package/dist/dist-esm/react-components/src/components/HoldButton.js +0 -25
- package/dist/dist-esm/react-components/src/components/HoldButton.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +0 -71
- package/dist/dist-esm/react-components/src/components/ImageGallery.js +0 -56
- package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
- package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -123
- package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -816
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
- package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
- package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +0 -68
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +0 -205
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
- package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
- package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -92
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
- package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
- package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -67
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
- package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
- package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
- package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
- package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -48
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -218
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +0 -12
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +0 -93
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +0 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +0 -26
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +0 -28
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -54
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +0 -32
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +0 -81
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.d.ts +0 -15
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js +0 -23
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +0 -6
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +0 -11
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -12
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -15
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +0 -27
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js +0 -14
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +0 -22
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +0 -107
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +0 -17
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +0 -32
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +0 -22
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +0 -74
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +0 -15
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +0 -61
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +0 -1
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { AudioDeviceInfo, VideoDeviceInfo } from '@azure/communication-calling';
|
3
2
|
import { VideoStreamOptions } from "../../../../../react-components/src";
|
4
3
|
/**
|
@@ -16,7 +15,6 @@ export interface LocalDeviceSettingsType {
|
|
16
15
|
onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;
|
17
16
|
onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;
|
18
17
|
onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;
|
19
|
-
onClickEnableDevicePermission?: () => void;
|
20
18
|
onClickVideoEffects?: () => void;
|
21
19
|
}
|
22
20
|
/**
|
@@ -3,9 +3,7 @@
|
|
3
3
|
import { Dropdown, Label, mergeStyles, Stack } from '@fluentui/react';
|
4
4
|
/* @conditional-compile-remove(video-background-effects) */
|
5
5
|
import { DefaultButton } from '@fluentui/react';
|
6
|
-
|
7
|
-
import { useEffect } from 'react';
|
8
|
-
import { useTheme, _DevicePermissionDropdown } from "../../../../../react-components/src";
|
6
|
+
import { useTheme } from "../../../../../react-components/src";
|
9
7
|
import React from 'react';
|
10
8
|
import { CallCompositeIcon } from '../../common/icons';
|
11
9
|
import { useLocale } from '../../localization';
|
@@ -14,8 +12,6 @@ import { dropDownStyles, dropDownTitleIconStyles, mainStackTokens, optionIconSty
|
|
14
12
|
import { useAdapter } from '../adapter/CallAdapterProvider';
|
15
13
|
import { ConfigurationPageCameraDropdown } from './ConfigurationPageCameraDropdown';
|
16
14
|
import { ConfigurationPageMicDropdown } from './ConfigurationPageMicDropdown';
|
17
|
-
/* @conditional-compile-remove(call-readiness) */
|
18
|
-
import { useHandlers } from '../hooks/useHandlers';
|
19
15
|
import { cameraAndVideoEffectsContainerStyleDesktop } from '../styles/CallConfiguration.styles';
|
20
16
|
/* @conditional-compile-remove(video-background-effects) */
|
21
17
|
import { effectsButtonStyles } from '../styles/CallConfiguration.styles';
|
@@ -62,7 +58,7 @@ const localVideoViewOptions = {
|
|
62
58
|
* @private
|
63
59
|
*/
|
64
60
|
export const LocalDeviceSettings = (props) => {
|
65
|
-
var _a, _b
|
61
|
+
var _a, _b;
|
66
62
|
const theme = useTheme();
|
67
63
|
const locale = useLocale();
|
68
64
|
/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(video-background-effects) */ /* @conditional-compile-remove(rooms) */
|
@@ -88,27 +84,13 @@ export const LocalDeviceSettings = (props) => {
|
|
88
84
|
// TODO: speaker permission is tied to microphone permission (when you request 'audio' permission using the SDK) its
|
89
85
|
// actually granting access to query both microphone and speaker. However the browser popup asks you explicity for
|
90
86
|
// 'microphone'. This needs investigation on how we want to handle this and maybe needs follow up with SDK team.
|
91
|
-
/* @conditional-compile-remove(call-readiness) */
|
92
|
-
useEffect(() => {
|
93
|
-
if (cameraPermissionGranted) {
|
94
|
-
adapter.queryCameras();
|
95
|
-
}
|
96
|
-
if (micPermissionGranted) {
|
97
|
-
adapter.queryMicrophones();
|
98
|
-
}
|
99
|
-
adapter.querySpeakers();
|
100
|
-
}, [adapter, cameraPermissionGranted, micPermissionGranted]);
|
101
|
-
/* @conditional-compile-remove(call-readiness) */
|
102
|
-
const dropdownProps = useHandlers(_DevicePermissionDropdown);
|
103
87
|
const hasCameras = props.cameras.length > 0;
|
104
88
|
const hasMicrophones = props.microphones.length > 0;
|
105
89
|
const hasSpeakers = props.speakers.length > 0;
|
106
|
-
/* @conditional-compile-remove(unsupported-browser) */
|
107
|
-
const isSafariWithNoSpeakers = ((_b = adapter.getState().environmentInfo) === null || _b === void 0 ? void 0 : _b.environment.browser.toLowerCase()) === 'safari' && !hasSpeakers;
|
108
90
|
const cameraGrantedDropdown = React.createElement(Dropdown, { "data-ui-id": "call-composite-local-camera-settings", "aria-labelledby": 'call-composite-local-camera-settings-label', placeholder: hasCameras ? defaultPlaceHolder : noCameraLabel, options: cameraPermissionGranted ? getDropDownList(props.cameras) : [{
|
109
91
|
key: 'deniedOrUnknown',
|
110
92
|
text: ''
|
111
|
-
}], styles: dropDownStyles(theme), disabled: !cameraPermissionGranted || !hasCameras, errorMessage: props.cameraPermissionGranted === undefined || props.cameraPermissionGranted ? undefined : locale.strings.call.cameraPermissionDenied, defaultSelectedKey: micPermissionGranted ? props.selectedCamera ? props.selectedCamera.id : props.cameras ? (
|
93
|
+
}], styles: dropDownStyles(theme), disabled: !cameraPermissionGranted || !hasCameras, errorMessage: props.cameraPermissionGranted === undefined || props.cameraPermissionGranted ? undefined : locale.strings.call.cameraPermissionDenied, defaultSelectedKey: micPermissionGranted ? props.selectedCamera ? props.selectedCamera.id : props.cameras ? (_b = props.cameras[0]) === null || _b === void 0 ? void 0 : _b.id : '' : 'deniedOrUnknown', onChange: (event, option, index) => {
|
112
94
|
props.onSelectCamera(props.cameras[index !== null && index !== void 0 ? index : 0], localVideoViewOptions);
|
113
95
|
}, onRenderTitle: (props) => onRenderTitle('Camera', props) });
|
114
96
|
const micGrantedDropdown = React.createElement(React.Fragment, null, roleCanUseMic && React.createElement(Dropdown, { "aria-labelledby": 'call-composite-local-sound-settings-label', placeholder: hasMicrophones ? defaultPlaceHolder : noMicLabel, styles: dropDownStyles(theme), disabled: !micPermissionGranted || !hasMicrophones, errorMessage: props.microphonePermissionGranted === undefined || props.microphonePermissionGranted ? undefined : locale.strings.call.microphonePermissionDenied, options: micPermissionGranted ? getDropDownList(props.microphones) : [{
|
@@ -121,10 +103,6 @@ export const LocalDeviceSettings = (props) => {
|
|
121
103
|
props.onSelectSpeaker(props.speakers[index !== null && index !== void 0 ? index : 0]);
|
122
104
|
}, onRenderTitle: (props) => onRenderTitle('Speaker', props) });
|
123
105
|
const SafariBrowserSpeakerDropdownTrampoline = () => {
|
124
|
-
/* @conditional-compile-remove(unsupported-browser) */
|
125
|
-
if (isSafariWithNoSpeakers) {
|
126
|
-
return React.createElement(React.Fragment, null);
|
127
|
-
}
|
128
106
|
return speakerDropdown;
|
129
107
|
};
|
130
108
|
return React.createElement(Stack, { "data-ui-id": "call-composite-device-settings", tokens: mainStackTokens },
|
@@ -134,15 +112,11 @@ export const LocalDeviceSettings = (props) => {
|
|
134
112
|
onResolveVideoEffectDependency && React.createElement(DefaultButton, { iconProps: {
|
135
113
|
iconName: 'ConfigurationScreenVideoEffectsButton'
|
136
114
|
}, styles: effectsButtonStyles(theme), onClick: props.onClickVideoEffects, "data-ui-id": 'call-config-video-effects-button' }, locale.strings.call.configurationPageVideoEffectsButtonLabel)),
|
137
|
-
React.createElement(ConfigurationPageCameraDropdown, { cameraGrantedDropdown: cameraGrantedDropdown, cameraPermissionGranted: cameraPermissionGranted !== null && cameraPermissionGranted !== void 0 ? cameraPermissionGranted : false,
|
138
|
-
/* @conditional-compile-remove(call-readiness) */ dropdownProps: dropdownProps,
|
139
|
-
/* @conditional-compile-remove(call-readiness) */ onClickEnableDevicePermission: props.onClickEnableDevicePermission })),
|
115
|
+
React.createElement(ConfigurationPageCameraDropdown, { cameraGrantedDropdown: cameraGrantedDropdown, cameraPermissionGranted: cameraPermissionGranted !== null && cameraPermissionGranted !== void 0 ? cameraPermissionGranted : false })),
|
140
116
|
React.createElement(Stack, null,
|
141
117
|
React.createElement(Label, { id: 'call-composite-local-sound-settings-label', className: mergeStyles(dropDownStyles(theme).label), disabled: !micPermissionGranted }, soundLabel),
|
142
118
|
React.createElement(Stack, { "data-ui-id": "call-composite-sound-settings", tokens: soundStackTokens },
|
143
|
-
React.createElement(ConfigurationPageMicDropdown, { micGrantedDropdown: micGrantedDropdown, micPermissionGranted: micPermissionGranted !== null && micPermissionGranted !== void 0 ? micPermissionGranted : false,
|
144
|
-
/* @conditional-compile-remove(call-readiness) */ dropdownProps: dropdownProps,
|
145
|
-
/* @conditional-compile-remove(call-readiness) */ onClickEnableDevicePermission: props.onClickEnableDevicePermission }),
|
119
|
+
React.createElement(ConfigurationPageMicDropdown, { micGrantedDropdown: micGrantedDropdown, micPermissionGranted: micPermissionGranted !== null && micPermissionGranted !== void 0 ? micPermissionGranted : false }),
|
146
120
|
React.createElement(SafariBrowserSpeakerDropdownTrampoline, null))));
|
147
121
|
};
|
148
122
|
const defaultDeviceId = (devices) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalDeviceSettings.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,QAAQ,EAAmB,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACvF,2DAA2D;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,iDAAiD;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAsB,yBAAyB,EAAE,4CAAmC;AACrG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACpJ,iDAAiD,CAAC,wCAAwC,CAAC,2DAA2D;AACtJ,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,iDAAiD;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,0CAA0C,EAAE,MAAM,oCAAoC,CAAC;AAChG,2DAA2D;AAC3D,OAAO,EAAE,mBA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AC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AudioDeviceInfo, VideoDeviceInfo } from '@azure/communication-calling';\nimport { Dropdown, IDropdownOption, Label, mergeStyles, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { DefaultButton } from '@fluentui/react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useEffect } from 'react';\nimport { useTheme, VideoStreamOptions, _DevicePermissionDropdown } from '@internal/react-components';\nimport React from 'react';\nimport { CallCompositeIcon } from '../../common/icons';\nimport { useLocale } from '../../localization';\nimport { dropDownStyles, dropDownTitleIconStyles, mainStackTokens, optionIconStyles, soundStackTokens } from '../styles/LocalDeviceSettings.styles';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(video-background-effects) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { ConfigurationPageCameraDropdown } from './ConfigurationPageCameraDropdown';\nimport { ConfigurationPageMicDropdown } from './ConfigurationPageMicDropdown';\n/* @conditional-compile-remove(call-readiness) */\nimport { useHandlers } from '../hooks/useHandlers';\nimport { cameraAndVideoEffectsContainerStyleDesktop } from '../styles/CallConfiguration.styles';\n/* @conditional-compile-remove(video-background-effects) */\nimport { effectsButtonStyles } from '../styles/CallConfiguration.styles';\ntype iconType = 'Camera' | 'Microphone' | 'Speaker';\nconst getDropDownList = (list: Array<VideoDeviceInfo | AudioDeviceInfo>): IDropdownOption[] => {\n // Remove duplicates\n const noDuplicates = new Map<string, VideoDeviceInfo | AudioDeviceInfo>();\n for (const item of list) {\n noDuplicates.set(item.id, item);\n }\n const dropdownList: IDropdownOption[] = [];\n for (const item of noDuplicates.values()) {\n dropdownList.push({\n key: item.id,\n text: item.name === '' ? item.deviceType : item.name\n });\n }\n return dropdownList;\n};\nconst getOptionIcon = (type: iconType): JSX.Element | undefined => {\n if (type === 'Camera') {\n return <CallCompositeIcon iconName=\"LocalDeviceSettingsCamera\" className={optionIconStyles} />;\n } else if (type === 'Microphone') {\n return <CallCompositeIcon iconName=\"LocalDeviceSettingsMic\" className={optionIconStyles} />;\n } else if (type === 'Speaker') {\n return <CallCompositeIcon iconName=\"LocalDeviceSettingsSpeaker\" className={optionIconStyles} />;\n } else {\n return undefined;\n }\n};\nconst onRenderTitle = (iconType: iconType, props?: IDropdownOption[]): JSX.Element => {\n const icon = props && getOptionIcon(iconType);\n return props ? <div className={dropDownTitleIconStyles}>\n {icon}\n <span>{props[0].text}</span>\n </div> : <></>;\n};\nconst localVideoViewOptions = ({\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions);\n\n/**\n * @private\n */\nexport interface LocalDeviceSettingsType {\n cameras: VideoDeviceInfo[];\n microphones: AudioDeviceInfo[];\n speakers: AudioDeviceInfo[];\n selectedCamera?: VideoDeviceInfo;\n selectedMicrophone?: AudioDeviceInfo;\n selectedSpeaker?: AudioDeviceInfo;\n microphonePermissionGranted: boolean | undefined;\n cameraPermissionGranted: boolean | undefined;\n onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;\n onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;\n onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission?: () => void;\n /* @conditional-compile-remove(video-background-effects) */\n onClickVideoEffects?: () => void;\n}\n\n/**\n * @private\n */\nexport const LocalDeviceSettings = (props: LocalDeviceSettingsType): JSX.Element => {\n const theme = useTheme();\n const locale = useLocale();\n /* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(video-background-effects) */ /* @conditional-compile-remove(rooms) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(video-background-effects) */\n const onResolveVideoEffectDependency = adapter.getState().onResolveVideoEffectDependency;\n const defaultPlaceHolder = locale.strings.call.defaultPlaceHolder;\n const cameraLabel = locale.strings.call.cameraLabel;\n const soundLabel = locale.strings.call.soundLabel;\n const noSpeakersLabel = locale.strings.call.noSpeakersLabel;\n const noCameraLabel = locale.strings.call.noCamerasLabel;\n const noMicLabel = locale.strings.call.noMicrophonesLabel;\n /* @conditional-compile-remove(rooms) */\n const role = adapter.getState().call?.role;\n const cameraPermissionGranted = props.cameraPermissionGranted;\n const micPermissionGranted = props.microphonePermissionGranted;\n let roleCanUseCamera = true;\n let roleCanUseMic = true;\n\n /* @conditional-compile-remove(rooms) */\n roleCanUseCamera = role === 'Consumer' ? false : true;\n /* @conditional-compile-remove(rooms) */\n roleCanUseMic = role === 'Consumer' ? false : true;\n\n // TODO: speaker permission is tied to microphone permission (when you request 'audio' permission using the SDK) its\n // actually granting access to query both microphone and speaker. However the browser popup asks you explicity for\n // 'microphone'. This needs investigation on how we want to handle this and maybe needs follow up with SDK team.\n /* @conditional-compile-remove(call-readiness) */\n useEffect(() => {\n if (cameraPermissionGranted) {\n adapter.queryCameras();\n }\n if (micPermissionGranted) {\n adapter.queryMicrophones();\n }\n adapter.querySpeakers();\n }, [adapter, cameraPermissionGranted, micPermissionGranted]);\n\n /* @conditional-compile-remove(call-readiness) */\n const dropdownProps = useHandlers(_DevicePermissionDropdown);\n const hasCameras = props.cameras.length > 0;\n const hasMicrophones = props.microphones.length > 0;\n const hasSpeakers = props.speakers.length > 0;\n /* @conditional-compile-remove(unsupported-browser) */\n const isSafariWithNoSpeakers = adapter.getState().environmentInfo?.environment.browser.toLowerCase() === 'safari' && !hasSpeakers;\n const cameraGrantedDropdown = <Dropdown data-ui-id=\"call-composite-local-camera-settings\" aria-labelledby={'call-composite-local-camera-settings-label'} placeholder={hasCameras ? defaultPlaceHolder : noCameraLabel} options={cameraPermissionGranted ? getDropDownList(props.cameras) : [{\n key: 'deniedOrUnknown',\n text: ''\n }]} styles={dropDownStyles(theme)} disabled={!cameraPermissionGranted || !hasCameras} errorMessage={props.cameraPermissionGranted === undefined || props.cameraPermissionGranted ? undefined : locale.strings.call.cameraPermissionDenied} defaultSelectedKey={micPermissionGranted ? props.selectedCamera ? props.selectedCamera.id : props.cameras ? props.cameras[0]?.id : '' : 'deniedOrUnknown'} onChange={(event, option, index) => {\n props.onSelectCamera(props.cameras[index ?? 0], localVideoViewOptions);\n }} onRenderTitle={(props?: IDropdownOption[]) => onRenderTitle('Camera', props)} />;\n const micGrantedDropdown = <>\n {roleCanUseMic && <Dropdown aria-labelledby={'call-composite-local-sound-settings-label'} placeholder={hasMicrophones ? defaultPlaceHolder : noMicLabel} styles={dropDownStyles(theme)} disabled={!micPermissionGranted || !hasMicrophones} errorMessage={props.microphonePermissionGranted === undefined || props.microphonePermissionGranted ? undefined : locale.strings.call.microphonePermissionDenied} options={micPermissionGranted ? getDropDownList(props.microphones) : [{\n key: 'deniedOrUnknown',\n text: ''\n }]} defaultSelectedKey={micPermissionGranted ? props.selectedMicrophone ? props.selectedMicrophone.id : defaultDeviceId(props.microphones) : 'deniedOrUnknown'} onChange={(event: React.FormEvent<HTMLDivElement>, option?: IDropdownOption | undefined, index?: number | undefined) => {\n props.onSelectMicrophone(props.microphones[index ?? 0]);\n }} onRenderTitle={(props?: IDropdownOption[]) => onRenderTitle('Microphone', props)} />}\n </>;\n const speakerDropdown = <Dropdown aria-labelledby={'call-composite-local-sound-settings-label'} placeholder={hasSpeakers ? defaultPlaceHolder : noSpeakersLabel} styles={dropDownStyles(theme)} disabled={props.speakers.length === 0} options={getDropDownList(props.speakers)} defaultSelectedKey={props.selectedSpeaker ? props.selectedSpeaker.id : defaultDeviceId(props.speakers)} onChange={(event: React.FormEvent<HTMLDivElement>, option?: IDropdownOption | undefined, index?: number | undefined) => {\n props.onSelectSpeaker(props.speakers[index ?? 0]);\n }} onRenderTitle={(props?: IDropdownOption[]) => onRenderTitle('Speaker', props)} />;\n const SafariBrowserSpeakerDropdownTrampoline = (): JSX.Element => {\n /* @conditional-compile-remove(unsupported-browser) */\n if (isSafariWithNoSpeakers) {\n return <></>;\n }\n return speakerDropdown;\n };\n return <Stack data-ui-id=\"call-composite-device-settings\" tokens={mainStackTokens}>\n {roleCanUseCamera && <Stack>\n <Stack horizontal horizontalAlign=\"space-between\" styles={cameraAndVideoEffectsContainerStyleDesktop}>\n <Label id={'call-composite-local-camera-settings-label'} className={mergeStyles(dropDownStyles(theme).label)} disabled={!cameraPermissionGranted} // follows dropdown disabled state\n >\n {cameraLabel}\n </Label>\n {/* @conditional-compile-remove(video-background-effects) */\n onResolveVideoEffectDependency && <DefaultButton iconProps={{\n iconName: 'ConfigurationScreenVideoEffectsButton'\n }} styles={effectsButtonStyles(theme)} onClick={props.onClickVideoEffects} data-ui-id={'call-config-video-effects-button'}>\n {locale.strings.call.configurationPageVideoEffectsButtonLabel}\n </DefaultButton>}\n </Stack>\n <ConfigurationPageCameraDropdown cameraGrantedDropdown={cameraGrantedDropdown} cameraPermissionGranted={cameraPermissionGranted ?? false}\n /* @conditional-compile-remove(call-readiness) */ dropdownProps={dropdownProps}\n /* @conditional-compile-remove(call-readiness) */ onClickEnableDevicePermission={props.onClickEnableDevicePermission} />\n </Stack>}\n <Stack>\n <Label id={'call-composite-local-sound-settings-label'} className={mergeStyles(dropDownStyles(theme).label)} disabled={!micPermissionGranted} // follows Start button disabled state in ConfigurationPage\n >\n {soundLabel}\n </Label>\n <Stack data-ui-id=\"call-composite-sound-settings\" tokens={soundStackTokens}>\n <ConfigurationPageMicDropdown micGrantedDropdown={micGrantedDropdown} micPermissionGranted={micPermissionGranted ?? false}\n /* @conditional-compile-remove(call-readiness) */ dropdownProps={dropdownProps}\n /* @conditional-compile-remove(call-readiness) */ onClickEnableDevicePermission={props.onClickEnableDevicePermission} />\n <SafariBrowserSpeakerDropdownTrampoline />\n </Stack>\n </Stack>\n </Stack>;\n};\nconst defaultDeviceId = (devices: AudioDeviceInfo[]): string => {\n if (devices.length === 0) {\n return '';\n }\n const defaultDevice = devices.find(device => device.isSystemDefault);\n if (defaultDevice) {\n return defaultDevice.id;\n }\n return devices[0].id;\n};"]}
|
1
|
+
{"version":3,"file":"LocalDeviceSettings.js","sourceRoot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,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AudioDeviceInfo, VideoDeviceInfo } from '@azure/communication-calling';\nimport { Dropdown, IDropdownOption, Label, mergeStyles, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { DefaultButton } from '@fluentui/react';\nimport { useTheme, VideoStreamOptions, _DevicePermissionDropdown } from '@internal/react-components';\nimport React from 'react';\nimport { CallCompositeIcon } from '../../common/icons';\nimport { useLocale } from '../../localization';\nimport { dropDownStyles, dropDownTitleIconStyles, mainStackTokens, optionIconStyles, soundStackTokens } from '../styles/LocalDeviceSettings.styles';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(video-background-effects) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { ConfigurationPageCameraDropdown } from './ConfigurationPageCameraDropdown';\nimport { ConfigurationPageMicDropdown } from './ConfigurationPageMicDropdown';\nimport { cameraAndVideoEffectsContainerStyleDesktop } from '../styles/CallConfiguration.styles';\n/* @conditional-compile-remove(video-background-effects) */\nimport { effectsButtonStyles } from '../styles/CallConfiguration.styles';\ntype iconType = 'Camera' | 'Microphone' | 'Speaker';\nconst getDropDownList = (list: Array<VideoDeviceInfo | AudioDeviceInfo>): IDropdownOption[] => {\n // Remove duplicates\n const noDuplicates = new Map<string, VideoDeviceInfo | AudioDeviceInfo>();\n for (const item of list) {\n noDuplicates.set(item.id, item);\n }\n const dropdownList: IDropdownOption[] = [];\n for (const item of noDuplicates.values()) {\n dropdownList.push({\n key: item.id,\n text: item.name === '' ? item.deviceType : item.name\n });\n }\n return dropdownList;\n};\nconst getOptionIcon = (type: iconType): JSX.Element | undefined => {\n if (type === 'Camera') {\n return <CallCompositeIcon iconName=\"LocalDeviceSettingsCamera\" className={optionIconStyles} />;\n } else if (type === 'Microphone') {\n return <CallCompositeIcon iconName=\"LocalDeviceSettingsMic\" className={optionIconStyles} />;\n } else if (type === 'Speaker') {\n return <CallCompositeIcon iconName=\"LocalDeviceSettingsSpeaker\" className={optionIconStyles} />;\n } else {\n return undefined;\n }\n};\nconst onRenderTitle = (iconType: iconType, props?: IDropdownOption[]): JSX.Element => {\n const icon = props && getOptionIcon(iconType);\n return props ? <div className={dropDownTitleIconStyles}>\n {icon}\n <span>{props[0].text}</span>\n </div> : <></>;\n};\nconst localVideoViewOptions = ({\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions);\n\n/**\n * @private\n */\nexport interface LocalDeviceSettingsType {\n cameras: VideoDeviceInfo[];\n microphones: AudioDeviceInfo[];\n speakers: AudioDeviceInfo[];\n selectedCamera?: VideoDeviceInfo;\n selectedMicrophone?: AudioDeviceInfo;\n selectedSpeaker?: AudioDeviceInfo;\n microphonePermissionGranted: boolean | undefined;\n cameraPermissionGranted: boolean | undefined;\n onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;\n onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;\n onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;\n /* @conditional-compile-remove(video-background-effects) */\n onClickVideoEffects?: () => void;\n}\n\n/**\n * @private\n */\nexport const LocalDeviceSettings = (props: LocalDeviceSettingsType): JSX.Element => {\n const theme = useTheme();\n const locale = useLocale();\n /* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(video-background-effects) */ /* @conditional-compile-remove(rooms) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(video-background-effects) */\n const onResolveVideoEffectDependency = adapter.getState().onResolveVideoEffectDependency;\n const defaultPlaceHolder = locale.strings.call.defaultPlaceHolder;\n const cameraLabel = locale.strings.call.cameraLabel;\n const soundLabel = locale.strings.call.soundLabel;\n const noSpeakersLabel = locale.strings.call.noSpeakersLabel;\n const noCameraLabel = locale.strings.call.noCamerasLabel;\n const noMicLabel = locale.strings.call.noMicrophonesLabel;\n /* @conditional-compile-remove(rooms) */\n const role = adapter.getState().call?.role;\n const cameraPermissionGranted = props.cameraPermissionGranted;\n const micPermissionGranted = props.microphonePermissionGranted;\n let roleCanUseCamera = true;\n let roleCanUseMic = true;\n\n /* @conditional-compile-remove(rooms) */\n roleCanUseCamera = role === 'Consumer' ? false : true;\n /* @conditional-compile-remove(rooms) */\n roleCanUseMic = role === 'Consumer' ? false : true;\n\n // TODO: speaker permission is tied to microphone permission (when you request 'audio' permission using the SDK) its\n // actually granting access to query both microphone and speaker. However the browser popup asks you explicity for\n // 'microphone'. This needs investigation on how we want to handle this and maybe needs follow up with SDK team.\n const hasCameras = props.cameras.length > 0;\n const hasMicrophones = props.microphones.length > 0;\n const hasSpeakers = props.speakers.length > 0;\n const cameraGrantedDropdown = <Dropdown data-ui-id=\"call-composite-local-camera-settings\" aria-labelledby={'call-composite-local-camera-settings-label'} placeholder={hasCameras ? defaultPlaceHolder : noCameraLabel} options={cameraPermissionGranted ? getDropDownList(props.cameras) : [{\n key: 'deniedOrUnknown',\n text: ''\n }]} styles={dropDownStyles(theme)} disabled={!cameraPermissionGranted || !hasCameras} errorMessage={props.cameraPermissionGranted === undefined || props.cameraPermissionGranted ? undefined : locale.strings.call.cameraPermissionDenied} defaultSelectedKey={micPermissionGranted ? props.selectedCamera ? props.selectedCamera.id : props.cameras ? props.cameras[0]?.id : '' : 'deniedOrUnknown'} onChange={(event, option, index) => {\n props.onSelectCamera(props.cameras[index ?? 0], localVideoViewOptions);\n }} onRenderTitle={(props?: IDropdownOption[]) => onRenderTitle('Camera', props)} />;\n const micGrantedDropdown = <>\n {roleCanUseMic && <Dropdown aria-labelledby={'call-composite-local-sound-settings-label'} placeholder={hasMicrophones ? defaultPlaceHolder : noMicLabel} styles={dropDownStyles(theme)} disabled={!micPermissionGranted || !hasMicrophones} errorMessage={props.microphonePermissionGranted === undefined || props.microphonePermissionGranted ? undefined : locale.strings.call.microphonePermissionDenied} options={micPermissionGranted ? getDropDownList(props.microphones) : [{\n key: 'deniedOrUnknown',\n text: ''\n }]} defaultSelectedKey={micPermissionGranted ? props.selectedMicrophone ? props.selectedMicrophone.id : defaultDeviceId(props.microphones) : 'deniedOrUnknown'} onChange={(event: React.FormEvent<HTMLDivElement>, option?: IDropdownOption | undefined, index?: number | undefined) => {\n props.onSelectMicrophone(props.microphones[index ?? 0]);\n }} onRenderTitle={(props?: IDropdownOption[]) => onRenderTitle('Microphone', props)} />}\n </>;\n const speakerDropdown = <Dropdown aria-labelledby={'call-composite-local-sound-settings-label'} placeholder={hasSpeakers ? defaultPlaceHolder : noSpeakersLabel} styles={dropDownStyles(theme)} disabled={props.speakers.length === 0} options={getDropDownList(props.speakers)} defaultSelectedKey={props.selectedSpeaker ? props.selectedSpeaker.id : defaultDeviceId(props.speakers)} onChange={(event: React.FormEvent<HTMLDivElement>, option?: IDropdownOption | undefined, index?: number | undefined) => {\n props.onSelectSpeaker(props.speakers[index ?? 0]);\n }} onRenderTitle={(props?: IDropdownOption[]) => onRenderTitle('Speaker', props)} />;\n const SafariBrowserSpeakerDropdownTrampoline = (): JSX.Element => {\n return speakerDropdown;\n };\n return <Stack data-ui-id=\"call-composite-device-settings\" tokens={mainStackTokens}>\n {roleCanUseCamera && <Stack>\n <Stack horizontal horizontalAlign=\"space-between\" styles={cameraAndVideoEffectsContainerStyleDesktop}>\n <Label id={'call-composite-local-camera-settings-label'} className={mergeStyles(dropDownStyles(theme).label)} disabled={!cameraPermissionGranted} // follows dropdown disabled state\n >\n {cameraLabel}\n </Label>\n {/* @conditional-compile-remove(video-background-effects) */\n onResolveVideoEffectDependency && <DefaultButton iconProps={{\n iconName: 'ConfigurationScreenVideoEffectsButton'\n }} styles={effectsButtonStyles(theme)} onClick={props.onClickVideoEffects} data-ui-id={'call-config-video-effects-button'}>\n {locale.strings.call.configurationPageVideoEffectsButtonLabel}\n </DefaultButton>}\n </Stack>\n <ConfigurationPageCameraDropdown cameraGrantedDropdown={cameraGrantedDropdown} cameraPermissionGranted={cameraPermissionGranted ?? false} />\n </Stack>}\n <Stack>\n <Label id={'call-composite-local-sound-settings-label'} className={mergeStyles(dropDownStyles(theme).label)} disabled={!micPermissionGranted} // follows Start button disabled state in ConfigurationPage\n >\n {soundLabel}\n </Label>\n <Stack data-ui-id=\"call-composite-sound-settings\" tokens={soundStackTokens}>\n <ConfigurationPageMicDropdown micGrantedDropdown={micGrantedDropdown} micPermissionGranted={micPermissionGranted ?? false} />\n <SafariBrowserSpeakerDropdownTrampoline />\n </Stack>\n </Stack>\n </Stack>;\n};\nconst defaultDeviceId = (devices: AudioDeviceInfo[]): string => {\n if (devices.length === 0) {\n return '';\n }\n const defaultDevice = devices.find(device => device.isSystemDefault);\n if (defaultDevice) {\n return defaultDevice.id;\n }\n return devices[0].id;\n};"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js
CHANGED
@@ -71,7 +71,6 @@ export const MediaGallery = (props) => {
|
|
71
71
|
}
|
72
72
|
} }, (options === null || options === void 0 ? void 0 : options.coinSize) && React.createElement(AvatarPersona, Object.assign({ userId: userId }, options, { dataProvider: props.onFetchAvatarPersonaData }))));
|
73
73
|
}, [props.onFetchAvatarPersonaData]);
|
74
|
-
/* @conditional-compile-remove(pinned-participants) */
|
75
74
|
const remoteVideoTileMenuOptions = useMemo(() => {
|
76
75
|
var _a;
|
77
76
|
return ((_a = props.remoteVideoTileMenuOptions) === null || _a === void 0 ? void 0 : _a.isHidden) ? false : props.isMobile ? {
|
@@ -95,13 +94,11 @@ export const MediaGallery = (props) => {
|
|
95
94
|
return props.localVideoTileOptions ? layoutBasedOnTilePosition : props.userSetGalleryLayout;
|
96
95
|
return layoutBasedOnTilePosition;
|
97
96
|
};
|
98
|
-
return React.createElement(VideoGallery, Object.assign({}, videoGalleryProps, { localVideoViewOptions: localVideoViewOptions, remoteVideoViewOptions: remoteVideoViewOptions, styles: VideoGalleryStyles, layout: layoutBasedOnUserSelection(), showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar,
|
99
|
-
/* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenu: remoteVideoTileMenuOptions,
|
97
|
+
return React.createElement(VideoGallery, Object.assign({}, videoGalleryProps, { localVideoViewOptions: localVideoViewOptions, remoteVideoViewOptions: remoteVideoViewOptions, styles: VideoGalleryStyles, layout: layoutBasedOnUserSelection(), showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar, remoteVideoTileMenu: remoteVideoTileMenuOptions,
|
100
98
|
/* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition: overflowGalleryPosition,
|
101
99
|
/* @conditional-compile-remove(rooms) */ localVideoTileSize: props.localVideoTileOptions === false || userRole === 'Consumer' || isRoomsCall && userRole === 'Unknown' ? 'hidden' : props.isMobile && containerAspectRatio < 1 ? '9:16' : '16:9' }));
|
102
100
|
}, [videoGalleryProps, props.isMobile, /* @conditional-compile-remove(rooms) */
|
103
|
-
props.localVideoTileOptions, cameraSwitcherProps, onRenderAvatar, /* @conditional-compile-remove(
|
104
|
-
remoteVideoTileMenuOptions, /* @conditional-compile-remove(vertical-gallery) */
|
101
|
+
props.localVideoTileOptions, cameraSwitcherProps, onRenderAvatar, remoteVideoTileMenuOptions, /* @conditional-compile-remove(vertical-gallery) */
|
105
102
|
overflowGalleryPosition, /* @conditional-compile-remove(rooms) */
|
106
103
|
userRole, /* @conditional-compile-remove(rooms) */
|
107
104
|
isRoomsCall, /* @conditional-compile-remove(vertical-gallery) */
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/CallComposite/components/MediaGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;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YAAY,EAAE,KAAK,EAAE,2BAA2B;QACjH,oBAAC,SAAS,IAAC,kBAAkB,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,GAAI;QACrE,oBAAoB,CACjB,CAAC;AACX,CAAC,CAAC;AACF,MAAM,2BAA2B,GAAkB;IACjD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;CACf,CAAC;AACF,MAAM,8BAA8B,GAAG,CAAC,gBAAyB,EAAsB,EAAE;IACvF,gDAAgD;IAChD,OAAO,gBAAgB,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC;IACtE,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { CSSProperties, useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\nimport { useRef } from 'react';\nimport { VideoGallery, VideoStreamOptions, CustomAvatarOptions, Announcer } from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\n/* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\nimport { _useContainerWidth, _useContainerHeight } from '@internal/react-components';\n/* @conditional-compile-remove(pinned-participants) */\nimport { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from '@internal/react-components';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { AvatarPersona, AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { useSelector } from '../hooks/useSelector';\nimport { localVideoCameraCycleButtonSelector } from '../selectors/LocalVideoTileSelector';\nimport { LocalVideoCameraCycleButton } from '@internal/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useParticipantChangedAnnouncement } from '../utils/MediaGalleryUtils';\n/* @conditional-compile-remove(pinned-participants) */\nimport { RemoteVideoTileMenuOptions } from '../CallComposite';\n/* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\nimport { LocalVideoTileOptions } from '../CallComposite';\n/* @conditional-compile-remove(rooms) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nconst VideoGalleryStyles = {\n root: {\n height: '100%',\n minHeight: '10rem',\n // space affordance to ensure media gallery is never collapsed\n minWidth: '6rem'\n }\n};\nconst localVideoViewOptions = ({\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions);\nconst remoteVideoViewOptions = ({\n scalingMode: 'Crop'\n} as VideoStreamOptions);\n\n/**\n * @private\n */\nexport interface MediaGalleryProps {\n isVideoStreamOn?: boolean;\n isMicrophoneChecked?: boolean;\n onStartLocalVideo: () => Promise<void>;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n isMobile?: boolean;\n drawerMenuHostId?: string;\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;\n /* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\n localVideoTileOptions?: boolean | LocalVideoTileOptions;\n /* @conditional-compile-remove(gallery-layouts) */\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout: VideoGalleryLayout;\n}\n\n/**\n * @private\n */\nexport const MediaGallery = (props: MediaGalleryProps): JSX.Element => {\n const videoGalleryProps = usePropsFor(VideoGallery);\n const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);\n const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);\n const announcerString = useParticipantChangedAnnouncement();\n\n /* @conditional-compile-remove(rooms) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(rooms) */\n const userRole = adapter.getState().call?.role;\n /* @conditional-compile-remove(rooms) */\n const isRoomsCall = adapter.getState().isRoomsCall;\n\n /* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\n const containerRef = useRef<HTMLDivElement>(null);\n /* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\n const containerWidth = _useContainerWidth(containerRef);\n /* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\n const containerHeight = _useContainerHeight(containerRef);\n /* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\n const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;\n const layoutBasedOnTilePosition: VideoGalleryLayout = localVideoTileLayoutTrampoline( /* @conditional-compile-remove(click-to-call) */(props.localVideoTileOptions as LocalVideoTileOptions)?.position);\n const cameraSwitcherProps = useMemo(() => {\n return {\n ...cameraSwitcherCallback,\n ...cameraSwitcherCameras\n };\n }, [cameraSwitcherCallback, cameraSwitcherCameras]);\n const onRenderAvatar = useCallback((userId?: string, options?: CustomAvatarOptions) => {\n return <Stack className={mergeStyles({\n position: 'absolute',\n height: '100%',\n width: '100%'\n })}>\n <Stack styles={{\n root: {\n margin: 'auto',\n maxHeight: '100%'\n }\n }}>\n {options?.coinSize && <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />}\n </Stack>\n </Stack>;\n }, [props.onFetchAvatarPersonaData]);\n\n /* @conditional-compile-remove(pinned-participants) */\n const remoteVideoTileMenuOptions: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps = useMemo(() => {\n return props.remoteVideoTileMenuOptions?.isHidden ? false : props.isMobile ? {\n kind: 'drawer',\n hostId: props.drawerMenuHostId\n } : {\n kind: 'contextual'\n };\n }, [props.remoteVideoTileMenuOptions?.isHidden, props.isMobile, props.drawerMenuHostId]);\n\n /* @conditional-compile-remove(vertical-gallery) */\n const overflowGalleryPosition = useMemo(() => {\n /* @conditional-compile-remove(gallery-layouts) */\n if (props.userSetOverflowGalleryPosition === 'horizontalTop') {\n return props.userSetOverflowGalleryPosition;\n }\n return containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9 ? 'verticalRight' : 'horizontalBottom';\n }, [/* @conditional-compile-remove(gallery-layouts) */props.userSetOverflowGalleryPosition, containerWidth, containerHeight]);\n const VideoGalleryMemoized = useMemo(() => {\n const layoutBasedOnUserSelection = (): VideoGalleryLayout => {\n /* @conditional-compile-remove(gallery-layouts) */\n return props.localVideoTileOptions ? layoutBasedOnTilePosition : props.userSetGalleryLayout;\n return layoutBasedOnTilePosition;\n };\n return <VideoGallery {...videoGalleryProps} localVideoViewOptions={localVideoViewOptions} remoteVideoViewOptions={remoteVideoViewOptions} styles={VideoGalleryStyles} layout={layoutBasedOnUserSelection()} showCameraSwitcherInLocalPreview={props.isMobile} localVideoCameraCycleButtonProps={cameraSwitcherProps} onRenderAvatar={onRenderAvatar}\n /* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenu={remoteVideoTileMenuOptions}\n /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition={overflowGalleryPosition}\n /* @conditional-compile-remove(rooms) */ localVideoTileSize={props.localVideoTileOptions === false || userRole === 'Consumer' || isRoomsCall && userRole === 'Unknown' ? 'hidden' : props.isMobile && containerAspectRatio < 1 ? '9:16' : '16:9'} />;\n }, [videoGalleryProps, props.isMobile, /* @conditional-compile-remove(rooms) */\n props.localVideoTileOptions, cameraSwitcherProps, onRenderAvatar, /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions, /* @conditional-compile-remove(vertical-gallery) */\n overflowGalleryPosition, /* @conditional-compile-remove(rooms) */\n userRole, /* @conditional-compile-remove(rooms) */\n isRoomsCall, /* @conditional-compile-remove(vertical-gallery) */\n containerAspectRatio, /* @conditional-compile-remove(gallery-layouts) */\n props.userSetGalleryLayout, layoutBasedOnTilePosition]);\n return <div /* @conditional-compile-remove(vertical-gallery) */ ref={containerRef} style={mediaGalleryContainerStyles}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n {VideoGalleryMemoized}\n </div>;\n};\nconst mediaGalleryContainerStyles: CSSProperties = {\n width: '100%',\n height: '100%'\n};\nconst localVideoTileLayoutTrampoline = (localTileOptions?: string): VideoGalleryLayout => {\n /* @conditional-compile-remove(click-to-call) */\n return localTileOptions === 'grid' ? 'default' : 'floatingLocalVideo';\n return 'floatingLocalVideo';\n};"]}
|
1
|
+
{"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/CallComposite/components/MediaGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACnE,mDAAmD,CAAC,wCAAwC;AAC5F,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAA2C,SAAS,EAA0D,4CAAmC;AAEtK,mDAAmD,CAAC,wCAAwC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,4CAAmC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAA6B,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAC1F,OAAO,EAAE,2BAA2B,EAAE,4CAAmC;AAEzE,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAI/E,wCAAwC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,MAAM,kBAAkB,GAAG;IACzB,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,SAAS,EAA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C,MAAM,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC;IACvP,CAAC,EAAE,CAAC,iBAAiB,EAAE,KAAK,CAAC,QAAQ,EAAE,wCAAwC;QAC/E,KAAK,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,cAAc,EAAE,0BAA0B,EAAE,mDAAmD;QACjJ,uBAAuB,EAAE,wCAAwC;QACjE,QAAQ,EAAE,wCAAwC;QAClD,WAAW,EAAE,mDAAmD;QAChE,oBAAoB,EAAE,kDAAkD;QACxE,KAAK,CAAC,oBAAoB,EAAE,yBAAyB,CAAC,CAAC,CAAC;IACxD,OAAO,6BAAyD,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,2BAA2B;QACjH,oBAAC,SAAS,IAAC,kBAAkB,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,GAAI;QACrE,oBAAoB,CACjB,CAAC;AACX,CAAC,CAAC;AACF,MAAM,2BAA2B,GAAkB;IACjD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;CACf,CAAC;AACF,MAAM,8BAA8B,GAAG,CAAC,gBAAyB,EAAsB,EAAE;IACvF,gDAAgD;IAChD,OAAO,gBAAgB,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC;IACtE,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { CSSProperties, useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\nimport { useRef } from 'react';\nimport { VideoGallery, VideoStreamOptions, CustomAvatarOptions, Announcer, VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\n/* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\nimport { _useContainerWidth, _useContainerHeight } from '@internal/react-components';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { AvatarPersona, AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { useSelector } from '../hooks/useSelector';\nimport { localVideoCameraCycleButtonSelector } from '../selectors/LocalVideoTileSelector';\nimport { LocalVideoCameraCycleButton } from '@internal/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useParticipantChangedAnnouncement } from '../utils/MediaGalleryUtils';\nimport { RemoteVideoTileMenuOptions } from '../CallComposite';\n/* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\nimport { LocalVideoTileOptions } from '../CallComposite';\n/* @conditional-compile-remove(rooms) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nconst VideoGalleryStyles = {\n root: {\n height: '100%',\n minHeight: '10rem',\n // space affordance to ensure media gallery is never collapsed\n minWidth: '6rem'\n }\n};\nconst localVideoViewOptions = ({\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions);\nconst remoteVideoViewOptions = ({\n scalingMode: 'Crop'\n} as VideoStreamOptions);\n\n/**\n * @private\n */\nexport interface MediaGalleryProps {\n isVideoStreamOn?: boolean;\n isMicrophoneChecked?: boolean;\n onStartLocalVideo: () => Promise<void>;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n isMobile?: boolean;\n drawerMenuHostId?: string;\n remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;\n /* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\n localVideoTileOptions?: boolean | LocalVideoTileOptions;\n /* @conditional-compile-remove(gallery-layouts) */\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n /* @conditional-compile-remove(gallery-layouts) */\n userSetGalleryLayout: VideoGalleryLayout;\n}\n\n/**\n * @private\n */\nexport const MediaGallery = (props: MediaGalleryProps): JSX.Element => {\n const videoGalleryProps = usePropsFor(VideoGallery);\n const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);\n const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);\n const announcerString = useParticipantChangedAnnouncement();\n\n /* @conditional-compile-remove(rooms) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(rooms) */\n const userRole = adapter.getState().call?.role;\n /* @conditional-compile-remove(rooms) */\n const isRoomsCall = adapter.getState().isRoomsCall;\n\n /* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\n const containerRef = useRef<HTMLDivElement>(null);\n /* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\n const containerWidth = _useContainerWidth(containerRef);\n /* @conditional-compile-remove(vertical-gallery) */ /* @conditional-compile-remove(rooms) */\n const containerHeight = _useContainerHeight(containerRef);\n /* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\n const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;\n const layoutBasedOnTilePosition: VideoGalleryLayout = localVideoTileLayoutTrampoline( /* @conditional-compile-remove(click-to-call) */(props.localVideoTileOptions as LocalVideoTileOptions)?.position);\n const cameraSwitcherProps = useMemo(() => {\n return {\n ...cameraSwitcherCallback,\n ...cameraSwitcherCameras\n };\n }, [cameraSwitcherCallback, cameraSwitcherCameras]);\n const onRenderAvatar = useCallback((userId?: string, options?: CustomAvatarOptions) => {\n return <Stack className={mergeStyles({\n position: 'absolute',\n height: '100%',\n width: '100%'\n })}>\n <Stack styles={{\n root: {\n margin: 'auto',\n maxHeight: '100%'\n }\n }}>\n {options?.coinSize && <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />}\n </Stack>\n </Stack>;\n }, [props.onFetchAvatarPersonaData]);\n const remoteVideoTileMenuOptions: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps = useMemo(() => {\n return props.remoteVideoTileMenuOptions?.isHidden ? false : props.isMobile ? {\n kind: 'drawer',\n hostId: props.drawerMenuHostId\n } : {\n kind: 'contextual'\n };\n }, [props.remoteVideoTileMenuOptions?.isHidden, props.isMobile, props.drawerMenuHostId]);\n\n /* @conditional-compile-remove(vertical-gallery) */\n const overflowGalleryPosition = useMemo(() => {\n /* @conditional-compile-remove(gallery-layouts) */\n if (props.userSetOverflowGalleryPosition === 'horizontalTop') {\n return props.userSetOverflowGalleryPosition;\n }\n return containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9 ? 'verticalRight' : 'horizontalBottom';\n }, [/* @conditional-compile-remove(gallery-layouts) */props.userSetOverflowGalleryPosition, containerWidth, containerHeight]);\n const VideoGalleryMemoized = useMemo(() => {\n const layoutBasedOnUserSelection = (): VideoGalleryLayout => {\n /* @conditional-compile-remove(gallery-layouts) */\n return props.localVideoTileOptions ? layoutBasedOnTilePosition : props.userSetGalleryLayout;\n return layoutBasedOnTilePosition;\n };\n return <VideoGallery {...videoGalleryProps} localVideoViewOptions={localVideoViewOptions} remoteVideoViewOptions={remoteVideoViewOptions} styles={VideoGalleryStyles} layout={layoutBasedOnUserSelection()} showCameraSwitcherInLocalPreview={props.isMobile} localVideoCameraCycleButtonProps={cameraSwitcherProps} onRenderAvatar={onRenderAvatar} remoteVideoTileMenu={remoteVideoTileMenuOptions}\n /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition={overflowGalleryPosition}\n /* @conditional-compile-remove(rooms) */ localVideoTileSize={props.localVideoTileOptions === false || userRole === 'Consumer' || isRoomsCall && userRole === 'Unknown' ? 'hidden' : props.isMobile && containerAspectRatio < 1 ? '9:16' : '16:9'} />;\n }, [videoGalleryProps, props.isMobile, /* @conditional-compile-remove(rooms) */\n props.localVideoTileOptions, cameraSwitcherProps, onRenderAvatar, remoteVideoTileMenuOptions, /* @conditional-compile-remove(vertical-gallery) */\n overflowGalleryPosition, /* @conditional-compile-remove(rooms) */\n userRole, /* @conditional-compile-remove(rooms) */\n isRoomsCall, /* @conditional-compile-remove(vertical-gallery) */\n containerAspectRatio, /* @conditional-compile-remove(gallery-layouts) */\n props.userSetGalleryLayout, layoutBasedOnTilePosition]);\n return <div /* @conditional-compile-remove(vertical-gallery) */ ref={containerRef} style={mediaGalleryContainerStyles}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n {VideoGalleryMemoized}\n </div>;\n};\nconst mediaGalleryContainerStyles: CSSProperties = {\n width: '100%',\n height: '100%'\n};\nconst localVideoTileLayoutTrampoline = (localTileOptions?: string): VideoGalleryLayout => {\n /* @conditional-compile-remove(click-to-call) */\n return localTileOptions === 'grid' ? 'default' : 'floatingLocalVideo';\n return 'floatingLocalVideo';\n};"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js
CHANGED
@@ -59,11 +59,7 @@ const memoizeState = memoizeOne((userId, deviceManager, calls, latestErrors, dis
|
|
59
59
|
displayName
|
60
60
|
},
|
61
61
|
calls,
|
62
|
-
latestErrors
|
63
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
64
|
-
alternateCallerId,
|
65
|
-
/* @conditional-compile-remove(unsupported-browser) */
|
66
|
-
environmentInfo
|
62
|
+
latestErrors
|
67
63
|
}));
|
68
64
|
const memoizeCalls = memoizeOne((call) => call ? {
|
69
65
|
[call.id]: call
|
@@ -83,6 +79,6 @@ const adaptCompositeState = (compositeState) => {
|
|
83
79
|
// that are unknown to the UI component and data binding libraries. Generic handling of the errors (e.g.,
|
84
80
|
// just displaying them in some UI surface) will continue to work for these operations. Handling of
|
85
81
|
// specific operations (e.g., acting on errors related to permission issues) will ignore these operations.
|
86
|
-
compositeState.latestErrors, compositeState.displayName
|
82
|
+
compositeState.latestErrors, compositeState.displayName);
|
87
83
|
};
|
88
84
|
//# sourceMappingURL=useAdaptedSelector.js.map
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useAdaptedSelector.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,uDAAuD;AAEvD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;
|
1
|
+
{"version":3,"file":"useAdaptedSelector.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,uDAAuD;AAEvD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAI5D;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAiE,QAAmB,EAAE,aAAwC,EAAyB,EAAE;IACzL,OAAO,yBAAyB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,aAAa,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAA4H,QAAmB,EAAE,UAAsB,EAAE,aAAwC,EAAyB,EAAE;;IACnR,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,sHAAsH;IACtH,qHAAqH;IACrH,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;QACvB,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;QAC1B,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CAAC,MAAmC,EAAE,aAAiC,EAAE,KAExG,EAAE,YAAwB,EAAE,WAAoB,EAAE,iBAA0B,EAAE,eAA2B,EAAmB,EAAE,CAAC,CAAC;IAC/H,MAAM;IACN,aAAa,EAAE,EAAE;IACjB,kBAAkB,EAAE,EAAE;IACtB,UAAU,EAAE,EAAE;IACd,aAAa;IACb,SAAS,EAAE;QACT,WAAW;KACZ;IACD,KAAK;IACL,YAAY;CACb,CAAC,CAAC,CAAC;AACJ,MAAM,YAAY,GAAG,UAAU,CAAC,CAAC,IAAgB,EAE/C,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACV,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI;CAChB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACR,MAAM,mBAAmB,GAAG,CAAC,cAAgC,EAAmB,EAAE;IAChF,OAAO,YAAY,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,OAAO,EAAE,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;IACtG,oCAAoC;IACpC,uFAAuF;IACvF,EAAE;IACF,oEAAoE;IACpE,6FAA6F;IAC7F,sEAAsE;IACtE,qGAAqG;IACrG,mEAAmE;IACnE,EAAE;IACF,6GAA6G;IAC7G,yGAAyG;IACzG,mGAAmG;IACnG,0GAA0G;IAC1G,cAAc,CAAC,YAA2B,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;AAC1E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { useState, useEffect, useRef, useMemo } from 'react';\nimport memoizeOne from 'memoize-one';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallAdapterState } from '../adapter/CallAdapter';\nimport { CallErrors, CallState, CallClientState, DeviceManagerState } from '@internal/calling-stateful-client';\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\n/**\n * @private\n */\nexport const useAdaptedSelector = <SelectorT extends (state: CallClientState, props: any) => any,>(selector: SelectorT, selectorProps?: Parameters<SelectorT>[1]): ReturnType<SelectorT> => {\n return useSelectorWithAdaptation(selector, adaptCompositeState, selectorProps);\n};\n\n/**\n * @private\n */\nexport const useSelectorWithAdaptation = <SelectorT extends (state: ReturnType<AdaptFuncT>, props: any) => any, AdaptFuncT extends (state: CallAdapterState) => any>(selector: SelectorT, adaptState: AdaptFuncT, selectorProps?: Parameters<SelectorT>[1]): ReturnType<SelectorT> => {\n const adapter = useAdapter();\n\n // Keeps track of whether the current component is mounted or not. If it has unmounted, make sure we do not modify the\n // state or it will cause React warnings in the console. https://skype.visualstudio.com/SPOOL/_workitems/edit/2453212\n const mounted = useRef(false);\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n });\n const callId = adapter.getState().call?.id;\n const callConfigProps = useMemo(() => ({\n callId\n }), [callId]);\n const [props, setProps] = useState(selector(adaptState(adapter.getState()), selectorProps ?? callConfigProps));\n const propRef = useRef(props);\n propRef.current = props;\n useEffect(() => {\n const onStateChange = (state: CallAdapterState): void => {\n if (!mounted.current) {\n return;\n }\n const newProps = selector(adaptState(state), selectorProps ?? callConfigProps);\n if (propRef.current !== newProps) {\n setProps(newProps);\n }\n };\n adapter.onStateChange(onStateChange);\n return () => {\n adapter.offStateChange(onStateChange);\n };\n }, [adaptState, adapter, selector, selectorProps, callConfigProps]);\n return props;\n};\nconst memoizeState = memoizeOne((userId: CommunicationIdentifierKind, deviceManager: DeviceManagerState, calls: {\n [key: string]: CallState;\n}, latestErrors: CallErrors, displayName?: string, alternateCallerId?: string, environmentInfo?: undefined): CallClientState => ({\n userId,\n incomingCalls: {},\n incomingCallsEnded: {},\n callsEnded: {},\n deviceManager,\n callAgent: {\n displayName\n },\n calls,\n latestErrors\n}));\nconst memoizeCalls = memoizeOne((call?: CallState): {\n [key: string]: CallState;\n} => call ? {\n [call.id]: call\n} : {});\nconst adaptCompositeState = (compositeState: CallAdapterState): CallClientState => {\n return memoizeState(compositeState.userId, compositeState.devices, memoizeCalls(compositeState.call), (\n // This is an unsafe type expansion.\n // compositeState.latestErrors can contain properties that are not valid in CallErrors.\n //\n // But there is no way to check for valid property names at runtime:\n // - The set of valid property names is built from types in the @azure/communication-calling.\n // Thus we don't have a literal array of allowed strings at runtime.\n // - Due to minification / uglification, the property names from the objects at runtime can't be used\n // to compare against permissible values inferred from the types.\n //\n // This is not a huge problem -- it simply means that our adapted selector will include some extra operations\n // that are unknown to the UI component and data binding libraries. Generic handling of the errors (e.g.,\n // just displaying them in some UI surface) will continue to work for these operations. Handling of\n // specific operations (e.g., acting on errors related to permission issues) will ignore these operations.\n compositeState.latestErrors as CallErrors), compositeState.displayName);\n};"]}
|
@@ -30,16 +30,7 @@ const createCompositeHandlers = memoizeOne((adapter) => ({
|
|
30
30
|
onHangUp: (forEveryone) => __awaiter(void 0, void 0, void 0, function* () {
|
31
31
|
yield adapter.leaveCall(forEveryone);
|
32
32
|
}),
|
33
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
34
|
-
onToggleHold: () => __awaiter(void 0, void 0, void 0, function* () {
|
35
|
-
var _a;
|
36
|
-
return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold' ? yield adapter.resumeCall() : yield adapter.holdCall();
|
37
|
-
}),
|
38
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
39
|
-
onAddParticipant: (participant, options) => __awaiter(void 0, void 0, void 0, function* () {
|
40
|
-
return yield adapter.addParticipant(participant, options);
|
41
|
-
}),
|
42
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
33
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(dtmf-dialer) */
|
43
34
|
onSendDtmfTone: (dtmfTone) => __awaiter(void 0, void 0, void 0, function* () {
|
44
35
|
yield adapter.sendDtmfTone(dtmfTone);
|
45
36
|
}),
|
@@ -56,8 +47,8 @@ const createCompositeHandlers = memoizeOne((adapter) => ({
|
|
56
47
|
}),
|
57
48
|
/* @conditional-compile-remove(raise-hand) */
|
58
49
|
onToggleRaiseHand: () => __awaiter(void 0, void 0, void 0, function* () {
|
59
|
-
var
|
60
|
-
((
|
50
|
+
var _a;
|
51
|
+
((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.raiseHand.localParticipantRaisedHand) ? yield adapter.lowerHand() : yield adapter.raiseHand();
|
61
52
|
}),
|
62
53
|
onSelectCamera: (deviceInfo, options) => __awaiter(void 0, void 0, void 0, function* () {
|
63
54
|
yield adapter.setCamera(deviceInfo, options);
|
@@ -82,12 +73,12 @@ const createCompositeHandlers = memoizeOne((adapter) => ({
|
|
82
73
|
isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
|
83
74
|
}),
|
84
75
|
onToggleMicrophone: () => __awaiter(void 0, void 0, void 0, function* () {
|
85
|
-
var
|
86
|
-
return ((
|
76
|
+
var _b;
|
77
|
+
return ((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.isMuted) ? yield adapter.unmute() : yield adapter.mute();
|
87
78
|
}),
|
88
79
|
onToggleScreenShare: () => __awaiter(void 0, void 0, void 0, function* () {
|
89
|
-
var
|
90
|
-
return ((
|
80
|
+
var _c;
|
81
|
+
return ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.isScreenSharingOn) ? yield adapter.stopScreenShare() : yield adapter.startScreenShare();
|
91
82
|
}),
|
92
83
|
onStartLocalVideo: () => __awaiter(void 0, void 0, void 0, function* () {
|
93
84
|
if (adapter.getState().call) {
|
@@ -106,10 +97,6 @@ const createCompositeHandlers = memoizeOne((adapter) => ({
|
|
106
97
|
onDisposeRemoteVideoStreamView: (userId) => __awaiter(void 0, void 0, void 0, function* () {
|
107
98
|
return adapter.disposeRemoteVideoStreamView(userId);
|
108
99
|
}),
|
109
|
-
/* @conditional-compile-remove(call-readiness) */
|
110
|
-
askDevicePermission: (constrain) => __awaiter(void 0, void 0, void 0, function* () {
|
111
|
-
return adapter.askDevicePermission(constrain);
|
112
|
-
}),
|
113
100
|
/* @conditional-compile-remove(video-background-effects) */
|
114
101
|
onRemoveVideoBackgroundEffects: () => __awaiter(void 0, void 0, void 0, function* () {
|
115
102
|
return yield adapter.stopVideoBackgroundEffects();
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useHandlers.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/CallComposite/hooks/useHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,EAAoB,6BAA6B,EAAE,yCAAgC;AAE1F,OAAO,UAAU,MAAM,aAAa,CAAC;AAIrC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC;;GAEG;AACH,+HAA+H;AAC/H,MAAM,CAAC,MAAM,WAAW,GAAG,CAAU,UAAkD,EAAgF,EAAE;IACvK,OAAO,uBAAuB,CAAC,UAAU,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AACF,MAAM,uBAAuB,GAAG,UAAU,CAAC,CAAC,OAA0B,EAAyB,EAAE,CAAC,CAAC;IACjG,uBAAuB,EAAE,CAAM,OAAO,EAAC,EAAE;QACvC,OAAO,MAAM,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC,CAAA;IACD,wBAAwB,EAAE,CAAO,MAAM,EAAE,OAAO,EAAE,EAAE;QAClD,OAAO,MAAM,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC,CAAA;IACD,QAAQ,EAAE,CAAO,WAAqB,EAAE,EAAE;QACxC,MAAM,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC,CAAA;IACD,6CAA6C;IAC7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AC3D,wBAAwB,EAAE,CAAO,2BAAwD,EAAE,EAAE;QAC3F,MAAM,iBAAiB,mBACrB,UAAU,EAAE,aAAa,IACtB,2BAA2B,CAC/B,CAAC;QACF,OAAO,MAAM,OAAO,CAAC,0BAA0B,CAAC,iBAAiB,CAAC,CAAC;IACrE,CAAC,CAAA;IACD,iDAAiD;IACjD,eAAe,EAAE,CAAM,OAAO,EAAC,EAAE;QAC/B,MAAM,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC,CAAA;IACD,iDAAiD;IACjD,cAAc,EAAE,GAAS,EAAE;QACzB,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC;IAC/B,CAAC,CAAA;IACD,iDAAiD;IACjD,mBAAmB,EAAE,CAAM,QAAQ,EAAC,EAAE;QACpC,MAAM,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC,CAAA;IACD,iDAAiD;IACjD,oBAAoB,EAAE,CAAM,QAAQ,EAAC,EAAE;QACrC,MAAM,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CAAA;CACF,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommonCallingHandlers } from '@internal/calling-component-bindings';\nimport { CommonProperties, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { ReactElement } from 'react';\nimport memoizeOne from 'memoize-one';\nimport { CommonCallAdapter } from '..';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoBackgroundBlurEffect, VideoBackgroundReplacementEffect } from '..';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isCameraOn } from '../utils';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { DtmfTone } from '@azure/communication-calling';\n/* @conditional-compile-remove(video-background-effects) */\nimport type { BackgroundReplacementConfig, BackgroundBlurConfig } from '@azure/communication-calling';\n/**\n * @private\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport const useHandlers = <PropsT,>(_component: (props: PropsT) => ReactElement | null): Pick<CommonCallingHandlers, CommonProperties<CommonCallingHandlers, PropsT>> => {\n return createCompositeHandlers(useAdapter());\n};\nconst createCompositeHandlers = memoizeOne((adapter: CommonCallAdapter): CommonCallingHandlers => ({\n onCreateLocalStreamView: async options => {\n return await adapter.createStreamView(undefined, options);\n },\n onCreateRemoteStreamView: async (userId, options) => {\n return await adapter.createStreamView(userId, options);\n },\n onHangUp: async (forEveryone?: boolean) => {\n await adapter.leaveCall(forEveryone);\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onToggleHold: async () => {\n return adapter.getState().call?.state === 'LocalHold' ? await adapter.resumeCall() : await adapter.holdCall();\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant: async (participant, options?) => {\n return await adapter.addParticipant(participant, options);\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onSendDtmfTone: async (dtmfTone: DtmfTone) => {\n await adapter.sendDtmfTone(dtmfTone);\n },\n onRemoveParticipant: async userId => {\n await adapter.removeParticipant(userId);\n },\n /* @conditional-compile-remove(raise-hand) */\n onRaiseHand: async () => {\n await adapter.raiseHand();\n },\n /* @conditional-compile-remove(raise-hand) */\n onLowerHand: async () => {\n await adapter.lowerHand();\n },\n /* @conditional-compile-remove(raise-hand) */\n onToggleRaiseHand: async () => {\n adapter.getState().call?.raiseHand.localParticipantRaisedHand ? await adapter.lowerHand() : await adapter.raiseHand();\n },\n onSelectCamera: async (deviceInfo, options) => {\n await adapter.setCamera(deviceInfo, options);\n },\n onSelectMicrophone: async deviceInfo => {\n await adapter.setMicrophone(deviceInfo);\n },\n onSelectSpeaker: async deviceInfo => {\n await adapter.setSpeaker(deviceInfo);\n },\n onStartCall: (participants, options?) => {\n const rawIds = participants.map(participant => toFlatCommunicationIdentifier(participant));\n return adapter.startCall(rawIds, options);\n },\n onStartScreenShare: async () => {\n await adapter.startScreenShare();\n },\n onStopScreenShare: async () => {\n await adapter.stopScreenShare();\n },\n onToggleCamera: async options => {\n isCameraOn(adapter.getState()) ? await adapter.stopCamera() : await adapter.startCamera(options);\n },\n onToggleMicrophone: async () => {\n return adapter.getState().call?.isMuted ? await adapter.unmute() : await adapter.mute();\n },\n onToggleScreenShare: async () => {\n return adapter.getState().call?.isScreenSharingOn ? await adapter.stopScreenShare() : await adapter.startScreenShare();\n },\n onStartLocalVideo: async () => {\n if (adapter.getState().call) {\n return adapter.startCamera();\n }\n },\n onDisposeLocalStreamView: async () => {\n return adapter.disposeLocalVideoStreamView();\n },\n onDisposeRemoteStreamView: async userId => {\n return adapter.disposeStreamView(userId);\n },\n onDisposeRemoteScreenShareStreamView: async userId => {\n return adapter.disposeScreenShareStreamView(userId);\n },\n onDisposeRemoteVideoStreamView: async userId => {\n return adapter.disposeRemoteVideoStreamView(userId);\n },\n /* @conditional-compile-remove(call-readiness) */\n askDevicePermission: async constrain => {\n return adapter.askDevicePermission(constrain);\n },\n /* @conditional-compile-remove(video-background-effects) */\n onRemoveVideoBackgroundEffects: async () => {\n return await adapter.stopVideoBackgroundEffects();\n },\n /* @conditional-compile-remove(video-background-effects) */\n onBlurVideoBackground: async (backgroundBlurConfig?: BackgroundBlurConfig) => {\n const blurConfig: VideoBackgroundBlurEffect = {\n effectName: 'blur',\n ...backgroundBlurConfig\n };\n return await adapter.startVideoBackgroundEffect(blurConfig);\n },\n /* @conditional-compile-remove(video-background-effects) */\n onReplaceVideoBackground: async (backgroundReplacementConfig: BackgroundReplacementConfig) => {\n const replacementConfig: VideoBackgroundReplacementEffect = {\n effectName: 'replacement',\n ...backgroundReplacementConfig\n };\n return await adapter.startVideoBackgroundEffect(replacementConfig);\n },\n /* @conditional-compile-remove(close-captions) */\n onStartCaptions: async options => {\n await adapter.startCaptions(options);\n },\n /* @conditional-compile-remove(close-captions) */\n onStopCaptions: async () => {\n await adapter.stopCaptions();\n },\n /* @conditional-compile-remove(close-captions) */\n onSetSpokenLanguage: async language => {\n await adapter.setSpokenLanguage(language);\n },\n /* @conditional-compile-remove(close-captions) */\n onSetCaptionLanguage: async language => {\n await adapter.setCaptionLanguage(language);\n }\n}));"]}
|
1
|
+
{"version":3,"file":"useHandlers.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/CallComposite/hooks/useHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,EAAoB,6BAA6B,EAAE,yCAAgC;AAE1F,OAAO,UAAU,MAAM,aAAa,CAAC;AAIrC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC;;GAEG;AACH,+HAA+H;AAC/H,MAAM,CAAC,MAAM,WAAW,GAAG,CAAU,UAAkD,EAAgF,EAAE;IACvK,OAAO,uBAAuB,CAAC,UAAU,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AACF,MAAM,uBAAuB,GAAG,UAAU,CAAC,CAAC,OAA0B,EAAyB,EAAE,CAAC,CAAC;IACjG,uBAAuB,EAAE,CAAM,OAAO,EAAC,EAAE;QACvC,OAAO,MAAM,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC,CAAA;IACD,wBAAwB,EAAE,CAAO,MAAM,EAAE,OAAO,EAAE,EAAE;QAClD,OAAO,MAAM,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC,CAAA;IACD,QAAQ,EAAE,CAAO,WAAqB,EAAE,EAAE;QACxC,MAAM,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC,CAAA;IACD,6CAA6C,CAAC,8CAA8C;IAC5F,cAAc,EAAE,CAAO,QAAkB,EAAE,EAAE;QAC3C,MAAM,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC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,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CAAA;CACF,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommonCallingHandlers } from '@internal/calling-component-bindings';\nimport { CommonProperties, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { ReactElement } from 'react';\nimport memoizeOne from 'memoize-one';\nimport { CommonCallAdapter } from '..';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoBackgroundBlurEffect, VideoBackgroundReplacementEffect } from '..';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isCameraOn } from '../utils';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(dtmf-dialer) */\nimport { DtmfTone } from '@azure/communication-calling';\n/* @conditional-compile-remove(video-background-effects) */\nimport type { BackgroundReplacementConfig, BackgroundBlurConfig } from '@azure/communication-calling';\n/**\n * @private\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport const useHandlers = <PropsT,>(_component: (props: PropsT) => ReactElement | null): Pick<CommonCallingHandlers, CommonProperties<CommonCallingHandlers, PropsT>> => {\n return createCompositeHandlers(useAdapter());\n};\nconst createCompositeHandlers = memoizeOne((adapter: CommonCallAdapter): CommonCallingHandlers => ({\n onCreateLocalStreamView: async options => {\n return await adapter.createStreamView(undefined, options);\n },\n onCreateRemoteStreamView: async (userId, options) => {\n return await adapter.createStreamView(userId, options);\n },\n onHangUp: async (forEveryone?: boolean) => {\n await adapter.leaveCall(forEveryone);\n },\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(dtmf-dialer) */\n onSendDtmfTone: async (dtmfTone: DtmfTone) => {\n await adapter.sendDtmfTone(dtmfTone);\n },\n onRemoveParticipant: async userId => {\n await adapter.removeParticipant(userId);\n },\n /* @conditional-compile-remove(raise-hand) */\n onRaiseHand: async () => {\n await adapter.raiseHand();\n },\n /* @conditional-compile-remove(raise-hand) */\n onLowerHand: async () => {\n await adapter.lowerHand();\n },\n /* @conditional-compile-remove(raise-hand) */\n onToggleRaiseHand: async () => {\n adapter.getState().call?.raiseHand.localParticipantRaisedHand ? await adapter.lowerHand() : await adapter.raiseHand();\n },\n onSelectCamera: async (deviceInfo, options) => {\n await adapter.setCamera(deviceInfo, options);\n },\n onSelectMicrophone: async deviceInfo => {\n await adapter.setMicrophone(deviceInfo);\n },\n onSelectSpeaker: async deviceInfo => {\n await adapter.setSpeaker(deviceInfo);\n },\n onStartCall: (participants, options?) => {\n const rawIds = participants.map(participant => toFlatCommunicationIdentifier(participant));\n return adapter.startCall(rawIds, options);\n },\n onStartScreenShare: async () => {\n await adapter.startScreenShare();\n },\n onStopScreenShare: async () => {\n await adapter.stopScreenShare();\n },\n onToggleCamera: async options => {\n isCameraOn(adapter.getState()) ? await adapter.stopCamera() : await adapter.startCamera(options);\n },\n onToggleMicrophone: async () => {\n return adapter.getState().call?.isMuted ? await adapter.unmute() : await adapter.mute();\n },\n onToggleScreenShare: async () => {\n return adapter.getState().call?.isScreenSharingOn ? await adapter.stopScreenShare() : await adapter.startScreenShare();\n },\n onStartLocalVideo: async () => {\n if (adapter.getState().call) {\n return adapter.startCamera();\n }\n },\n onDisposeLocalStreamView: async () => {\n return adapter.disposeLocalVideoStreamView();\n },\n onDisposeRemoteStreamView: async userId => {\n return adapter.disposeStreamView(userId);\n },\n onDisposeRemoteScreenShareStreamView: async userId => {\n return adapter.disposeScreenShareStreamView(userId);\n },\n onDisposeRemoteVideoStreamView: async userId => {\n return adapter.disposeRemoteVideoStreamView(userId);\n },\n /* @conditional-compile-remove(video-background-effects) */\n onRemoveVideoBackgroundEffects: async () => {\n return await adapter.stopVideoBackgroundEffects();\n },\n /* @conditional-compile-remove(video-background-effects) */\n onBlurVideoBackground: async (backgroundBlurConfig?: BackgroundBlurConfig) => {\n const blurConfig: VideoBackgroundBlurEffect = {\n effectName: 'blur',\n ...backgroundBlurConfig\n };\n return await adapter.startVideoBackgroundEffect(blurConfig);\n },\n /* @conditional-compile-remove(video-background-effects) */\n onReplaceVideoBackground: async (backgroundReplacementConfig: BackgroundReplacementConfig) => {\n const replacementConfig: VideoBackgroundReplacementEffect = {\n effectName: 'replacement',\n ...backgroundReplacementConfig\n };\n return await adapter.startVideoBackgroundEffect(replacementConfig);\n },\n /* @conditional-compile-remove(close-captions) */\n onStartCaptions: async options => {\n await adapter.startCaptions(options);\n },\n /* @conditional-compile-remove(close-captions) */\n onStopCaptions: async () => {\n await adapter.stopCaptions();\n },\n /* @conditional-compile-remove(close-captions) */\n onSetSpokenLanguage: async language => {\n await adapter.setSpokenLanguage(language);\n },\n /* @conditional-compile-remove(close-captions) */\n onSetCaptionLanguage: async language => {\n await adapter.setCaptionLanguage(language);\n }\n}));"]}
|
@@ -1,22 +1,17 @@
|
|
1
1
|
export { CallComposite } from './CallComposite';
|
2
|
-
export type { CallCompositeOptions, CallCompositeProps } from './CallComposite';
|
3
|
-
export type { DeviceCheckOptions } from './CallComposite';
|
4
|
-
export type { RemoteVideoTileMenuOptions } from './CallComposite';
|
2
|
+
export type { CallCompositeOptions, CallCompositeProps, RemoteVideoTileMenuOptions } from './CallComposite';
|
5
3
|
export type { LocalVideoTileOptions } from './CallComposite';
|
6
4
|
export type { CallControlOptions } from './types/CallControlOptions';
|
7
5
|
export * from './Strings';
|
8
6
|
export { createAzureCommunicationCallAdapter, createAzureCommunicationCallAdapterFromClient, useAzureCommunicationCallAdapter } from './adapter';
|
9
|
-
export { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';
|
10
7
|
export type { TeamsAdapterOptions } from './adapter';
|
11
|
-
export type {
|
12
|
-
export type { AzureCommunicationCallAdapterArgs, CallAdapterLocator, CommonCallAdapter, CallAdapterCallOperations } from './adapter';
|
8
|
+
export type { AzureCommunicationCallAdapterArgs, CallAdapterLocator, CommonCallAdapter, CallAdapterCallOperations, AzureCommunicationOutboundCallAdapterArgs } from './adapter';
|
13
9
|
export type { AzureCommunicationCallAdapterOptions } from './adapter';
|
14
10
|
export type { CommonCallAdapterOptions } from './adapter';
|
15
|
-
export type { CallParticipantsLocator } from './adapter';
|
16
11
|
export type { VideoBackgroundImage, VideoBackgroundEffect, VideoBackgroundNoEffect, VideoBackgroundBlurEffect, VideoBackgroundReplacementEffect } from './adapter/CallAdapter';
|
17
|
-
export type { CallAdapter, CallAdapterCallEndedEvent, CallAdapterCallManagement, CallAdapterClientState, CallAdapterDeviceManagement, CallAdapterState, CallAdapterSubscribers, CallAdapterUiState, CallCompositePage, CallEndedListener, CallIdChangedListener, DiagnosticChangedEventListner, DisplayNameChangedListener, IsLocalScreenSharingActiveChangedListener, IsMutedChangedListener, IsSpeakingChangedListener, MediaDiagnosticChangedEvent, NetworkDiagnosticChangedEvent, ParticipantsJoinedListener, ParticipantsLeftListener, JoinCallOptions } from './adapter';
|
12
|
+
export type { CallAdapter, CallAdapterCallEndedEvent, CallAdapterCallManagement, CallAdapterClientState, CallAdapterDeviceManagement, CallAdapterState, CallAdapterSubscribers, CallAdapterUiState, CallCompositePage, CallEndedListener, CallIdChangedListener, DiagnosticChangedEventListner, DisplayNameChangedListener, IsLocalScreenSharingActiveChangedListener, IsMutedChangedListener, IsSpeakingChangedListener, MediaDiagnosticChangedEvent, NetworkDiagnosticChangedEvent, ParticipantsJoinedListener, ParticipantsLeftListener, JoinCallOptions, StartCallIdentifier } from './adapter';
|
18
13
|
export type { CaptionsReceivedListener, IsCaptionsActiveChangedListener, IsCaptionLanguageChangedListener, IsSpokenLanguageChangedListener } from './adapter';
|
19
|
-
export type {
|
14
|
+
export type { TransferAcceptedListener } from './adapter';
|
20
15
|
export type { CapabilitiesChangedListener } from './adapter';
|
21
16
|
export type { CapabilityChangedNotificationStrings } from './components/CapabilitiesChangedNotificationBar';
|
22
17
|
export type { CallingSounds, SoundEffect } from './adapter';
|
@@ -3,6 +3,4 @@
|
|
3
3
|
export { CallComposite } from './CallComposite';
|
4
4
|
export * from './Strings';
|
5
5
|
export { createAzureCommunicationCallAdapter, createAzureCommunicationCallAdapterFromClient, useAzureCommunicationCallAdapter } from './adapter';
|
6
|
-
/* @conditional-compile-remove(teams-identity-support) */
|
7
|
-
export { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';
|
8
6
|
//# sourceMappingURL=index.js.map
|