@azure/communication-react 1.16.0-alpha-202404190012 → 1.16.0-alpha-202404200012
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 +145 -82
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-WGqg2woK.js → ChatMessageComponentAsRichTextEditBox-DpYUiI1l.js} +3 -3
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-WGqg2woK.js.map → ChatMessageComponentAsRichTextEditBox-DpYUiI1l.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-oaEwmItW.js → index-C2GfkUGz.js} +255 -365
- package/dist/dist-cjs/communication-react/index-C2GfkUGz.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -7
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +5 -32
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -8
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.js +0 -1
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +22 -24
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +0 -2
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +0 -4
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js +0 -1
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -2
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.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/communication-react/src/index.d.ts +2 -2
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/AttachmentCard.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/AttachmentCard.js +2 -2
- package/dist/dist-esm/react-components/src/components/AttachmentCard.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.d.ts +3 -4
- package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.js +2 -2
- package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +4 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +2 -2
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +11 -4
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +4 -4
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +20 -13
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +4 -4
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.d.ts +4 -4
- package/dist/dist-esm/react-components/src/components/SendBox.js +20 -14
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +6 -6
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js +0 -4
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +15 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +7 -5
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/VideoTile.js +7 -5
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/index.js +0 -4
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +4 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +0 -4
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +0 -7
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +6 -6
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.js +0 -1
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +0 -6
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/themes.d.ts +1 -0
- package/dist/dist-esm/react-components/src/theming/themes.js +4 -2
- package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/Attachment.d.ts +48 -24
- package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- 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.js +4 -19
- 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.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/OnFetchProfileCallback.d.ts +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/OnFetchProfileCallback.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +5 -23
- 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/MediaGallery.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +4 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +2 -1
- 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.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- 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 +5 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +20 -18
- 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 +17 -11
- 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.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +5 -1
- 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 +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -7
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.d.ts +14 -13
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.js +30 -21
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +5 -3
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +26 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +10 -5
- 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.d.ts +2 -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/AttachmentUpload.d.ts +10 -10
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +7 -7
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/attachmentUploadsSelector.d.ts +5 -5
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +2 -27
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js +0 -20
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js +0 -13
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +4 -15
- 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.js +1 -17
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.js +0 -9
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +0 -23
- 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.js +0 -3
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.js +0 -9
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.js.map +1 -1
- package/package.json +3 -3
- package/dist/dist-cjs/communication-react/index-oaEwmItW.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.d.ts +0 -6
- package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js +0 -11
- package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js.map +0 -1
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../../../../../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,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,YAAY,EAGZ,SAAS,EAGV,4CAAmC;AAEpC,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;AAG/E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAG5D,4CAA4C;AAC5C,OAAO,EAAE,oCAAoC,EAAE,qCAAqC,EAAE,MAAM,yBAAyB,CAAC;AAEtH,MAAM,kBAAkB,GAAG;IACzB,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,OAAO,EAAE,8DAA8D;QAClF,QAAQ,EAAE,MAAM;KACjB;CACF,CAAC;AAEF,MAAM,qBAAqB,GAAG;IAC5B,WAAW,EAAE,MAAM;IACnB,UAAU,EAAE,IAAI;CACK,CAAC;AAExB,MAAM,s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\nimport React, { CSSProperties, useCallback, useMemo } from 'react';\nimport { useRef } from 'react';\nimport {\n VideoGallery,\n VideoStreamOptions,\n CustomAvatarOptions,\n Announcer,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps\n} from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\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';\nimport { LocalVideoTileOptions } from '../CallComposite';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n/* @conditional-compile-remove(spotlight) */\nimport { PromptProps } from './Prompt';\n/* @conditional-compile-remove(spotlight) */\nimport { useLocalSpotlightCallbacksWithPrompt, useRemoteSpotlightCallbacksWithPrompt } from '../utils/spotlightUtils';\n\nconst VideoGalleryStyles = {\n root: {\n height: '100%',\n minHeight: '10rem', // space affordance to ensure media gallery is never collapsed\n minWidth: '6rem'\n }\n};\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\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 localVideoTileOptions?: boolean | LocalVideoTileOptions;\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n userSetGalleryLayout: VideoGalleryLayout;\n pinnedParticipants?: string[];\n setPinnedParticipants?: (pinnedParticipants: string[]) => void;\n /* @conditional-compile-remove(spotlight) */\n setIsPromptOpen: (isOpen: boolean) => void;\n /* @conditional-compile-remove(spotlight) */\n setPromptProps: (props: PromptProps) => void;\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons?: boolean;\n}\n\n/**\n * @private\n */\nexport const MediaGallery = (props: MediaGalleryProps): JSX.Element => {\n const {\n pinnedParticipants = [],\n setPinnedParticipants,\n /* @conditional-compile-remove(spotlight) */ setIsPromptOpen,\n /* @conditional-compile-remove(spotlight) */ setPromptProps,\n /* @conditional-compile-remove(spotlight) */ hideSpotlightButtons\n } = props;\n\n const videoGalleryProps = usePropsFor(VideoGallery);\n const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);\n const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);\n const announcerString = useParticipantChangedAnnouncement();\n\n const adapter = useAdapter();\n const userRole = adapter.getState().call?.role;\n const isRoomsCall = adapter.getState().isRoomsCall;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;\n const reactionResources = adapter.getState().reactions;\n\n const layoutBasedOnTilePosition: VideoGalleryLayout = getVideoGalleryLayoutBasedOnLocalOptions(\n (props.localVideoTileOptions as LocalVideoTileOptions)?.position\n );\n const cameraSwitcherProps = useMemo(() => {\n return {\n ...cameraSwitcherCallback,\n ...cameraSwitcherCameras\n };\n }, [cameraSwitcherCallback, cameraSwitcherCameras]);\n\n const onRenderAvatar = useCallback(\n (userId?: string, options?: CustomAvatarOptions) => {\n return (\n <Stack className={mergeStyles({ position: 'absolute', height: '100%', width: '100%' })}>\n <Stack styles={{ root: { margin: 'auto', maxHeight: '100%' } }}>\n {options?.coinSize && (\n <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />\n )}\n </Stack>\n </Stack>\n );\n },\n [props.onFetchAvatarPersonaData]\n );\n\n const remoteVideoTileMenuOptions: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps = useMemo(() => {\n return props.remoteVideoTileMenuOptions?.isHidden\n ? false\n : props.isMobile\n ? { kind: 'drawer', hostId: props.drawerMenuHostId }\n : { kind: 'contextual' };\n }, [props.remoteVideoTileMenuOptions?.isHidden, props.isMobile, props.drawerMenuHostId]);\n\n const overflowGalleryPosition = useMemo(() => {\n /* @conditional-compile-remove(overflow-top-composite) */\n if (props.userSetOverflowGalleryPosition === 'horizontalTop') {\n return props.userSetOverflowGalleryPosition;\n }\n return containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9\n ? 'verticalRight'\n : 'horizontalBottom';\n }, [\n /* @conditional-compile-remove(overflow-top-composite) */ props.userSetOverflowGalleryPosition,\n containerWidth,\n containerHeight\n ]);\n\n /* @conditional-compile-remove(spotlight) */\n const { onStartLocalSpotlight, onStopLocalSpotlight, onStartRemoteSpotlight, onStopRemoteSpotlight } =\n videoGalleryProps;\n\n /* @conditional-compile-remove(spotlight) */\n const { onStartLocalSpotlightWithPrompt, onStopLocalSpotlightWithPrompt } = useLocalSpotlightCallbacksWithPrompt(\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n setIsPromptOpen,\n setPromptProps\n );\n\n /* @conditional-compile-remove(spotlight) */\n const { onStartRemoteSpotlightWithPrompt, onStopRemoteSpotlightWithPrompt } = useRemoteSpotlightCallbacksWithPrompt(\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n setIsPromptOpen,\n setPromptProps\n );\n\n const onPinParticipant = useMemo(() => {\n return setPinnedParticipants\n ? (userId: string) => {\n if (!pinnedParticipants.includes(userId)) {\n setPinnedParticipants(pinnedParticipants.concat(userId));\n }\n }\n : undefined;\n }, [setPinnedParticipants, pinnedParticipants]);\n\n const onUnpinParticipant = useMemo(() => {\n return setPinnedParticipants\n ? (userId: string) => {\n setPinnedParticipants(pinnedParticipants.filter((participantId) => participantId !== userId));\n }\n : undefined;\n }, [setPinnedParticipants, pinnedParticipants]);\n\n const VideoGalleryMemoized = useMemo(() => {\n const layoutBasedOnUserSelection = (): VideoGalleryLayout => {\n return props.localVideoTileOptions ? layoutBasedOnTilePosition : props.userSetGalleryLayout;\n return layoutBasedOnTilePosition;\n };\n\n return (\n <VideoGallery\n {...videoGalleryProps}\n localVideoViewOptions={localVideoViewOptions}\n remoteVideoViewOptions={remoteVideoViewOptions}\n styles={VideoGalleryStyles}\n layout={layoutBasedOnUserSelection()}\n showCameraSwitcherInLocalPreview={props.isMobile}\n localVideoCameraCycleButtonProps={cameraSwitcherProps}\n onRenderAvatar={onRenderAvatar}\n remoteVideoTileMenu={remoteVideoTileMenuOptions}\n overflowGalleryPosition={overflowGalleryPosition}\n localVideoTileSize={\n props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')\n ? 'hidden'\n : props.isMobile && containerAspectRatio < 1\n ? '9:16'\n : '16:9'\n }\n pinnedParticipants={pinnedParticipants}\n onPinParticipant={onPinParticipant}\n onUnpinParticipant={onUnpinParticipant}\n reactionResources={reactionResources}\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight={hideSpotlightButtons ? undefined : onStartLocalSpotlightWithPrompt}\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight={hideSpotlightButtons ? undefined : onStopLocalSpotlightWithPrompt}\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight={hideSpotlightButtons ? undefined : onStartRemoteSpotlightWithPrompt}\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight={hideSpotlightButtons ? undefined : onStopRemoteSpotlightWithPrompt}\n />\n );\n }, [\n videoGalleryProps,\n props.isMobile,\n props.localVideoTileOptions,\n cameraSwitcherProps,\n onRenderAvatar,\n remoteVideoTileMenuOptions,\n overflowGalleryPosition,\n userRole,\n isRoomsCall,\n containerAspectRatio,\n\n props.userSetGalleryLayout,\n pinnedParticipants,\n onPinParticipant,\n onUnpinParticipant,\n layoutBasedOnTilePosition,\n reactionResources,\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons\n ]);\n\n return (\n <div ref={containerRef} style={mediaGalleryContainerStyles}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n {VideoGalleryMemoized}\n </div>\n );\n};\n\nconst mediaGalleryContainerStyles: CSSProperties = { width: '100%', height: '100%' };\n\nconst getVideoGalleryLayoutBasedOnLocalOptions = (localTileOptions?: string): VideoGalleryLayout => {\n return localTileOptions === 'grid' ? 'default' : 'floatingLocalVideo';\n};\n"]}
|
1
|
+
{"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../../../../../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,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,YAAY,EAGZ,SAAS,EAGV,4CAAmC;AAEpC,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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AiB;QACjB,4CAA4C;QAC5C,+BAA+B;QAC/B,4CAA4C;QAC5C,8BAA8B;QAC9B,4CAA4C;QAC5C,gCAAgC;QAChC,4CAA4C;QAC5C,+BAA+B;QAC/B,4CAA4C;QAC5C,oBAAoB;QACpB,iBAAiB;KAClB,CAAC,CAAC;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,2BAA2B;QACxD,oBAAC,SAAS,IAAC,kBAAkB,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,GAAI;QACrE,oBAAoB,CACjB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAErF,MAAM,wCAAwC,GAAG,CAAC,gBAAyB,EAAsB,EAAE;IACjG,OAAO,gBAAgB,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC;AACxE,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { CSSProperties, useCallback, useMemo } from 'react';\nimport { useRef } from 'react';\nimport {\n VideoGallery,\n VideoStreamOptions,\n CustomAvatarOptions,\n Announcer,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps\n} from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\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';\nimport { LocalVideoTileOptions } from '../CallComposite';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n/* @conditional-compile-remove(spotlight) */\nimport { PromptProps } from './Prompt';\n/* @conditional-compile-remove(spotlight) */\nimport { useLocalSpotlightCallbacksWithPrompt, useRemoteSpotlightCallbacksWithPrompt } from '../utils/spotlightUtils';\nimport { VideoTilesOptions } from '@internal/react-components';\n\nconst VideoGalleryStyles = {\n root: {\n height: '100%',\n minHeight: '10rem', // space affordance to ensure media gallery is never collapsed\n minWidth: '6rem'\n }\n};\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\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 localVideoTileOptions?: boolean | LocalVideoTileOptions;\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n userSetGalleryLayout: VideoGalleryLayout;\n pinnedParticipants?: string[];\n setPinnedParticipants?: (pinnedParticipants: string[]) => void;\n /* @conditional-compile-remove(spotlight) */\n setIsPromptOpen: (isOpen: boolean) => void;\n /* @conditional-compile-remove(spotlight) */\n setPromptProps: (props: PromptProps) => void;\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons?: boolean;\n videoTilesOptions?: VideoTilesOptions;\n}\n\n/**\n * @private\n */\nexport const MediaGallery = (props: MediaGalleryProps): JSX.Element => {\n const {\n pinnedParticipants = [],\n setPinnedParticipants,\n /* @conditional-compile-remove(spotlight) */ setIsPromptOpen,\n /* @conditional-compile-remove(spotlight) */ setPromptProps,\n /* @conditional-compile-remove(spotlight) */ hideSpotlightButtons,\n videoTilesOptions\n } = props;\n\n const videoGalleryProps = usePropsFor(VideoGallery);\n const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);\n const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);\n const announcerString = useParticipantChangedAnnouncement();\n\n const adapter = useAdapter();\n const userRole = adapter.getState().call?.role;\n const isRoomsCall = adapter.getState().isRoomsCall;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;\n const reactionResources = adapter.getState().reactions;\n\n const layoutBasedOnTilePosition: VideoGalleryLayout = getVideoGalleryLayoutBasedOnLocalOptions(\n (props.localVideoTileOptions as LocalVideoTileOptions)?.position\n );\n const cameraSwitcherProps = useMemo(() => {\n return {\n ...cameraSwitcherCallback,\n ...cameraSwitcherCameras\n };\n }, [cameraSwitcherCallback, cameraSwitcherCameras]);\n\n const onRenderAvatar = useCallback(\n (userId?: string, options?: CustomAvatarOptions) => {\n return (\n <Stack className={mergeStyles({ position: 'absolute', height: '100%', width: '100%' })}>\n <Stack styles={{ root: { margin: 'auto', maxHeight: '100%' } }}>\n {options?.coinSize && (\n <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />\n )}\n </Stack>\n </Stack>\n );\n },\n [props.onFetchAvatarPersonaData]\n );\n\n const remoteVideoTileMenuOptions: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps = useMemo(() => {\n return props.remoteVideoTileMenuOptions?.isHidden\n ? false\n : props.isMobile\n ? { kind: 'drawer', hostId: props.drawerMenuHostId }\n : { kind: 'contextual' };\n }, [props.remoteVideoTileMenuOptions?.isHidden, props.isMobile, props.drawerMenuHostId]);\n\n const overflowGalleryPosition = useMemo(() => {\n /* @conditional-compile-remove(overflow-top-composite) */\n if (props.userSetOverflowGalleryPosition === 'horizontalTop') {\n return props.userSetOverflowGalleryPosition;\n }\n return containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9\n ? 'verticalRight'\n : 'horizontalBottom';\n }, [\n /* @conditional-compile-remove(overflow-top-composite) */ props.userSetOverflowGalleryPosition,\n containerWidth,\n containerHeight\n ]);\n\n /* @conditional-compile-remove(spotlight) */\n const { onStartLocalSpotlight, onStopLocalSpotlight, onStartRemoteSpotlight, onStopRemoteSpotlight } =\n videoGalleryProps;\n\n /* @conditional-compile-remove(spotlight) */\n const { onStartLocalSpotlightWithPrompt, onStopLocalSpotlightWithPrompt } = useLocalSpotlightCallbacksWithPrompt(\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n setIsPromptOpen,\n setPromptProps\n );\n\n /* @conditional-compile-remove(spotlight) */\n const { onStartRemoteSpotlightWithPrompt, onStopRemoteSpotlightWithPrompt } = useRemoteSpotlightCallbacksWithPrompt(\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n setIsPromptOpen,\n setPromptProps\n );\n\n const onPinParticipant = useMemo(() => {\n return setPinnedParticipants\n ? (userId: string) => {\n if (!pinnedParticipants.includes(userId)) {\n setPinnedParticipants(pinnedParticipants.concat(userId));\n }\n }\n : undefined;\n }, [setPinnedParticipants, pinnedParticipants]);\n\n const onUnpinParticipant = useMemo(() => {\n return setPinnedParticipants\n ? (userId: string) => {\n setPinnedParticipants(pinnedParticipants.filter((participantId) => participantId !== userId));\n }\n : undefined;\n }, [setPinnedParticipants, pinnedParticipants]);\n\n const VideoGalleryMemoized = useMemo(() => {\n const layoutBasedOnUserSelection = (): VideoGalleryLayout => {\n return props.localVideoTileOptions ? layoutBasedOnTilePosition : props.userSetGalleryLayout;\n return layoutBasedOnTilePosition;\n };\n\n return (\n <VideoGallery\n {...videoGalleryProps}\n videoTilesOptions={videoTilesOptions}\n localVideoViewOptions={localVideoViewOptions}\n remoteVideoViewOptions={remoteVideoViewOptions}\n styles={VideoGalleryStyles}\n layout={layoutBasedOnUserSelection()}\n showCameraSwitcherInLocalPreview={props.isMobile}\n localVideoCameraCycleButtonProps={cameraSwitcherProps}\n onRenderAvatar={onRenderAvatar}\n remoteVideoTileMenu={remoteVideoTileMenuOptions}\n overflowGalleryPosition={overflowGalleryPosition}\n localVideoTileSize={\n props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')\n ? 'hidden'\n : props.isMobile && containerAspectRatio < 1\n ? '9:16'\n : '16:9'\n }\n pinnedParticipants={pinnedParticipants}\n onPinParticipant={onPinParticipant}\n onUnpinParticipant={onUnpinParticipant}\n reactionResources={reactionResources}\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight={hideSpotlightButtons ? undefined : onStartLocalSpotlightWithPrompt}\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight={hideSpotlightButtons ? undefined : onStopLocalSpotlightWithPrompt}\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight={hideSpotlightButtons ? undefined : onStartRemoteSpotlightWithPrompt}\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight={hideSpotlightButtons ? undefined : onStopRemoteSpotlightWithPrompt}\n />\n );\n }, [\n videoGalleryProps,\n props.isMobile,\n props.localVideoTileOptions,\n cameraSwitcherProps,\n onRenderAvatar,\n remoteVideoTileMenuOptions,\n overflowGalleryPosition,\n userRole,\n isRoomsCall,\n containerAspectRatio,\n props.userSetGalleryLayout,\n pinnedParticipants,\n onPinParticipant,\n onUnpinParticipant,\n layoutBasedOnTilePosition,\n reactionResources,\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons,\n videoTilesOptions\n ]);\n\n return (\n <div ref={containerRef} style={mediaGalleryContainerStyles}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n {VideoGalleryMemoized}\n </div>\n );\n};\n\nconst mediaGalleryContainerStyles: CSSProperties = { width: '100%', height: '100%' };\n\nconst getVideoGalleryLayoutBasedOnLocalOptions = (localTileOptions?: string): VideoGalleryLayout => {\n return localTileOptions === 'grid' ? 'default' : 'floatingLocalVideo';\n};\n"]}
|
@@ -143,19 +143,15 @@ const createCompositeHandlers = memoizeOne((adapter, capabilities) => {
|
|
143
143
|
const replacementConfig = Object.assign({ effectName: 'replacement' }, backgroundReplacementConfig);
|
144
144
|
return yield adapter.startVideoBackgroundEffect(replacementConfig);
|
145
145
|
}),
|
146
|
-
/* @conditional-compile-remove(close-captions) */
|
147
146
|
onStartCaptions: (options) => __awaiter(void 0, void 0, void 0, function* () {
|
148
147
|
yield adapter.startCaptions(options);
|
149
148
|
}),
|
150
|
-
/* @conditional-compile-remove(close-captions) */
|
151
149
|
onStopCaptions: () => __awaiter(void 0, void 0, void 0, function* () {
|
152
150
|
yield adapter.stopCaptions();
|
153
151
|
}),
|
154
|
-
/* @conditional-compile-remove(close-captions) */
|
155
152
|
onSetSpokenLanguage: (language) => __awaiter(void 0, void 0, void 0, function* () {
|
156
153
|
yield adapter.setSpokenLanguage(language);
|
157
154
|
}),
|
158
|
-
/* @conditional-compile-remove(close-captions) */
|
159
155
|
onSetCaptionLanguage: (language) => __awaiter(void 0, void 0, void 0, function* () {
|
160
156
|
yield adapter.setCaptionLanguage(language);
|
161
157
|
}),
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useHandlers.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/hooks/useHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAKlC,OAAO,EAAoB,6BAA6B,EAAE,yCAAgC;AAE1F,OAAO,UA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AAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,CAAA;QACD,4CAA4C;QAC5C,kBAAkB,EAAE,GAAwB,EAAE;YAC5C,MAAM,OAAO,CAAC,gBAAgB,EAAE,CAAC;QACnC,CAAC,CAAA;QACD,4CAA4C;QAC5C,qBAAqB,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,oBAAoB,CAAC,SAAS;YACjE,CAAC,CAAC,GAAwB,EAAE;gBACxB,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC;YACjC,CAAC,CAAA;YACH,CAAC,CAAC,SAAS;QACb,4CAA4C;QAC5C,oBAAoB,EAAE,GAAwB,EAAE;YAC9C,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC;QAChC,CAAC,CAAA;QACD,4CAA4C;QAC5C,sBAAsB,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,oBAAoB,CAAC,SAAS;YAClE,CAAC,CAAC,CAAO,OAAkB,EAAiB,EAAE;gBAC1C,MAAM,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACxC,CAAC,CAAA;YACH,CAAC,CAAC,SAAS;QACb,4CAA4C;QAC5C,qBAAqB,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,2BAA2B,CAAC,SAAS;YACxE,CAAC,CAAC,CAAO,OAAkB,EAAiB,EAAE;gBAC1C,MAAM,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACvC,CAAC,CAAA;YACH,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommonCallingHandlers } from '@internal/calling-component-bindings';\n/* @conditional-compile-remove(spotlight) */\nimport { _ComponentCallingHandlers } 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\nimport { VideoBackgroundBlurEffect, VideoBackgroundReplacementEffect } from '..';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isCameraOn } from '../utils';\nimport { DtmfTone } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\n\nimport type {\n BackgroundReplacementConfig,\n BackgroundBlurConfig,\n ParticipantCapabilities\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n PhoneNumberIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\n\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>(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _component: (props: PropsT) => ReactElement | null\n): Pick<CommonCallingHandlers, CommonProperties<CommonCallingHandlers, PropsT>> &\n /* @conditional-compile-remove(spotlight) */ Partial<_ComponentCallingHandlers> => {\n const adapter = useAdapter();\n const capabilities = adapter.getState().call?.capabilitiesFeature?.capabilities;\n return createCompositeHandlers(adapter, capabilities);\n};\n\nconst createCompositeHandlers = memoizeOne(\n (\n adapter: CommonCallAdapter,\n capabilities?: ParticipantCapabilities\n ): CommonCallingHandlers & /* @conditional-compile-remove(spotlight) */ Partial<_ComponentCallingHandlers> => {\n return {\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 (\n participant: Partial<CommunicationUserIdentifier & PhoneNumberIdentifier>,\n options?: AddPhoneNumberOptions\n ) => {\n if ('communicationUserId' in participant) {\n return await adapter.addParticipant(participant as CommunicationUserIdentifier);\n } else if ('phoneNumber' in participant) {\n return await adapter.addParticipant(participant as PhoneNumberIdentifier, options);\n }\n },\n onSendDtmfTone: async (dtmfTone: DtmfTone) => {\n await adapter.sendDtmfTone(dtmfTone);\n },\n onRemoveParticipant: async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ) => {\n if (typeof userId === 'string') {\n await adapter.removeParticipant(userId);\n } else {\n /* @conditional-compile-remove(PSTN-calls) */\n await adapter.removeParticipant(_toCommunicationIdentifier(userId));\n }\n },\n onRaiseHand: async () => {\n await adapter.raiseHand();\n },\n onLowerHand: async () => {\n await adapter.lowerHand();\n },\n onToggleRaiseHand: async () => {\n adapter.getState().call?.raiseHand.localParticipantRaisedHand\n ? await adapter.lowerHand()\n : await adapter.raiseHand();\n },\n onReactionClick: async (reaction: Reaction) => {\n await adapter.onReactionClick(reaction);\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\n ? await adapter.stopScreenShare()\n : 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\n onRemoveVideoBackgroundEffects: async () => {\n return await adapter.stopVideoBackgroundEffects();\n },\n\n onBlurVideoBackground: async (backgroundBlurConfig?: BackgroundBlurConfig) => {\n const blurConfig: VideoBackgroundBlurEffect = {\n effectName: 'blur',\n ...backgroundBlurConfig\n };\n return await adapter.startVideoBackgroundEffect(blurConfig);\n },\n\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 /* @conditional-compile-remove(end-of-call-survey) */\n onSubmitSurvey: async (survey: CallSurvey): Promise<CallSurveyResponse | undefined> => {\n return await adapter.submitSurvey(survey);\n },\n /* @conditional-compile-remove(spotlight) */\n onStartSpotlight: async (userIds?: string[]): Promise<void> => {\n await adapter.startSpotlight(userIds);\n },\n /* @conditional-compile-remove(spotlight) */\n onStopSpotlight: async (userIds?: string[]): Promise<void> => {\n await adapter.stopSpotlight(userIds);\n },\n /* @conditional-compile-remove(spotlight) */\n onStopAllSpotlight: async (): Promise<void> => {\n await adapter.stopAllSpotlight();\n },\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight: capabilities?.spotlightParticipant.isPresent\n ? async (): Promise<void> => {\n await adapter.startSpotlight();\n }\n : undefined,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight: async (): Promise<void> => {\n await adapter.stopSpotlight();\n },\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight: capabilities?.spotlightParticipant.isPresent\n ? async (userIds?: string[]): Promise<void> => {\n await adapter.startSpotlight(userIds);\n }\n : undefined,\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight: capabilities?.removeParticipantsSpotlight.isPresent\n ? async (userIds?: string[]): Promise<void> => {\n await adapter.stopSpotlight(userIds);\n }\n : undefined\n };\n }\n);\n"]}
|
1
|
+
{"version":3,"file":"useHandlers.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/hooks/useHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAKlC,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;AAmBtC,6CAA6C;AAC7C,OAAO,EAAE,0BAA0B,EAAE,yCAAgC;AAErE;;GAEG;AACH,+HAA+H;AAC/H,MAAM,CAAC,MAAM,WAAW,GAAG;AACzB,6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OAAO,CAAC,cAAc,EAAE,CAAC;YACjC,CAAC,CAAA;YACH,CAAC,CAAC,SAAS;QACb,4CAA4C;QAC5C,oBAAoB,EAAE,GAAwB,EAAE;YAC9C,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC;QAChC,CAAC,CAAA;QACD,4CAA4C;QAC5C,sBAAsB,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,oBAAoB,CAAC,SAAS;YAClE,CAAC,CAAC,CAAO,OAAkB,EAAiB,EAAE;gBAC1C,MAAM,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACxC,CAAC,CAAA;YACH,CAAC,CAAC,SAAS;QACb,4CAA4C;QAC5C,qBAAqB,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,2BAA2B,CAAC,SAAS;YACxE,CAAC,CAAC,CAAO,OAAkB,EAAiB,EAAE;gBAC1C,MAAM,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACvC,CAAC,CAAA;YACH,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommonCallingHandlers } from '@internal/calling-component-bindings';\n/* @conditional-compile-remove(spotlight) */\nimport { _ComponentCallingHandlers } 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\nimport { VideoBackgroundBlurEffect, VideoBackgroundReplacementEffect } from '..';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isCameraOn } from '../utils';\nimport { DtmfTone } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\n\nimport type {\n BackgroundReplacementConfig,\n BackgroundBlurConfig,\n ParticipantCapabilities\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n PhoneNumberIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\n\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>(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _component: (props: PropsT) => ReactElement | null\n): Pick<CommonCallingHandlers, CommonProperties<CommonCallingHandlers, PropsT>> &\n /* @conditional-compile-remove(spotlight) */ Partial<_ComponentCallingHandlers> => {\n const adapter = useAdapter();\n const capabilities = adapter.getState().call?.capabilitiesFeature?.capabilities;\n return createCompositeHandlers(adapter, capabilities);\n};\n\nconst createCompositeHandlers = memoizeOne(\n (\n adapter: CommonCallAdapter,\n capabilities?: ParticipantCapabilities\n ): CommonCallingHandlers & /* @conditional-compile-remove(spotlight) */ Partial<_ComponentCallingHandlers> => {\n return {\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 (\n participant: Partial<CommunicationUserIdentifier & PhoneNumberIdentifier>,\n options?: AddPhoneNumberOptions\n ) => {\n if ('communicationUserId' in participant) {\n return await adapter.addParticipant(participant as CommunicationUserIdentifier);\n } else if ('phoneNumber' in participant) {\n return await adapter.addParticipant(participant as PhoneNumberIdentifier, options);\n }\n },\n onSendDtmfTone: async (dtmfTone: DtmfTone) => {\n await adapter.sendDtmfTone(dtmfTone);\n },\n onRemoveParticipant: async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ) => {\n if (typeof userId === 'string') {\n await adapter.removeParticipant(userId);\n } else {\n /* @conditional-compile-remove(PSTN-calls) */\n await adapter.removeParticipant(_toCommunicationIdentifier(userId));\n }\n },\n onRaiseHand: async () => {\n await adapter.raiseHand();\n },\n onLowerHand: async () => {\n await adapter.lowerHand();\n },\n onToggleRaiseHand: async () => {\n adapter.getState().call?.raiseHand.localParticipantRaisedHand\n ? await adapter.lowerHand()\n : await adapter.raiseHand();\n },\n onReactionClick: async (reaction: Reaction) => {\n await adapter.onReactionClick(reaction);\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\n ? await adapter.stopScreenShare()\n : 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\n onRemoveVideoBackgroundEffects: async () => {\n return await adapter.stopVideoBackgroundEffects();\n },\n\n onBlurVideoBackground: async (backgroundBlurConfig?: BackgroundBlurConfig) => {\n const blurConfig: VideoBackgroundBlurEffect = {\n effectName: 'blur',\n ...backgroundBlurConfig\n };\n return await adapter.startVideoBackgroundEffect(blurConfig);\n },\n\n onReplaceVideoBackground: async (backgroundReplacementConfig: BackgroundReplacementConfig) => {\n const replacementConfig: VideoBackgroundReplacementEffect = {\n effectName: 'replacement',\n ...backgroundReplacementConfig\n };\n return await adapter.startVideoBackgroundEffect(replacementConfig);\n },\n onStartCaptions: async (options) => {\n await adapter.startCaptions(options);\n },\n onStopCaptions: async () => {\n await adapter.stopCaptions();\n },\n onSetSpokenLanguage: async (language) => {\n await adapter.setSpokenLanguage(language);\n },\n onSetCaptionLanguage: async (language) => {\n await adapter.setCaptionLanguage(language);\n },\n /* @conditional-compile-remove(end-of-call-survey) */\n onSubmitSurvey: async (survey: CallSurvey): Promise<CallSurveyResponse | undefined> => {\n return await adapter.submitSurvey(survey);\n },\n /* @conditional-compile-remove(spotlight) */\n onStartSpotlight: async (userIds?: string[]): Promise<void> => {\n await adapter.startSpotlight(userIds);\n },\n /* @conditional-compile-remove(spotlight) */\n onStopSpotlight: async (userIds?: string[]): Promise<void> => {\n await adapter.stopSpotlight(userIds);\n },\n /* @conditional-compile-remove(spotlight) */\n onStopAllSpotlight: async (): Promise<void> => {\n await adapter.stopAllSpotlight();\n },\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight: capabilities?.spotlightParticipant.isPresent\n ? async (): Promise<void> => {\n await adapter.startSpotlight();\n }\n : undefined,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight: async (): Promise<void> => {\n await adapter.stopSpotlight();\n },\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight: capabilities?.spotlightParticipant.isPresent\n ? async (userIds?: string[]): Promise<void> => {\n await adapter.startSpotlight(userIds);\n }\n : undefined,\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight: capabilities?.removeParticipantsSpotlight.isPresent\n ? async (userIds?: string[]): Promise<void> => {\n await adapter.stopSpotlight(userIds);\n }\n : undefined\n };\n }\n);\n"]}
|
@@ -7,7 +7,8 @@ export * from './Strings';
|
|
7
7
|
export { createAzureCommunicationCallAdapter, createAzureCommunicationCallAdapterFromClient, useAzureCommunicationCallAdapter } from './adapter';
|
8
8
|
export { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';
|
9
9
|
export type { TeamsAdapterOptions } from './adapter';
|
10
|
-
export type { TeamsCallAdapter, TeamsCallAdapterArgs
|
10
|
+
export type { TeamsCallAdapter, TeamsCallAdapterArgs } from './adapter';
|
11
|
+
export type { Profile, OnFetchProfileCallback } from './adapter';
|
11
12
|
export type { AzureCommunicationCallAdapterArgs, CallAdapterLocator, CommonCallAdapter, CallAdapterCallOperations, AzureCommunicationOutboundCallAdapterArgs } from './adapter';
|
12
13
|
export type { AzureCommunicationCallAdapterOptions } from './adapter';
|
13
14
|
export type { CommonCallAdapterOptions } from './adapter';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOhD,cAAc,WAAW,CAAC;AAE1B,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,WAAW,CAAC;AAEnB,yDAAyD;AACzD,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { CallComposite } from './CallComposite';\nexport type { CallCompositeOptions, CallCompositeProps, RemoteVideoTileMenuOptions } from './CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nexport type { DeviceCheckOptions } from './CallComposite';\nexport type { LocalVideoTileOptions } from './CallComposite';\nexport type { CallControlOptions } from './types/CallControlOptions';\n\nexport * from './Strings';\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';\n\nexport type { TeamsAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapter, TeamsCallAdapterArgs
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOhD,cAAc,WAAW,CAAC;AAE1B,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,WAAW,CAAC;AAEnB,yDAAyD;AACzD,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { CallComposite } from './CallComposite';\nexport type { CallCompositeOptions, CallCompositeProps, RemoteVideoTileMenuOptions } from './CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nexport type { DeviceCheckOptions } from './CallComposite';\nexport type { LocalVideoTileOptions } from './CallComposite';\nexport type { CallControlOptions } from './types/CallControlOptions';\n\nexport * from './Strings';\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';\n\nexport type { TeamsAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapter, TeamsCallAdapterArgs } from './adapter';\nexport type { Profile, OnFetchProfileCallback } from './adapter';\n\nexport type {\n AzureCommunicationCallAdapterArgs,\n CallAdapterLocator,\n CommonCallAdapter,\n CallAdapterCallOperations,\n AzureCommunicationOutboundCallAdapterArgs\n} from './adapter';\n\nexport type { AzureCommunicationCallAdapterOptions } from './adapter';\n\nexport type { CommonCallAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-adhoc-call) */\nexport type { CallParticipantsLocator } from './adapter';\n\nexport type {\n VideoBackgroundImage,\n VideoBackgroundEffect,\n VideoBackgroundNoEffect,\n VideoBackgroundBlurEffect,\n VideoBackgroundReplacementEffect\n} from './adapter/CallAdapter';\n\nexport type {\n CallAdapter,\n CallAdapterCallEndedEvent,\n CallAdapterCallManagement,\n CallAdapterClientState,\n CallAdapterDeviceManagement,\n CallAdapterState,\n CallAdapterSubscribers,\n CallAdapterUiState,\n CallCompositePage,\n CallEndedListener,\n CallIdChangedListener,\n DiagnosticChangedEventListner,\n DisplayNameChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsMutedChangedListener,\n IsSpeakingChangedListener,\n MediaDiagnosticChangedEvent,\n NetworkDiagnosticChangedEvent,\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n JoinCallOptions,\n StartCallIdentifier\n} from './adapter';\n\nexport type {\n CaptionsReceivedListener,\n IsCaptionsActiveChangedListener,\n IsCaptionLanguageChangedListener,\n IsSpokenLanguageChangedListener\n} from './adapter';\n\nexport type { TransferAcceptedListener } from './adapter';\n\nexport type { CapabilitiesChangedListener } from './adapter';\n\nexport type { CapabilityChangedNotificationStrings } from './components/CapabilitiesChangedNotificationBar';\n\n/* @conditional-compile-remove(spotlight) */\nexport type { SpotlightChangedListener } from './adapter';\n\nexport type { CallingSounds, SoundEffect } from './adapter';\n\n/* @conditional-compile-remove(spotlight) */\nexport type { SpotlightPromptStrings } from './components/Prompt';\n"]}
|
@@ -64,7 +64,7 @@ export const CallPage = (props) => {
|
|
64
64
|
/* @conditional-compile-remove(spotlight) */
|
65
65
|
setPromptProps: setPromptProps,
|
66
66
|
/* @conditional-compile-remove(spotlight) */
|
67
|
-
hideSpotlightButtons: (_a = options === null || options === void 0 ? void 0 : options.spotlight) === null || _a === void 0 ? void 0 : _a.hideSpotlightButtons })));
|
67
|
+
hideSpotlightButtons: (_a = options === null || options === void 0 ? void 0 : options.spotlight) === null || _a === void 0 ? void 0 : _a.hideSpotlightButtons, videoTilesOptions: options === null || options === void 0 ? void 0 : options.videoTilesOptions })));
|
68
68
|
}
|
69
69
|
};
|
70
70
|
return (React.createElement(React.Fragment, null,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/CallPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,sDAA6C;AACjE,OAAO,EAAsB,QAAQ,EAAgC,4CAAmC;AAExG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM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AAoB,GAC9D;QAEA,4CAA4C;QAC5C,oBAAC,MAAM,kBAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,IAAM,WAAW,EAAI,CAE3F,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA8C,EAAW,EAAE;IAC1F,oFAAoF;IACpF,4EAA4E;IAC5E,uEAAuE;IACvE,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,iBAAiB,CAAC,IAAI,CAAC;AACtG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\nimport { useId } from '@fluentui/react-hooks';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { ActiveErrorMessage, ErrorBar, ParticipantMenuItemsCallback } from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\nimport React from 'react';\nimport { useState } from 'react';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { useLocale } from '../../localization';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { MediaGallery } from '../components/MediaGallery';\nimport { NetworkReconnectTile } from '../components/NetworkReconnectTile';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { complianceBannerSelector } from '../selectors/complianceBannerSelector';\nimport { mediaGallerySelector } from '../selectors/mediaGallerySelector';\nimport { getRemoteParticipantsConnectedSelector } from '../selectors/mediaGallerySelector';\nimport { mutedNotificationSelector } from '../selectors/mutedNotificationSelector';\nimport { networkReconnectTileSelector } from '../selectors/networkReconnectTileSelector';\nimport { reduceCallControlsForMobile } from '../utils';\nimport { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport { DtmfDialpadPage } from './DtmfDialpadPage';\nimport { showDtmfDialer } from '../utils/MediaGalleryUtils';\nimport { getTargetCallees } from '../selectors/baseSelectors';\n/* @conditional-compile-remove(spotlight) */\nimport { Prompt, PromptProps } from '../components/Prompt';\n\n/**\n * @private\n */\nexport interface CallPageProps {\n mobileView: boolean;\n modalLayerHostId: string;\n callInvitationURL?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n options?: CallCompositeOptions;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n galleryLayout: VideoGalleryLayout;\n\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n onUserSetGalleryLayoutChange?: (layout: VideoGalleryLayout) => void;\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n onSetUserSetOverflowGalleryPosition?: (position: 'Responsive' | 'horizontalTop') => void;\n onCloseChatPane?: () => void;\n pinnedParticipants?: string[];\n setPinnedParticipants?: (pinnedParticipants: string[]) => void;\n compositeAudioContext?: AudioContext;\n}\n\n/**\n * @private\n */\nexport const CallPage = (props: CallPageProps): JSX.Element => {\n const {\n callInvitationURL,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n mobileView,\n galleryLayout = 'floatingLocalVideo',\n onUserSetGalleryLayoutChange,\n userSetOverflowGalleryPosition = 'Responsive',\n onSetUserSetOverflowGalleryPosition,\n onCloseChatPane,\n pinnedParticipants,\n setPinnedParticipants,\n compositeAudioContext\n } = props;\n\n // To use useProps to get these states, we need to create another file wrapping Call,\n // It seems unnecessary in this case, so we get the updated states using this approach.\n const { callStatus } = useSelector(callStatusSelector);\n const mediaGalleryProps = useSelector(mediaGallerySelector);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n const complianceBannerProps = useSelector(complianceBannerSelector);\n const errorBarProps = usePropsFor(ErrorBar);\n const mutedNotificationProps = useSelector(mutedNotificationSelector);\n const networkReconnectTileProps = useSelector(networkReconnectTileSelector);\n const remoteParticipantsConnected = useSelector(getRemoteParticipantsConnectedSelector);\n\n const callees = useSelector(getTargetCallees);\n const renderDtmfDialerFromStart = showDtmfDialer(callees, remoteParticipantsConnected);\n const [dtmfDialerPresent, setDtmfDialerPresent] = useState<boolean>(renderDtmfDialerFromStart);\n\n const strings = useLocale().strings.call;\n\n // Reduce the controls shown when mobile view is enabled.\n const callControlOptions = mobileView ? reduceCallControlsForMobile(options?.callControls) : options?.callControls;\n\n const drawerMenuHostId = useId('drawerMenuHost');\n /* @conditional-compile-remove(spotlight) */\n const [isPromptOpen, setIsPromptOpen] = useState<boolean>(false);\n /* @conditional-compile-remove(spotlight) */\n const [promptProps, setPromptProps] = useState<PromptProps>();\n\n const onRenderGalleryContentTrampoline = (): JSX.Element => {\n if (dtmfDialerPresent) {\n return (\n <DtmfDialpadPage\n mobileView={props.mobileView}\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n compositeAudioContext={compositeAudioContext}\n />\n );\n } else {\n return (\n <MediaGallery\n isMobile={mobileView}\n {...mediaGalleryProps}\n {...mediaGalleryHandlers}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n remoteVideoTileMenuOptions={options?.remoteVideoTileMenuOptions}\n drawerMenuHostId={drawerMenuHostId}\n localVideoTileOptions={options?.localVideoTile}\n userSetOverflowGalleryPosition={userSetOverflowGalleryPosition}\n userSetGalleryLayout={galleryLayout}\n pinnedParticipants={pinnedParticipants}\n setPinnedParticipants={setPinnedParticipants}\n /* @conditional-compile-remove(spotlight) */\n setIsPromptOpen={setIsPromptOpen}\n /* @conditional-compile-remove(spotlight) */\n setPromptProps={setPromptProps}\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons={options?.spotlight?.hideSpotlightButtons}\n />\n );\n }\n };\n\n return (\n <>\n <CallArrangement\n id={drawerMenuHostId}\n complianceBannerProps={{ ...complianceBannerProps, strings }}\n errorBarProps={options?.errorBar !== false && errorBarProps}\n mutedNotificationProps={mutedNotificationProps}\n callControlProps={{\n callInvitationURL: callInvitationURL,\n onFetchParticipantMenuItems: onFetchParticipantMenuItems,\n options: callControlOptions,\n increaseFlyoutItemSize: mobileView\n }}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n mobileView={mobileView}\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() =>\n _isInCall(callStatus) ? (\n isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (\n onRenderGalleryContentTrampoline()\n ) : (\n <NetworkReconnectTile {...networkReconnectTileProps} />\n )\n ) : (\n <></>\n )\n }\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n onCloseChatPane={onCloseChatPane}\n dataUiId={'call-page'}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n onUserSetOverflowGalleryPositionChange={onSetUserSetOverflowGalleryPosition}\n onUserSetGalleryLayoutChange={onUserSetGalleryLayoutChange}\n userSetGalleryLayout={galleryLayout}\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n /* @conditional-compile-remove(spotlight) */\n setIsPromptOpen={setIsPromptOpen}\n /* @conditional-compile-remove(spotlight) */\n setPromptProps={setPromptProps}\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons={options?.spotlight?.hideSpotlightButtons}\n />\n {\n /* @conditional-compile-remove(spotlight) */\n <Prompt isOpen={isPromptOpen} onDismiss={() => setIsPromptOpen(false)} {...promptProps} />\n }\n </>\n );\n};\n\n/**\n * @private\n */\nexport const isNetworkHealthy = (value: DiagnosticQuality | boolean | undefined): boolean => {\n // We know that the value is actually of type DiagnosticQuality for this diagnostic.\n // We ignore any boolen values, considering the network to still be healthy.\n // Thus, only DiagnosticQuality.Poor or .Bad indicate network problems.\n return value === true || value === false || value === undefined || value === DiagnosticQuality.Good;\n};\n"]}
|
1
|
+
{"version":3,"file":"CallPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/CallPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,sDAA6C;AACjE,OAAO,EAAsB,QAAQ,EAAgC,4CAAmC;AAExG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,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AAK,CAAC,IAAM,WAAW,EAAI,CAE3F,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA8C,EAAW,EAAE;IAC1F,oFAAoF;IACpF,4EAA4E;IAC5E,uEAAuE;IACvE,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,iBAAiB,CAAC,IAAI,CAAC;AACtG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\nimport { useId } from '@fluentui/react-hooks';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { ActiveErrorMessage, ErrorBar, ParticipantMenuItemsCallback } from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\nimport React from 'react';\nimport { useState } from 'react';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { useLocale } from '../../localization';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { MediaGallery } from '../components/MediaGallery';\nimport { NetworkReconnectTile } from '../components/NetworkReconnectTile';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { complianceBannerSelector } from '../selectors/complianceBannerSelector';\nimport { mediaGallerySelector } from '../selectors/mediaGallerySelector';\nimport { getRemoteParticipantsConnectedSelector } from '../selectors/mediaGallerySelector';\nimport { mutedNotificationSelector } from '../selectors/mutedNotificationSelector';\nimport { networkReconnectTileSelector } from '../selectors/networkReconnectTileSelector';\nimport { reduceCallControlsForMobile } from '../utils';\nimport { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport { DtmfDialpadPage } from './DtmfDialpadPage';\nimport { showDtmfDialer } from '../utils/MediaGalleryUtils';\nimport { getTargetCallees } from '../selectors/baseSelectors';\n/* @conditional-compile-remove(spotlight) */\nimport { Prompt, PromptProps } from '../components/Prompt';\n\n/**\n * @private\n */\nexport interface CallPageProps {\n mobileView: boolean;\n modalLayerHostId: string;\n callInvitationURL?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n options?: CallCompositeOptions;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n galleryLayout: VideoGalleryLayout;\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n onUserSetGalleryLayoutChange?: (layout: VideoGalleryLayout) => void;\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n onSetUserSetOverflowGalleryPosition?: (position: 'Responsive' | 'horizontalTop') => void;\n onCloseChatPane?: () => void;\n pinnedParticipants?: string[];\n setPinnedParticipants?: (pinnedParticipants: string[]) => void;\n compositeAudioContext?: AudioContext;\n}\n\n/**\n * @private\n */\nexport const CallPage = (props: CallPageProps): JSX.Element => {\n const {\n callInvitationURL,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n mobileView,\n galleryLayout = 'floatingLocalVideo',\n onUserSetGalleryLayoutChange,\n userSetOverflowGalleryPosition = 'Responsive',\n onSetUserSetOverflowGalleryPosition,\n onCloseChatPane,\n pinnedParticipants,\n setPinnedParticipants,\n compositeAudioContext\n } = props;\n\n // To use useProps to get these states, we need to create another file wrapping Call,\n // It seems unnecessary in this case, so we get the updated states using this approach.\n const { callStatus } = useSelector(callStatusSelector);\n const mediaGalleryProps = useSelector(mediaGallerySelector);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n const complianceBannerProps = useSelector(complianceBannerSelector);\n const errorBarProps = usePropsFor(ErrorBar);\n const mutedNotificationProps = useSelector(mutedNotificationSelector);\n const networkReconnectTileProps = useSelector(networkReconnectTileSelector);\n const remoteParticipantsConnected = useSelector(getRemoteParticipantsConnectedSelector);\n\n const callees = useSelector(getTargetCallees);\n const renderDtmfDialerFromStart = showDtmfDialer(callees, remoteParticipantsConnected);\n const [dtmfDialerPresent, setDtmfDialerPresent] = useState<boolean>(renderDtmfDialerFromStart);\n\n const strings = useLocale().strings.call;\n\n // Reduce the controls shown when mobile view is enabled.\n const callControlOptions = mobileView ? reduceCallControlsForMobile(options?.callControls) : options?.callControls;\n\n const drawerMenuHostId = useId('drawerMenuHost');\n /* @conditional-compile-remove(spotlight) */\n const [isPromptOpen, setIsPromptOpen] = useState<boolean>(false);\n /* @conditional-compile-remove(spotlight) */\n const [promptProps, setPromptProps] = useState<PromptProps>();\n\n const onRenderGalleryContentTrampoline = (): JSX.Element => {\n if (dtmfDialerPresent) {\n return (\n <DtmfDialpadPage\n mobileView={props.mobileView}\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n compositeAudioContext={compositeAudioContext}\n />\n );\n } else {\n return (\n <MediaGallery\n isMobile={mobileView}\n {...mediaGalleryProps}\n {...mediaGalleryHandlers}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n remoteVideoTileMenuOptions={options?.remoteVideoTileMenuOptions}\n drawerMenuHostId={drawerMenuHostId}\n localVideoTileOptions={options?.localVideoTile}\n userSetOverflowGalleryPosition={userSetOverflowGalleryPosition}\n userSetGalleryLayout={galleryLayout}\n pinnedParticipants={pinnedParticipants}\n setPinnedParticipants={setPinnedParticipants}\n /* @conditional-compile-remove(spotlight) */\n setIsPromptOpen={setIsPromptOpen}\n /* @conditional-compile-remove(spotlight) */\n setPromptProps={setPromptProps}\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons={options?.spotlight?.hideSpotlightButtons}\n videoTilesOptions={options?.videoTilesOptions}\n />\n );\n }\n };\n\n return (\n <>\n <CallArrangement\n id={drawerMenuHostId}\n complianceBannerProps={{ ...complianceBannerProps, strings }}\n errorBarProps={options?.errorBar !== false && errorBarProps}\n mutedNotificationProps={mutedNotificationProps}\n callControlProps={{\n callInvitationURL: callInvitationURL,\n onFetchParticipantMenuItems: onFetchParticipantMenuItems,\n options: callControlOptions,\n increaseFlyoutItemSize: mobileView\n }}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n mobileView={mobileView}\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() =>\n _isInCall(callStatus) ? (\n isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (\n onRenderGalleryContentTrampoline()\n ) : (\n <NetworkReconnectTile {...networkReconnectTileProps} />\n )\n ) : (\n <></>\n )\n }\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n onCloseChatPane={onCloseChatPane}\n dataUiId={'call-page'}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n onUserSetOverflowGalleryPositionChange={onSetUserSetOverflowGalleryPosition}\n onUserSetGalleryLayoutChange={onUserSetGalleryLayoutChange}\n userSetGalleryLayout={galleryLayout}\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n /* @conditional-compile-remove(spotlight) */\n setIsPromptOpen={setIsPromptOpen}\n /* @conditional-compile-remove(spotlight) */\n setPromptProps={setPromptProps}\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons={options?.spotlight?.hideSpotlightButtons}\n />\n {\n /* @conditional-compile-remove(spotlight) */\n <Prompt isOpen={isPromptOpen} onDismiss={() => setIsPromptOpen(false)} {...promptProps} />\n }\n </>\n );\n};\n\n/**\n * @private\n */\nexport const isNetworkHealthy = (value: DiagnosticQuality | boolean | undefined): boolean => {\n // We know that the value is actually of type DiagnosticQuality for this diagnostic.\n // We ignore any boolen values, considering the network to still be healthy.\n // Thus, only DiagnosticQuality.Poor or .Bad indicate network problems.\n return value === true || value === false || value === undefined || value === DiagnosticQuality.Good;\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js
CHANGED
@@ -100,43 +100,36 @@ export const getCaptionsKind = (state) => {
|
|
100
100
|
var _a;
|
101
101
|
return (_a = state.call) === null || _a === void 0 ? void 0 : _a.captionsFeature.captionsKind;
|
102
102
|
};
|
103
|
-
/* @conditional-compile-remove(close-captions) */
|
104
103
|
/** @private */
|
105
104
|
export const getCaptions = (state) => {
|
106
105
|
var _a;
|
107
106
|
return (_a = state.call) === null || _a === void 0 ? void 0 : _a.captionsFeature.captions;
|
108
107
|
};
|
109
|
-
/* @conditional-compile-remove(close-captions) */
|
110
108
|
/** @private */
|
111
109
|
export const getCaptionsStatus = (state) => {
|
112
110
|
var _a;
|
113
111
|
return (_a = state.call) === null || _a === void 0 ? void 0 : _a.captionsFeature.isCaptionsFeatureActive;
|
114
112
|
};
|
115
|
-
/* @conditional-compile-remove(close-captions) */
|
116
113
|
/** @private */
|
117
114
|
export const getCurrentCaptionLanguage = (state) => {
|
118
115
|
var _a;
|
119
116
|
return (_a = state.call) === null || _a === void 0 ? void 0 : _a.captionsFeature.currentCaptionLanguage;
|
120
117
|
};
|
121
|
-
/* @conditional-compile-remove(close-captions) */
|
122
118
|
/** @private */
|
123
119
|
export const getCurrentSpokenLanguage = (state) => {
|
124
120
|
var _a;
|
125
121
|
return (_a = state.call) === null || _a === void 0 ? void 0 : _a.captionsFeature.currentSpokenLanguage;
|
126
122
|
};
|
127
|
-
/* @conditional-compile-remove(close-captions) */
|
128
123
|
/** @private */
|
129
124
|
export const getSupportedCaptionLanguages = (state) => {
|
130
125
|
var _a;
|
131
126
|
return (_a = state.call) === null || _a === void 0 ? void 0 : _a.captionsFeature.supportedCaptionLanguages;
|
132
127
|
};
|
133
|
-
/* @conditional-compile-remove(close-captions) */
|
134
128
|
/** @private */
|
135
129
|
export const getSupportedSpokenLanguages = (state) => {
|
136
130
|
var _a;
|
137
131
|
return (_a = state.call) === null || _a === void 0 ? void 0 : _a.captionsFeature.supportedSpokenLanguages;
|
138
132
|
};
|
139
|
-
/* @conditional-compile-remove(close-captions) */
|
140
133
|
/**
|
141
134
|
* @private
|
142
135
|
*/
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"baseSelectors.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/selectors/baseSelectors.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAyBlC,OAAO,EAAa,YAAY,EAA+B,sDAA6C;AAO5G;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAuB,EAAsB,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC;AAEjG;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAuB,EAAsB,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,EAAE,CAAA,EAAA,CAAC;AAEzF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAuB,EAAyB,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;AAEhG;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAuB,EAAiB,EAAE,eAAC,OAAA,MAAA,MAAA,KAAK,CAAC,IAAI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C,yBAAyB,CAAC;AAC/D,CAAC,CAAC;AAEF,iDAAiD;AACjD,eAAe;AACf,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAuB,EAAwB,EAAE;;IAC3F,OAAO,MAAA,KAAK,CAAC,IAAI,0CAAE,eAAe,CAAC,wBAAwB,CAAC;AAC9D,CAAC,CAAC;AAEF,iDAAiD;AACjD;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAuB,EAAW,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC;AAEtF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAuB,EAAiB,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC;AAE9F;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,KAAuB,EAAsC,EAAE;;IAC9G,OAAO,MAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,mBAAmB,0CAAE,4BAA4B,CAAC;AACvE,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAuB,EAAyC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;AAExH;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAuB,EAAoB,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,SAAS,CAAA,EAAA,CAAC;AAEjG,4CAA4C;AAC5C;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAuB,EAAwC,EAAE,eAC1G,OAAA,MAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,SAAS,0CAAE,uBAAuB,CAAA,EAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallState as SDKCallStatus, DominantSpeakersInfo } from '@azure/communication-calling';\nimport { ParticipantCapabilities } from '@azure/communication-calling';\nimport { VideoDeviceInfo, AudioDeviceInfo } from '@azure/communication-calling';\n\nimport { CapabilitiesChangeInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n\nimport { ParticipantRole } from '@azure/communication-calling';\nimport {\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n LocalVideoStreamState,\n RemoteParticipantState\n} from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionsInfo } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(spotlight) */\nimport { SpotlightedParticipant } from '@azure/communication-calling';\nimport { CallAdapterState, CallCompositePage } from '../adapter/CallAdapter';\n\nimport { VideoBackgroundEffect } from '../adapter/CallAdapter';\nimport { _isInCall, _isPreviewOn, _dominantSpeakersWithFlatId } from '@internal/calling-component-bindings';\nimport { AdapterErrors } from '../../common/adapters';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\nimport { CommunicationIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(acs-close-captions) */\nimport { CaptionsKind } from '@azure/communication-calling';\n\n/**\n * @private\n */\nexport const getDisplayName = (state: CallAdapterState): string | undefined => state.displayName;\n\n/**\n * @private\n */\nexport const getCallId = (state: CallAdapterState): string | undefined => state.call?.id;\n\n/**\n * @private\n */\nexport const getEndedCall = (state: CallAdapterState): CallState | undefined => state.endedCall;\n\n/**\n * @private\n */\nexport const getCallStatus = (state: CallAdapterState): SDKCallStatus => state.call?.state ?? 'None';\n\n/**\n * @private\n */\nexport const getDeviceManager = (state: CallAdapterState): DeviceManagerState => state.devices;\n\n/**\n * @private\n */\nexport const getIsScreenShareOn = (state: CallAdapterState): boolean => state.call?.isScreenSharingOn ?? false;\n\n/**\n * @private\n */\nexport const getLocalParticipantRaisedHand = (state: CallAdapterState): RaisedHandState | undefined =>\n state.call?.raiseHand.localParticipantRaisedHand;\n\n/**\n * @private\n */\nexport const getCapabilites = (state: CallAdapterState): ParticipantCapabilities | undefined =>\n state.call?.capabilitiesFeature?.capabilities;\n\n/**\n * @private\n */\nexport const getIsPreviewCameraOn = (state: CallAdapterState): boolean => _isPreviewOn(state.devices);\n\n/**\n * @private\n */\nexport const getMicrophones = (state: CallAdapterState): AudioDeviceInfo[] => state.devices.microphones;\n\n/**\n * @private\n */\nexport const getCameras = (state: CallAdapterState): VideoDeviceInfo[] => state.devices.cameras;\n\n/**\n * @private\n */\nexport const getRole = (state: CallAdapterState): ParticipantRole | undefined => state.call?.role;\n\n/**\n * @private\n */\nexport const getPage = (state: CallAdapterState): CallCompositePage => state.page;\n\n/**\n * @private\n */\nexport const getTransferCall = (state: CallAdapterState): CallState | undefined => state.acceptedTransferCallState;\n\n/**\n * @private\n */\nexport const getLocalMicrophoneEnabled = (state: CallAdapterState): boolean => state.isLocalPreviewMicrophoneEnabled;\n\n/**\n * @private\n */\nexport const getLocalVideoStreams = (state: CallAdapterState): LocalVideoStreamState[] | undefined =>\n state.call?.localVideoStreams;\n\n/**\n * @private\n */\nexport const getIsTranscriptionActive = (state: CallAdapterState): boolean =>\n !!state.call?.transcription.isTranscriptionActive;\n\n/**\n * @private\n */\nexport const getIsRecordingActive = (state: CallAdapterState): boolean => !!state.call?.recording.isRecordingActive;\n\n/**\n * @private\n */\nexport const getUserFacingDiagnostics = (state: CallAdapterState): DiagnosticsCallFeatureState | undefined =>\n state.call?.diagnostics;\n\n/**\n * @private\n */\nexport const getDominantSpeakerInfo = (state: CallAdapterState): undefined | DominantSpeakersInfo =>\n state.call?.dominantSpeakers;\n\n/**\n * @private\n */\nexport const getRemoteParticipants = (\n state: CallAdapterState\n):\n | undefined\n | {\n [keys: string]: RemoteParticipantState;\n } => state.call?.remoteParticipants;\n\n/* @conditional-compile-remove(unsupported-browser) */\n/**\n * @private\n */\nexport const getEnvironmentInfo = (state: CallAdapterState): EnvironmentInfo | undefined => state.environmentInfo;\n\n/**\n * @private\n */\nexport const getSelectedVideoEffect = (state: CallAdapterState): VideoBackgroundEffect | undefined =>\n state.selectedVideoBackgroundEffect;\n\n/* @conditional-compile-remove(acs-close-captions) */\n/** @private */\nexport const getCaptionsKind = (state: CallAdapterState): CaptionsKind | undefined => {\n return state.call?.captionsFeature.captionsKind;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCaptions = (state: CallAdapterState): CaptionsInfo[] | undefined => {\n return state.call?.captionsFeature.captions;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCaptionsStatus = (state: CallAdapterState): boolean | undefined => {\n return state.call?.captionsFeature.isCaptionsFeatureActive;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCurrentCaptionLanguage = (state: CallAdapterState): string | undefined => {\n return state.call?.captionsFeature.currentCaptionLanguage;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getCurrentSpokenLanguage = (state: CallAdapterState): string | undefined => {\n return state.call?.captionsFeature.currentSpokenLanguage;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getSupportedCaptionLanguages = (state: CallAdapterState): string[] | undefined => {\n return state.call?.captionsFeature.supportedCaptionLanguages;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/** @private */\nexport const getSupportedSpokenLanguages = (state: CallAdapterState): string[] | undefined => {\n return state.call?.captionsFeature.supportedSpokenLanguages;\n};\n\n/* @conditional-compile-remove(close-captions) */\n/**\n * @private\n */\nexport const getIsTeamsCall = (state: CallAdapterState): boolean => state.isTeamsCall;\n\n/**\n * @private\n */\nexport const getLatestErrors = (state: CallAdapterState): AdapterErrors => state.latestErrors;\n\n/**\n * @private\n */\nexport const getLatestCapabilitiesChangedInfo = (state: CallAdapterState): CapabilitiesChangeInfo | undefined => {\n return state.call?.capabilitiesFeature?.latestCapabilitiesChangeInfo;\n};\n\n/**\n * @private\n */\nexport const getTargetCallees = (state: CallAdapterState): CommunicationIdentifier[] | undefined => state.targetCallees;\n\n/**\n * @private\n */\nexport const getStartTime = (state: CallAdapterState): Date | undefined => state.call?.startTime;\n\n/* @conditional-compile-remove(spotlight) */\n/**\n * @private\n */\nexport const getSpotlightedParticipants = (state: CallAdapterState): SpotlightedParticipant[] | undefined =>\n state.call?.spotlight?.spotlightedParticipants;\n"]}
|
1
|
+
{"version":3,"file":"baseSelectors.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/selectors/baseSelectors.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAwBlC,OAAO,EAAa,YAAY,EAA+B,sDAA6C;AAO5G;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAuB,EAAsB,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC;AAEjG;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAuB,EAAsB,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,EAAE,CAAA,EAAA,CAAC;AAEzF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAuB,EAAyB,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;AAEhG;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAuB,EAAiB,EAAE,eAAC,OAAA,MAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,KAAK,mCAAI,MAAM,CAAA,EAAA,CAAC;AAErG;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAuB,EAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;AAE/F;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAuB,EAAW,EAAE,eAAC,OAAA,MAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,iBAAiB,mCAAI,KAAK,CAAA,EAAA,CAAC;AAE/G;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,KAAuB,EAA+B,EAAE,WACpG,OAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,SAAS,CAAC,0BAA0B,CAA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CAAE,mBAAmB,0CAAE,4BAA4B,CAAC;AACvE,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAuB,EAAyC,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;AAExH;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAuB,EAAoB,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,SAAS,CAAA,EAAA,CAAC;AAEjG,4CAA4C;AAC5C;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAuB,EAAwC,EAAE,eAC1G,OAAA,MAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,SAAS,0CAAE,uBAAuB,CAAA,EAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallState as SDKCallStatus, DominantSpeakersInfo } from '@azure/communication-calling';\nimport { ParticipantCapabilities } from '@azure/communication-calling';\nimport { VideoDeviceInfo, AudioDeviceInfo } from '@azure/communication-calling';\n\nimport { CapabilitiesChangeInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n\nimport { ParticipantRole } from '@azure/communication-calling';\nimport {\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n LocalVideoStreamState,\n RemoteParticipantState\n} from '@internal/calling-stateful-client';\nimport { CaptionsInfo } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(spotlight) */\nimport { SpotlightedParticipant } from '@azure/communication-calling';\nimport { CallAdapterState, CallCompositePage } from '../adapter/CallAdapter';\n\nimport { VideoBackgroundEffect } from '../adapter/CallAdapter';\nimport { _isInCall, _isPreviewOn, _dominantSpeakersWithFlatId } from '@internal/calling-component-bindings';\nimport { AdapterErrors } from '../../common/adapters';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\nimport { CommunicationIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(acs-close-captions) */\nimport { CaptionsKind } from '@azure/communication-calling';\n\n/**\n * @private\n */\nexport const getDisplayName = (state: CallAdapterState): string | undefined => state.displayName;\n\n/**\n * @private\n */\nexport const getCallId = (state: CallAdapterState): string | undefined => state.call?.id;\n\n/**\n * @private\n */\nexport const getEndedCall = (state: CallAdapterState): CallState | undefined => state.endedCall;\n\n/**\n * @private\n */\nexport const getCallStatus = (state: CallAdapterState): SDKCallStatus => state.call?.state ?? 'None';\n\n/**\n * @private\n */\nexport const getDeviceManager = (state: CallAdapterState): DeviceManagerState => state.devices;\n\n/**\n * @private\n */\nexport const getIsScreenShareOn = (state: CallAdapterState): boolean => state.call?.isScreenSharingOn ?? false;\n\n/**\n * @private\n */\nexport const getLocalParticipantRaisedHand = (state: CallAdapterState): RaisedHandState | undefined =>\n state.call?.raiseHand.localParticipantRaisedHand;\n\n/**\n * @private\n */\nexport const getCapabilites = (state: CallAdapterState): ParticipantCapabilities | undefined =>\n state.call?.capabilitiesFeature?.capabilities;\n\n/**\n * @private\n */\nexport const getIsPreviewCameraOn = (state: CallAdapterState): boolean => _isPreviewOn(state.devices);\n\n/**\n * @private\n */\nexport const getMicrophones = (state: CallAdapterState): AudioDeviceInfo[] => state.devices.microphones;\n\n/**\n * @private\n */\nexport const getCameras = (state: CallAdapterState): VideoDeviceInfo[] => state.devices.cameras;\n\n/**\n * @private\n */\nexport const getRole = (state: CallAdapterState): ParticipantRole | undefined => state.call?.role;\n\n/**\n * @private\n */\nexport const getPage = (state: CallAdapterState): CallCompositePage => state.page;\n\n/**\n * @private\n */\nexport const getTransferCall = (state: CallAdapterState): CallState | undefined => state.acceptedTransferCallState;\n\n/**\n * @private\n */\nexport const getLocalMicrophoneEnabled = (state: CallAdapterState): boolean => state.isLocalPreviewMicrophoneEnabled;\n\n/**\n * @private\n */\nexport const getLocalVideoStreams = (state: CallAdapterState): LocalVideoStreamState[] | undefined =>\n state.call?.localVideoStreams;\n\n/**\n * @private\n */\nexport const getIsTranscriptionActive = (state: CallAdapterState): boolean =>\n !!state.call?.transcription.isTranscriptionActive;\n\n/**\n * @private\n */\nexport const getIsRecordingActive = (state: CallAdapterState): boolean => !!state.call?.recording.isRecordingActive;\n\n/**\n * @private\n */\nexport const getUserFacingDiagnostics = (state: CallAdapterState): DiagnosticsCallFeatureState | undefined =>\n state.call?.diagnostics;\n\n/**\n * @private\n */\nexport const getDominantSpeakerInfo = (state: CallAdapterState): undefined | DominantSpeakersInfo =>\n state.call?.dominantSpeakers;\n\n/**\n * @private\n */\nexport const getRemoteParticipants = (\n state: CallAdapterState\n):\n | undefined\n | {\n [keys: string]: RemoteParticipantState;\n } => state.call?.remoteParticipants;\n\n/* @conditional-compile-remove(unsupported-browser) */\n/**\n * @private\n */\nexport const getEnvironmentInfo = (state: CallAdapterState): EnvironmentInfo | undefined => state.environmentInfo;\n\n/**\n * @private\n */\nexport const getSelectedVideoEffect = (state: CallAdapterState): VideoBackgroundEffect | undefined =>\n state.selectedVideoBackgroundEffect;\n\n/* @conditional-compile-remove(acs-close-captions) */\n/** @private */\nexport const getCaptionsKind = (state: CallAdapterState): CaptionsKind | undefined => {\n return state.call?.captionsFeature.captionsKind;\n};\n\n/** @private */\nexport const getCaptions = (state: CallAdapterState): CaptionsInfo[] | undefined => {\n return state.call?.captionsFeature.captions;\n};\n\n/** @private */\nexport const getCaptionsStatus = (state: CallAdapterState): boolean | undefined => {\n return state.call?.captionsFeature.isCaptionsFeatureActive;\n};\n\n/** @private */\nexport const getCurrentCaptionLanguage = (state: CallAdapterState): string | undefined => {\n return state.call?.captionsFeature.currentCaptionLanguage;\n};\n\n/** @private */\nexport const getCurrentSpokenLanguage = (state: CallAdapterState): string | undefined => {\n return state.call?.captionsFeature.currentSpokenLanguage;\n};\n\n/** @private */\nexport const getSupportedCaptionLanguages = (state: CallAdapterState): string[] | undefined => {\n return state.call?.captionsFeature.supportedCaptionLanguages;\n};\n\n/** @private */\nexport const getSupportedSpokenLanguages = (state: CallAdapterState): string[] | undefined => {\n return state.call?.captionsFeature.supportedSpokenLanguages;\n};\n\n/**\n * @private\n */\nexport const getIsTeamsCall = (state: CallAdapterState): boolean => state.isTeamsCall;\n\n/**\n * @private\n */\nexport const getLatestErrors = (state: CallAdapterState): AdapterErrors => state.latestErrors;\n\n/**\n * @private\n */\nexport const getLatestCapabilitiesChangedInfo = (state: CallAdapterState): CapabilitiesChangeInfo | undefined => {\n return state.call?.capabilitiesFeature?.latestCapabilitiesChangeInfo;\n};\n\n/**\n * @private\n */\nexport const getTargetCallees = (state: CallAdapterState): CommunicationIdentifier[] | undefined => state.targetCallees;\n\n/**\n * @private\n */\nexport const getStartTime = (state: CallAdapterState): Date | undefined => state.call?.startTime;\n\n/* @conditional-compile-remove(spotlight) */\n/**\n * @private\n */\nexport const getSpotlightedParticipants = (state: CallAdapterState): SpotlightedParticipant[] | undefined =>\n state.call?.spotlight?.spotlightedParticipants;\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/Strings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Strings used by the {@link CallWithChatComposite} directly.\n *\n * This strings are in addition to those used by the components from the component library.\n *\n * @public\n */\nexport interface CallWithChatCompositeStrings {\n /**\n * {@link CallWithChatComposite} control bar People button label\n */\n peopleButtonLabel: string;\n /**\n * {@link CallWithChatComposite} control bar People button label when checked\n */\n selectedPeopleButtonLabel: string;\n /**\n * {@link CallWithChatComposite} control bar People button ToolTipContent\n */\n peopleButtonTooltipOpen: string;\n /**\n * {@link CallWithChatComposite} control bar People button ToolTipContent\n */\n peopleButtonTooltipClose: string;\n /**\n * {@link CallWithChatComposite} control bar Chat button label.\n */\n chatButtonLabel: string;\n /**\n * {@Link CallWithChatComposite} control bar Chat button ToolTipContent.\n */\n chatButtonTooltipOpen: string;\n /**\n * {@Link CallWithChatComposite} control bar Chat button ToolTipContent.\n */\n chatButtonTooltipClose: string;\n /**\n * {@link CallWithChatComposite} control bar Chat button enhanced tooltip string.\n */\n chatButtonTooltipClosedWithMessageCount: string;\n /**\n * Title for the audio device selection sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true` and when no speakers are available.\n */\n moreDrawerAudioDeviceMenuTitle?: string;\n /**\n * Title for the microphone selection sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true` and when speakers are available.\n */\n moreDrawerMicrophoneMenuTitle: string;\n /**\n * Title for the speaker selection sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true`.\n */\n moreDrawerSpeakerMenuTitle: string;\n
|
1
|
+
{"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/Strings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Strings used by the {@link CallWithChatComposite} directly.\n *\n * This strings are in addition to those used by the components from the component library.\n *\n * @public\n */\nexport interface CallWithChatCompositeStrings {\n /**\n * {@link CallWithChatComposite} control bar People button label\n */\n peopleButtonLabel: string;\n /**\n * {@link CallWithChatComposite} control bar People button label when checked\n */\n selectedPeopleButtonLabel: string;\n /**\n * {@link CallWithChatComposite} control bar People button ToolTipContent\n */\n peopleButtonTooltipOpen: string;\n /**\n * {@link CallWithChatComposite} control bar People button ToolTipContent\n */\n peopleButtonTooltipClose: string;\n /**\n * {@link CallWithChatComposite} control bar Chat button label.\n */\n chatButtonLabel: string;\n /**\n * {@Link CallWithChatComposite} control bar Chat button ToolTipContent.\n */\n chatButtonTooltipOpen: string;\n /**\n * {@Link CallWithChatComposite} control bar Chat button ToolTipContent.\n */\n chatButtonTooltipClose: string;\n /**\n * {@link CallWithChatComposite} control bar Chat button enhanced tooltip string.\n */\n chatButtonTooltipClosedWithMessageCount: string;\n /**\n * Title for the audio device selection sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true` and when no speakers are available.\n */\n moreDrawerAudioDeviceMenuTitle?: string;\n /**\n * Title for the microphone selection sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true` and when speakers are available.\n */\n moreDrawerMicrophoneMenuTitle: string;\n /**\n * Title for the speaker selection sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true`.\n */\n moreDrawerSpeakerMenuTitle: string;\n /**\n * Title for the captions sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true`.\n */\n moreDrawerCaptionsMenuTitle: string;\n /**\n * Title for the spoken language sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true`.\n */\n moreDrawerSpokenLanguageMenuTitle: string;\n /**\n * Title for the caption language sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true`.\n */\n moreDrawerCaptionLanguageMenuTitle: string;\n /**\n * Title for the gallery options sub-menu in the more button drawer.\n */\n moreDrawerGalleryOptionsMenuTitle: string;\n /**\n * {@Link CallWithChatComposite} control bar More button label\n */\n moreDrawerButtonLabel: string;\n /**\n * {@Link CallWithChatComposite} control bar More button tooltip content\n */\n moreDrawerButtonTooltip: string;\n /**\n * Side pane People section Title.\n */\n peoplePaneTitle: string;\n /**\n * Side pane People section subheader.\n */\n peoplePaneSubTitle: string;\n /**\n * Side pane Chat screen title.\n */\n chatPaneTitle: string;\n /**\n * New Message label for chat button with notification icon component.\n */\n chatButtonNewMessageNotificationLabel: string;\n /**\n * Aria label for the picture in picture in picture tile that.\n * This feature currently only shows on mobileView when the chat or people pane is expanded.\n * @remarks\n * This component displays the local and most-dominant remote participant and when clicked\n * returns the user to the call screen.\n */\n pictureInPictureTileAriaLabel: string;\n /**\n * Label for menu item to remove participant\n */\n removeMenuLabel: string;\n /**\n * Label for button to copy invite link\n */\n copyInviteLinkButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to open dialpad\n */\n openDialpadButtonLabel: string;\n /**\n * Label for SidePaneHeader dismiss button\n */\n dismissSidePaneButtonLabel?: string;\n /**\n * Aria Description string for return to call button\n */\n returnToCallButtonAriaDescription?: string;\n /**\n * Aria label string for return to call back button\n */\n returnToCallButtonAriaLabel?: string;\n\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for add people dropdown\n */\n peoplePaneAddPeopleButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to start a call\n */\n dialpadStartCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Title for dialpad Modal\n */\n dialpadModalTitle: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal\n */\n dialpadModalAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal close button\n */\n dialpadCloseModalButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Placeholder text for dtmf dialpad\n */\n dtmfDialpadPlaceholderText: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for the button to open dtmf dialpad\n */\n openDtmfDialpadLabel: string;\n /**\n * aria label for when the invite link has been actioned\n */\n copyInviteLinkActionedAriaLabel: string;\n}\n"]}
|
@@ -5,7 +5,7 @@ import { StartCaptionsOptions } from '@azure/communication-calling';
|
|
5
5
|
import { AddPhoneNumberOptions } from '@azure/communication-calling';
|
6
6
|
import { DtmfTone } from '@azure/communication-calling';
|
7
7
|
import { CreateVideoStreamViewResult, VideoStreamOptions } from "../../../../../react-components/src";
|
8
|
-
import { AttachmentMetadata,
|
8
|
+
import { AttachmentMetadata, AttachmentUploadTask } from "../../../../../react-components/src";
|
9
9
|
import { ParticipantsJoinedListener, ParticipantsLeftListener, IsMutedChangedListener, CallIdChangedListener, IsLocalScreenSharingActiveChangedListener, DisplayNameChangedListener, IsSpeakingChangedListener, CallAdapter, CallEndedListener } from '../../CallComposite';
|
10
10
|
import { MessageReceivedListener, MessageReadListener, ChatAdapter, ParticipantsRemovedListener, ParticipantsAddedListener, MessageEditedListener, MessageDeletedListener } from '../../ChatComposite';
|
11
11
|
import { ResourceDetails } from '../../ChatComposite';
|
@@ -107,6 +107,8 @@ export declare class AzureCommunicationCallWithChatAdapter implements CallWithCh
|
|
107
107
|
fetchInitialData(): Promise<void>;
|
108
108
|
/** Send a chat message. */
|
109
109
|
sendMessage(content: string): Promise<void>;
|
110
|
+
/** Send a chat message with attachments. */
|
111
|
+
sendMessageWithAttachments(content: string, attachments: AttachmentMetadata[]): Promise<void>;
|
110
112
|
/** Send a chat read receipt. */
|
111
113
|
sendReadReceipt(chatMessageId: string): Promise<void>;
|
112
114
|
/** Send an isTyping indicator. */
|
@@ -119,8 +121,8 @@ export declare class AzureCommunicationCallWithChatAdapter implements CallWithCh
|
|
119
121
|
}): Promise<void>;
|
120
122
|
/** Delete an existing message. */
|
121
123
|
deleteMessage(messageId: string): Promise<void>;
|
122
|
-
registerActiveUploads: (files: File[]) =>
|
123
|
-
registerCompletedUploads: (metadata: AttachmentMetadata[]) =>
|
124
|
+
registerActiveUploads: (files: File[]) => AttachmentUploadTask[];
|
125
|
+
registerCompletedUploads: (metadata: AttachmentMetadata[]) => AttachmentUploadTask[];
|
124
126
|
clearUploads: () => void;
|
125
127
|
cancelUpload: (id: string) => void;
|
126
128
|
updateUploadProgress: (id: string, progress: number) => void;
|
@@ -145,6 +145,8 @@ export class AzureCommunicationCallWithChatAdapter {
|
|
145
145
|
this.disposeScreenShareStreamView.bind(this);
|
146
146
|
this.fetchInitialData.bind(this);
|
147
147
|
this.sendMessage.bind(this);
|
148
|
+
/* @conditional-compile-remove(attachment-upload) */
|
149
|
+
this.sendMessageWithAttachments.bind(this);
|
148
150
|
this.sendReadReceipt.bind(this);
|
149
151
|
this.sendTypingIndicator.bind(this);
|
150
152
|
this.loadPreviousChatMessages.bind(this);
|
@@ -177,12 +179,10 @@ export class AzureCommunicationCallWithChatAdapter {
|
|
177
179
|
this.sendDtmfTone.bind(this);
|
178
180
|
/* @conditional-compile-remove(unsupported-browser) */
|
179
181
|
this.allowUnsupportedBrowserVersion.bind(this);
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
this.setCaptionLanguage.bind(this);
|
185
|
-
}
|
182
|
+
this.startCaptions.bind(this);
|
183
|
+
this.stopCaptions.bind(this);
|
184
|
+
this.setSpokenLanguage.bind(this);
|
185
|
+
this.setCaptionLanguage.bind(this);
|
186
186
|
this.startVideoBackgroundEffect.bind(this);
|
187
187
|
this.stopVideoBackgroundEffects.bind(this);
|
188
188
|
this.updateBackgroundPickerImages.bind(this);
|
@@ -395,6 +395,20 @@ export class AzureCommunicationCallWithChatAdapter {
|
|
395
395
|
});
|
396
396
|
});
|
397
397
|
}
|
398
|
+
/* @conditional-compile-remove(attachment-upload) */
|
399
|
+
/** Send a chat message with attachments. */
|
400
|
+
sendMessageWithAttachments(content, attachments) {
|
401
|
+
return __awaiter(this, void 0, void 0, function* () {
|
402
|
+
return yield this.chatAdapterPromise.then((adapter) => {
|
403
|
+
const fileSharingMetadata = {
|
404
|
+
fileSharingMetadata: JSON.stringify(attachments)
|
405
|
+
};
|
406
|
+
return adapter.sendMessage(content, {
|
407
|
+
metadata: fileSharingMetadata
|
408
|
+
});
|
409
|
+
});
|
410
|
+
});
|
411
|
+
}
|
398
412
|
/** Send a chat read receipt. */
|
399
413
|
sendReadReceipt(chatMessageId) {
|
400
414
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -480,25 +494,21 @@ export class AzureCommunicationCallWithChatAdapter {
|
|
480
494
|
allowUnsupportedBrowserVersion() {
|
481
495
|
return this.callAdapter.allowUnsupportedBrowserVersion();
|
482
496
|
}
|
483
|
-
/* @conditional-compile-remove(close-captions) */
|
484
497
|
startCaptions(options) {
|
485
498
|
return __awaiter(this, void 0, void 0, function* () {
|
486
499
|
yield this.callAdapter.startCaptions(options);
|
487
500
|
});
|
488
501
|
}
|
489
|
-
/* @conditional-compile-remove(close-captions) */
|
490
502
|
stopCaptions() {
|
491
503
|
return __awaiter(this, void 0, void 0, function* () {
|
492
504
|
yield this.callAdapter.stopCaptions();
|
493
505
|
});
|
494
506
|
}
|
495
|
-
/* @conditional-compile-remove(close-captions) */
|
496
507
|
setCaptionLanguage(language) {
|
497
508
|
return __awaiter(this, void 0, void 0, function* () {
|
498
509
|
yield this.callAdapter.setCaptionLanguage(language);
|
499
510
|
});
|
500
511
|
}
|
501
|
-
/* @conditional-compile-remove(close-captions) */
|
502
512
|
setSpokenLanguage(language) {
|
503
513
|
return __awaiter(this, void 0, void 0, function* () {
|
504
514
|
yield this.callAdapter.setSpokenLanguage(language);
|
@@ -577,19 +587,15 @@ export class AzureCommunicationCallWithChatAdapter {
|
|
577
587
|
case 'selectedSpeakerChanged':
|
578
588
|
this.callAdapter.on('selectedSpeakerChanged', listener);
|
579
589
|
break;
|
580
|
-
/* @conditional-compile-remove(close-captions) */
|
581
590
|
case 'captionsReceived':
|
582
591
|
this.callAdapter.on('captionsReceived', listener);
|
583
592
|
break;
|
584
|
-
/* @conditional-compile-remove(close-captions) */
|
585
593
|
case 'isCaptionsActiveChanged':
|
586
594
|
this.callAdapter.on('isCaptionsActiveChanged', listener);
|
587
595
|
break;
|
588
|
-
/* @conditional-compile-remove(close-captions) */
|
589
596
|
case 'isCaptionLanguageChanged':
|
590
597
|
this.callAdapter.on('isCaptionLanguageChanged', listener);
|
591
598
|
break;
|
592
|
-
/* @conditional-compile-remove(close-captions) */
|
593
599
|
case 'isSpokenLanguageChanged':
|
594
600
|
this.callAdapter.on('isSpokenLanguageChanged', listener);
|
595
601
|
break;
|
@@ -673,19 +679,15 @@ export class AzureCommunicationCallWithChatAdapter {
|
|
673
679
|
case 'selectedSpeakerChanged':
|
674
680
|
this.callAdapter.off('selectedSpeakerChanged', listener);
|
675
681
|
break;
|
676
|
-
/* @conditional-compile-remove(close-captions) */
|
677
682
|
case 'captionsReceived':
|
678
683
|
this.callAdapter.off('captionsReceived', listener);
|
679
684
|
break;
|
680
|
-
/* @conditional-compile-remove(close-captions) */
|
681
685
|
case 'isCaptionsActiveChanged':
|
682
686
|
this.callAdapter.off('isCaptionsActiveChanged', listener);
|
683
687
|
break;
|
684
|
-
/* @conditional-compile-remove(close-captions) */
|
685
688
|
case 'isCaptionLanguageChanged':
|
686
689
|
this.callAdapter.off('isCaptionLanguageChanged', listener);
|
687
690
|
break;
|
688
|
-
/* @conditional-compile-remove(close-captions) */
|
689
691
|
case 'isSpokenLanguageChanged':
|
690
692
|
this.callAdapter.off('isSpokenLanguageChanged', listener);
|
691
693
|
break;
|