@azure/communication-react 1.24.0-alpha-202501290016 → 1.24.0-alpha-202501300015
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 +112 -5
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DFTHjaH_.js → ChatMessageComponentAsRichTextEditBox-B7usiRRs.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DFTHjaH_.js.map → ChatMessageComponentAsRichTextEditBox-B7usiRRs.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-B1uO80N9.js → RichTextSendBoxWrapper-BUOpEC0L.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-B1uO80N9.js.map → RichTextSendBoxWrapper-BUOpEC0L.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-B2zHVkUS.js → index-BYO_RzRh.js} +490 -99
- package/dist/dist-cjs/communication-react/index-BYO_RzRh.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.d.ts +11 -4
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +12 -2
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +9 -0
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +102 -5
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +8 -17
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +7 -21
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +3 -11
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +2 -3
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +0 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +1 -9
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +1 -7
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +61 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +5 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +110 -6
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +9 -3
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +6 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +12 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.d.ts +16 -0
- package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js +25 -0
- package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +4 -4
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +20 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +22 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +23 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +12 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +16 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +10 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.js +23 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +27 -2
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +48 -0
- 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/MoreDrawer.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +36 -0
- 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/MoreDrawer.styles.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -0
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-B2zHVkUS.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallWithChatAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/adjacent-overload-signatures */\n\nimport {\n CallIdChangedListener,\n DisplayNameChangedListener,\n IsMutedChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsSpeakingChangedListener,\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n CallEndedListener\n} from '../../CallComposite';\nimport {\n MessageDeletedListener,\n MessageEditedListener,\n MessageReadListener,\n MessageReceivedListener,\n MessageSentListener,\n ParticipantsAddedListener,\n ParticipantsRemovedListener\n} from '../../ChatComposite';\nimport { ResourceDetails } from '../../ChatComposite';\nimport { CallWithChatAdapterState } from '../state/CallWithChatAdapterState';\nimport type { AdapterError, AdapterState, Disposable } from '../../common/adapters';\nimport {\n AudioDeviceInfo,\n Call,\n DeviceAccess,\n PermissionConstraints,\n PropertyChangedEvent,\n StartCallOptions,\n VideoDeviceInfo\n} from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { BreakoutRoomsUpdatedListener } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeStreamViewResult, TogetherModeStreamOptions } from '@internal/react-components';\nimport { SendMessageOptions } from '@azure/communication-chat';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { UploadChatImageResult } from '@internal/acs-ui-common';\nimport {\n JoinCallOptions,\n StartCaptionsAdapterOptions,\n StopCaptionsAdapterOptions\n} from '../../CallComposite/adapter/CallAdapter';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { MessageOptions } from '@internal/acs-ui-common';\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { UnknownIdentifier, MicrosoftTeamsAppIdentifier } from '@azure/communication-common';\nimport { CommunicationUserIdentifier } from '@azure/communication-common';\nimport { MicrosoftTeamsUserIdentifier } from '@azure/communication-common';\nimport { CommunicationIdentifier } from '@azure/communication-common';\nimport {\n CaptionsReceivedListener,\n IsCaptionsActiveChangedListener,\n IsCaptionLanguageChangedListener,\n IsSpokenLanguageChangedListener\n} from '../../CallComposite/adapter/CallAdapter';\n\nimport { CapabilitiesChangedListener } from '../../CallComposite/adapter/CallAdapter';\nimport { SpotlightChangedListener } from '../../CallComposite/adapter/CallAdapter';\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\n\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/**\n * Functionality for managing the current call with chat.\n * @public\n */\nexport interface CallWithChatAdapterManagement {\n // CallWithChat-specific Interface methods\n /**\n * Remove a participant from a Call.\n *\n * @param userId - UserId of the participant to remove.\n *\n * @public\n */\n removeParticipant(userId: string): Promise<void>;\n /**\n * Remove a participant from the call.\n * @param participant - {@link @azure/communication-common#CommunicationIdentifier} of the participant to be removed\n * @public\n */\n removeParticipant(participant: CommunicationIdentifier): Promise<void>;\n\n // Call Interface Methods\n /**\n * Join the call with microphone initially on/off.\n * @deprecated Use joinCall(options?:JoinCallOptions) instead.\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Join the call with options bag to set microphone/camera initial state when joining call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @param options - param to set microphone/camera initially on/off/use precall state.\n *\n * @public\n */\n joinCall(options?: JoinCallOptions): Call | undefined;\n /**\n * Leave the call.\n *\n * @param forEveryone - Whether to remove all participants when leaving\n *\n * @public\n */\n leaveCall(forEveryone?: boolean): Promise<void>;\n /**\n * Start the camera.\n *\n * This method will start rendering a local camera view when the call is not active.\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n startCamera(options?: VideoStreamOptions): Promise<void>;\n /**\n * Stop the camera.\n *\n * This method will stop rendering a local camera view when the call is not active.\n *\n * @public\n */\n stopCamera(): Promise<void>;\n /**\n * Mute the current user during the call or disable microphone locally.\n *\n * @public\n */\n mute(): Promise<void>;\n /**\n * Unmute the current user during the call or enable microphone locally.\n *\n * @public\n */\n unmute(): Promise<void>;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @public\n */\n startCall(\n participants: (\n | MicrosoftTeamsAppIdentifier\n | PhoneNumberIdentifier\n | CommunicationUserIdentifier\n | MicrosoftTeamsUserIdentifier\n | UnknownIdentifier\n )[],\n options?: StartCallOptions\n ): Call | undefined;\n /**\n * Start sharing the screen during a call.\n *\n * @public\n */\n startScreenShare(): Promise<void>;\n /**\n * Stop sharing the screen.\n *\n * @public\n */\n stopScreenShare(): Promise<void>;\n /**\n * Raise hand for local user.\n *\n * @public\n */\n raiseHand(): Promise<void>;\n /**\n * Lower hand for local user.\n *\n * @public\n */\n lowerHand(): Promise<void>;\n /**\n * Send Reaction to ongoing meeting.\n * @param reaction - A value of type {@link @azure/communication-calling#Reaction}\n *\n * @public\n */\n onReactionClick(reaction: Reaction): Promise<void>;\n /**\n * Create the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite.\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;\n /**\n * Dispose the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite.\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;\n /* @conditional-compile-remove(together-mode) */\n /**\n * Create the html view for a togethermode stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @beta\n */\n createTogetherModeStreamView(options?: TogetherModeStreamOptions): Promise<void | TogetherModeStreamViewResult>;\n /* @conditional-compile-remove(together-mode) */\n /**\n * Start together mode.\n *\n * @remarks\n * This method is implemented for composite\n *\n *\n * @beta\n */\n startTogetherMode(): Promise<void>;\n /* @conditional-compile-remove(together-mode) */\n /**\n * Recalculate the seating positions for together mode.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param width - Width of the container\n * @param height - Height of the container\n *\n * @beta\n */\n setTogetherModeSceneSize(width: number, height: number): void;\n\n /* @conditional-compile-remove(together-mode) */\n /**\n * Dispose the html view for a togethermode stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @beta\n */\n disposeTogetherModeStreamView(): Promise<void>;\n /**\n * Dispose the html view for a screen share stream\n *\n * @remarks\n * this method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to dispose the screen share stream view for.\n *\n * @public\n */\n disposeScreenShareStreamView(remoteUserId: string): Promise<void>;\n /**\n * Dispose the html view for a remote video stream\n *\n * @param remoteUserId - Id of the participant to dispose\n *\n * @public\n */\n disposeRemoteVideoStreamView(remoteUserId: string): Promise<void>;\n /**\n * Dispose the html view for a local video stream\n *\n * @public\n */\n disposeLocalVideoStreamView(): Promise<void>;\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet.\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @public\n */\n askDevicePermission(constrain: PermissionConstraints): Promise<DeviceAccess>;\n /**\n * Query for available camera devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }\n *\n * @public\n */\n queryCameras(): Promise<VideoDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n queryMicrophones(): Promise<AudioDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n querySpeakers(): Promise<AudioDeviceInfo[]>;\n /**\n * Set the camera to use in the call.\n *\n * @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }\n * @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>;\n /**\n * Set the microphone to use in the call.\n *\n * @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }\n *\n * @public\n */\n setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>;\n /**\n * Set the speaker to use in the call.\n *\n * @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }\n *\n * @public\n */\n setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>;\n\n // Chat Interface Methods\n /**\n * Fetch initial state for the Chat adapter.\n *\n * Performs the minimal fetch necessary for ChatComposite and API methods.\n *\n * @public\n */\n fetchInitialData(): Promise<void>;\n /**\n * Send a message in the thread.\n *\n * @public\n */\n sendMessage(\n content: string,\n options?: SendMessageOptions | /* @conditional-compile-remove(file-sharing-acs) */ MessageOptions\n ): Promise<void>;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n /**\n * Upload an inline image for a message.\n *\n * @beta\n */\n uploadImage(image: Blob, imageFilename: string): Promise<UploadChatImageResult>;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n /**\n * Delete an inline image for a message.\n *\n * @beta\n */\n deleteImage(imageId: string): Promise<void>;\n /**\n * Send a read receipt for a message.\n *\n * @public\n */\n sendReadReceipt(chatMessageId: string): Promise<void>;\n /**\n * Send typing indicator in the thread.\n *\n * @public\n */\n sendTypingIndicator(): Promise<void>;\n /**\n * Update a message content.\n *\n * @public\n */\n updateMessage(\n messageId: string,\n content: string,\n options?: Record<string, string> | /* @conditional-compile-remove(file-sharing-acs) */ MessageOptions\n ): Promise<void>;\n /**\n * Delete a message in the thread.\n *\n * @public\n */\n deleteMessage(messageId: string): Promise<void>;\n /**\n * Load more previous messages in the chat thread history.\n *\n * @remarks\n * This method is usually used to control incremental fetch/infinite scroll.\n *\n * @public\n */\n loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;\n /** @public */\n downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void>;\n /** @public */\n removeResourceFromCache(resourceDetails: ResourceDetails): void;\n /**\n * Puts the Call in a Localhold.\n *\n * @public\n */\n holdCall(): Promise<void>;\n /**\n * Resumes the call from a LocalHold state.\n *\n * @public\n */\n resumeCall(): Promise<void>;\n /**\n * Adds a new Participant to the call.\n *\n * @public\n */\n addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /**\n * send dtmf tone to another participant in the call in 1:1 calls\n *\n * @public\n */\n sendDtmfTone: (dtmfTone: DtmfTone) => Promise<void>;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Continues into a call when the browser version is not supported.\n */\n allowUnsupportedBrowserVersion(): void;\n /**\n * Function to Start captions\n * @param options - options for start captions\n */\n startCaptions(options?: StartCaptionsAdapterOptions): Promise<void>;\n /**\n * Function to set caption language\n * @param language - language set for caption\n */\n setCaptionLanguage(language: string): Promise<void>;\n /**\n * Function to set spoken language\n * @param language - spoken language\n */\n setSpokenLanguage(language: string): Promise<void>;\n /**\n * Funtion to stop captions\n */\n stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void>;\n /**\n * Start the video background effect.\n *\n * @public\n */\n startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void>;\n /**\n * Stop the video background effect.\n *\n * @public\n */\n stopVideoBackgroundEffects(): Promise<void>;\n /**\n * Override the background picker images for background replacement effect.\n *\n * @param backgroundImages - Array of custom background images.\n *\n * @public\n */\n updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;\n /**\n * Update the selected video background effect\n *\n * @public\n */\n updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void;\n /**\n * Start the noise suppression effect.\n */\n startNoiseSuppressionEffect(): Promise<void>;\n /**\n * Start the noise suppression effect.\n */\n stopNoiseSuppressionEffect(): Promise<void>;\n /**\n * Send the end of call survey result\n *\n * @public\n */\n submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined>;\n /**\n * Start spotlight\n */\n startSpotlight(userIds?: string[]): Promise<void>;\n /**\n * Stop spotlight\n */\n stopSpotlight(userIds?: string[]): Promise<void>;\n /**\n * Stop all spotlights\n */\n stopAllSpotlight(): Promise<void>;\n /**\n * Mute a participant\n */\n muteParticipant(userId: string): Promise<void>;\n /**\n * Mute a participant\n */\n muteAllRemoteParticipants(): Promise<void>;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Return to origin call of breakout room\n */\n returnFromBreakoutRoom(): Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /**\n * forbids audio for the specified user ids.\n */\n forbidAudio: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** permits audio for the specified user ids. */\n permitAudio: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** forbids audio for Teams meeting attendees except the local user. */\n forbidOthersAudio: () => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** permits audio for Teams meeting attendees except the local user. */\n permitOthersAudio: () => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** forbids video for the specified user ids. */\n forbidVideo: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** permits video for the specified user ids. */\n permitVideo: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** forbids video for Teams meeting attendees except the local user. */\n forbidOthersVideo: () => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** permits video for Teams meeting attendees except the local user. */\n permitOthersVideo: () => Promise<void>;\n}\n\n/**\n * Call and Chat events that can be subscribed to in the {@link CallWithChatAdapter}.\n * @public\n */\nexport interface CallWithChatAdapterSubscriptions {\n // Call subscriptions\n on(event: 'callEnded', listener: CallEndedListener): void;\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n on(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;\n on(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n on(event: 'callError', listener: (e: AdapterError) => void): void;\n on(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n on(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n on(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;\n on(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;\n on(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;\n on(event: 'spotlightChanged', listener: SpotlightChangedListener): void;\n /* @conditional-compile-remove(breakout-rooms) */\n on(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;\n off(event: 'callEnded', listener: CallEndedListener): void;\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n off(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;\n off(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n off(event: 'callError', listener: (e: AdapterError) => void): void;\n off(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n off(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n off(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;\n off(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;\n off(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;\n off(event: 'spotlightChanged', listener: SpotlightChangedListener): void;\n /* @conditional-compile-remove(breakout-rooms) */\n off(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;\n\n // Chat subscriptions\n on(event: 'messageReceived', listener: MessageReceivedListener): void;\n on(event: 'messageEdited', listener: MessageEditedListener): void;\n on(event: 'messageDeleted', listener: MessageDeletedListener): void;\n on(event: 'messageSent', listener: MessageSentListener): void;\n on(event: 'messageRead', listener: MessageReadListener): void;\n on(event: 'chatParticipantsAdded', listener: ParticipantsAddedListener): void;\n on(event: 'chatParticipantsRemoved', listener: ParticipantsRemovedListener): void;\n on(event: 'chatError', listener: (e: AdapterError) => void): void;\n\n off(event: 'messageReceived', listener: MessageReceivedListener): void;\n off(event: 'messageEdited', listener: MessageEditedListener): void;\n off(event: 'messageDeleted', listener: MessageDeletedListener): void;\n off(event: 'messageSent', listener: MessageSentListener): void;\n off(event: 'messageRead', listener: MessageReadListener): void;\n off(event: 'chatParticipantsAdded', listener: ParticipantsAddedListener): void;\n off(event: 'chatParticipantsRemoved', listener: ParticipantsRemovedListener): void;\n off(event: 'chatError', listener: (e: AdapterError) => void): void;\n\n // CallWithChat subscriptions\n on(event: 'chatInitialized', listener: ChatInitializedListener): void;\n off(event: 'chatInitialized', listener: ChatInitializedListener): void;\n}\n\n/**\n * Callback for {@link CallWithChatAdapterSubscribers} 'chatInitialized' event.\n *\n * @public\n */\nexport type ChatInitializedListener = (event: { adapter: CallWithChatAdapter }) => void;\n\n/**\n * {@link CallWithChatComposite} Adapter interface.\n *\n * @public\n */\nexport interface CallWithChatAdapter\n extends CallWithChatAdapterManagement,\n AdapterState<CallWithChatAdapterState>,\n Disposable,\n CallWithChatAdapterSubscriptions {}\n\n/**\n * Events fired off by the {@link CallWithChatAdapter}.\n *\n * @public\n */\nexport type CallWithChatEvent =\n | 'callError'\n | 'chatError'\n | 'callEnded'\n | 'isMutedChanged'\n | 'callIdChanged'\n | 'isLocalScreenSharingActiveChanged'\n | 'displayNameChanged'\n | 'isSpeakingChanged'\n | 'callParticipantsJoined'\n | 'callParticipantsLeft'\n | 'selectedMicrophoneChanged'\n | 'selectedSpeakerChanged'\n | 'isCaptionsActiveChanged'\n | 'captionsReceived'\n | 'isCaptionLanguageChanged'\n | 'isSpokenLanguageChanged'\n | 'capabilitiesChanged'\n | 'spotlightChanged'\n | /* @conditional-compile-remove(breakout-rooms) */ 'breakoutRoomsUpdated'\n | 'messageReceived'\n | 'messageEdited'\n | 'messageDeleted'\n | 'messageSent'\n | 'messageRead'\n | 'chatParticipantsAdded'\n | 'chatParticipantsRemoved'\n | 'chatInitialized';\n"]}
|
1
|
+
{"version":3,"file":"CallWithChatAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/adjacent-overload-signatures */\n\nimport {\n CallIdChangedListener,\n DisplayNameChangedListener,\n IsMutedChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsSpeakingChangedListener,\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n CallEndedListener\n} from '../../CallComposite';\n/* @conditional-compile-remove(rtt) */\nimport { RealTimeTextReceivedListener } from '../../CallComposite/adapter/CallAdapter';\nimport {\n MessageDeletedListener,\n MessageEditedListener,\n MessageReadListener,\n MessageReceivedListener,\n MessageSentListener,\n ParticipantsAddedListener,\n ParticipantsRemovedListener\n} from '../../ChatComposite';\nimport { ResourceDetails } from '../../ChatComposite';\nimport { CallWithChatAdapterState } from '../state/CallWithChatAdapterState';\nimport type { AdapterError, AdapterState, Disposable } from '../../common/adapters';\nimport {\n AudioDeviceInfo,\n Call,\n DeviceAccess,\n PermissionConstraints,\n PropertyChangedEvent,\n StartCallOptions,\n VideoDeviceInfo\n} from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { BreakoutRoomsUpdatedListener } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeStreamViewResult, TogetherModeStreamOptions } from '@internal/react-components';\nimport { SendMessageOptions } from '@azure/communication-chat';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { UploadChatImageResult } from '@internal/acs-ui-common';\nimport {\n JoinCallOptions,\n StartCaptionsAdapterOptions,\n StopCaptionsAdapterOptions\n} from '../../CallComposite/adapter/CallAdapter';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { MessageOptions } from '@internal/acs-ui-common';\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\nimport { UnknownIdentifier, MicrosoftTeamsAppIdentifier } from '@azure/communication-common';\nimport { CommunicationUserIdentifier } from '@azure/communication-common';\nimport { MicrosoftTeamsUserIdentifier } from '@azure/communication-common';\nimport { CommunicationIdentifier } from '@azure/communication-common';\nimport {\n CaptionsReceivedListener,\n IsCaptionsActiveChangedListener,\n IsCaptionLanguageChangedListener,\n IsSpokenLanguageChangedListener\n} from '../../CallComposite/adapter/CallAdapter';\n\nimport { CapabilitiesChangedListener } from '../../CallComposite/adapter/CallAdapter';\nimport { SpotlightChangedListener } from '../../CallComposite/adapter/CallAdapter';\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\n\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/**\n * Functionality for managing the current call with chat.\n * @public\n */\nexport interface CallWithChatAdapterManagement {\n // CallWithChat-specific Interface methods\n /**\n * Remove a participant from a Call.\n *\n * @param userId - UserId of the participant to remove.\n *\n * @public\n */\n removeParticipant(userId: string): Promise<void>;\n /**\n * Remove a participant from the call.\n * @param participant - {@link @azure/communication-common#CommunicationIdentifier} of the participant to be removed\n * @public\n */\n removeParticipant(participant: CommunicationIdentifier): Promise<void>;\n\n // Call Interface Methods\n /**\n * Join the call with microphone initially on/off.\n * @deprecated Use joinCall(options?:JoinCallOptions) instead.\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Join the call with options bag to set microphone/camera initial state when joining call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @param options - param to set microphone/camera initially on/off/use precall state.\n *\n * @public\n */\n joinCall(options?: JoinCallOptions): Call | undefined;\n /**\n * Leave the call.\n *\n * @param forEveryone - Whether to remove all participants when leaving\n *\n * @public\n */\n leaveCall(forEveryone?: boolean): Promise<void>;\n /**\n * Start the camera.\n *\n * This method will start rendering a local camera view when the call is not active.\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n startCamera(options?: VideoStreamOptions): Promise<void>;\n /**\n * Stop the camera.\n *\n * This method will stop rendering a local camera view when the call is not active.\n *\n * @public\n */\n stopCamera(): Promise<void>;\n /**\n * Mute the current user during the call or disable microphone locally.\n *\n * @public\n */\n mute(): Promise<void>;\n /**\n * Unmute the current user during the call or enable microphone locally.\n *\n * @public\n */\n unmute(): Promise<void>;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @public\n */\n startCall(\n participants: (\n | MicrosoftTeamsAppIdentifier\n | PhoneNumberIdentifier\n | CommunicationUserIdentifier\n | MicrosoftTeamsUserIdentifier\n | UnknownIdentifier\n )[],\n options?: StartCallOptions\n ): Call | undefined;\n /**\n * Start sharing the screen during a call.\n *\n * @public\n */\n startScreenShare(): Promise<void>;\n /**\n * Stop sharing the screen.\n *\n * @public\n */\n stopScreenShare(): Promise<void>;\n /**\n * Raise hand for local user.\n *\n * @public\n */\n raiseHand(): Promise<void>;\n /**\n * Lower hand for local user.\n *\n * @public\n */\n lowerHand(): Promise<void>;\n /**\n * Send Reaction to ongoing meeting.\n * @param reaction - A value of type {@link @azure/communication-calling#Reaction}\n *\n * @public\n */\n onReactionClick(reaction: Reaction): Promise<void>;\n /**\n * Create the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite.\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;\n /**\n * Dispose the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite.\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;\n /* @conditional-compile-remove(together-mode) */\n /**\n * Create the html view for a togethermode stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @beta\n */\n createTogetherModeStreamView(options?: TogetherModeStreamOptions): Promise<void | TogetherModeStreamViewResult>;\n /* @conditional-compile-remove(together-mode) */\n /**\n * Start together mode.\n *\n * @remarks\n * This method is implemented for composite\n *\n *\n * @beta\n */\n startTogetherMode(): Promise<void>;\n /* @conditional-compile-remove(together-mode) */\n /**\n * Recalculate the seating positions for together mode.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param width - Width of the container\n * @param height - Height of the container\n *\n * @beta\n */\n setTogetherModeSceneSize(width: number, height: number): void;\n\n /* @conditional-compile-remove(together-mode) */\n /**\n * Dispose the html view for a togethermode stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @beta\n */\n disposeTogetherModeStreamView(): Promise<void>;\n /**\n * Dispose the html view for a screen share stream\n *\n * @remarks\n * this method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to dispose the screen share stream view for.\n *\n * @public\n */\n disposeScreenShareStreamView(remoteUserId: string): Promise<void>;\n /**\n * Dispose the html view for a remote video stream\n *\n * @param remoteUserId - Id of the participant to dispose\n *\n * @public\n */\n disposeRemoteVideoStreamView(remoteUserId: string): Promise<void>;\n /**\n * Dispose the html view for a local video stream\n *\n * @public\n */\n disposeLocalVideoStreamView(): Promise<void>;\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet.\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @public\n */\n askDevicePermission(constrain: PermissionConstraints): Promise<DeviceAccess>;\n /**\n * Query for available camera devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }\n *\n * @public\n */\n queryCameras(): Promise<VideoDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n queryMicrophones(): Promise<AudioDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n querySpeakers(): Promise<AudioDeviceInfo[]>;\n /**\n * Set the camera to use in the call.\n *\n * @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }\n * @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>;\n /**\n * Set the microphone to use in the call.\n *\n * @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }\n *\n * @public\n */\n setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>;\n /**\n * Set the speaker to use in the call.\n *\n * @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }\n *\n * @public\n */\n setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>;\n\n // Chat Interface Methods\n /**\n * Fetch initial state for the Chat adapter.\n *\n * Performs the minimal fetch necessary for ChatComposite and API methods.\n *\n * @public\n */\n fetchInitialData(): Promise<void>;\n /**\n * Send a message in the thread.\n *\n * @public\n */\n sendMessage(\n content: string,\n options?: SendMessageOptions | /* @conditional-compile-remove(file-sharing-acs) */ MessageOptions\n ): Promise<void>;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n /**\n * Upload an inline image for a message.\n *\n * @beta\n */\n uploadImage(image: Blob, imageFilename: string): Promise<UploadChatImageResult>;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n /**\n * Delete an inline image for a message.\n *\n * @beta\n */\n deleteImage(imageId: string): Promise<void>;\n /**\n * Send a read receipt for a message.\n *\n * @public\n */\n sendReadReceipt(chatMessageId: string): Promise<void>;\n /**\n * Send typing indicator in the thread.\n *\n * @public\n */\n sendTypingIndicator(): Promise<void>;\n /**\n * Update a message content.\n *\n * @public\n */\n updateMessage(\n messageId: string,\n content: string,\n options?: Record<string, string> | /* @conditional-compile-remove(file-sharing-acs) */ MessageOptions\n ): Promise<void>;\n /**\n * Delete a message in the thread.\n *\n * @public\n */\n deleteMessage(messageId: string): Promise<void>;\n /**\n * Load more previous messages in the chat thread history.\n *\n * @remarks\n * This method is usually used to control incremental fetch/infinite scroll.\n *\n * @public\n */\n loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;\n /** @public */\n downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void>;\n /** @public */\n removeResourceFromCache(resourceDetails: ResourceDetails): void;\n /**\n * Puts the Call in a Localhold.\n *\n * @public\n */\n holdCall(): Promise<void>;\n /**\n * Resumes the call from a LocalHold state.\n *\n * @public\n */\n resumeCall(): Promise<void>;\n /**\n * Adds a new Participant to the call.\n *\n * @public\n */\n addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /**\n * send dtmf tone to another participant in the call in 1:1 calls\n *\n * @public\n */\n sendDtmfTone: (dtmfTone: DtmfTone) => Promise<void>;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Continues into a call when the browser version is not supported.\n */\n allowUnsupportedBrowserVersion(): void;\n /**\n * Function to Start captions\n * @param options - options for start captions\n */\n startCaptions(options?: StartCaptionsAdapterOptions): Promise<void>;\n /**\n * Function to set caption language\n * @param language - language set for caption\n */\n setCaptionLanguage(language: string): Promise<void>;\n /**\n * Function to set spoken language\n * @param language - spoken language\n */\n setSpokenLanguage(language: string): Promise<void>;\n /**\n * Funtion to stop captions\n */\n stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void>;\n /**\n * Start the video background effect.\n *\n * @public\n */\n startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void>;\n /**\n * Stop the video background effect.\n *\n * @public\n */\n stopVideoBackgroundEffects(): Promise<void>;\n /**\n * Override the background picker images for background replacement effect.\n *\n * @param backgroundImages - Array of custom background images.\n *\n * @public\n */\n updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;\n /**\n * Update the selected video background effect\n *\n * @public\n */\n updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void;\n /**\n * Start the noise suppression effect.\n */\n startNoiseSuppressionEffect(): Promise<void>;\n /**\n * Start the noise suppression effect.\n */\n stopNoiseSuppressionEffect(): Promise<void>;\n /**\n * Send the end of call survey result\n *\n * @public\n */\n submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined>;\n /**\n * Start spotlight\n */\n startSpotlight(userIds?: string[]): Promise<void>;\n /**\n * Stop spotlight\n */\n stopSpotlight(userIds?: string[]): Promise<void>;\n /**\n * Stop all spotlights\n */\n stopAllSpotlight(): Promise<void>;\n /**\n * Mute a participant\n */\n muteParticipant(userId: string): Promise<void>;\n /**\n * Mute a participant\n */\n muteAllRemoteParticipants(): Promise<void>;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Return to origin call of breakout room\n */\n returnFromBreakoutRoom(): Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /**\n * forbids audio for the specified user ids.\n */\n forbidAudio: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** permits audio for the specified user ids. */\n permitAudio: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** forbids audio for Teams meeting attendees except the local user. */\n forbidOthersAudio: () => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** permits audio for Teams meeting attendees except the local user. */\n permitOthersAudio: () => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** forbids video for the specified user ids. */\n forbidVideo: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** permits video for the specified user ids. */\n permitVideo: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** forbids video for Teams meeting attendees except the local user. */\n forbidOthersVideo: () => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n /** permits video for Teams meeting attendees except the local user. */\n permitOthersVideo: () => Promise<void>;\n /* @conditional-compile-remove(rtt) */\n /**\n * Send real time text\n * @param text - real time text content\n * @param finalized - Boolean to indicate if the real time text is final\n */\n sendRealTimeText: (text: string, isFinalized: boolean) => Promise<void>;\n}\n\n/**\n * Call and Chat events that can be subscribed to in the {@link CallWithChatAdapter}.\n * @public\n */\nexport interface CallWithChatAdapterSubscriptions {\n // Call subscriptions\n on(event: 'callEnded', listener: CallEndedListener): void;\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n on(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;\n on(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n on(event: 'callError', listener: (e: AdapterError) => void): void;\n on(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n on(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n on(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;\n on(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;\n /* @conditional-compile-remove(rtt) */\n on(event: 'realTimeTextReceived', listener: RealTimeTextReceivedListener): void;\n on(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;\n on(event: 'spotlightChanged', listener: SpotlightChangedListener): void;\n /* @conditional-compile-remove(breakout-rooms) */\n on(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;\n off(event: 'callEnded', listener: CallEndedListener): void;\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n off(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;\n off(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n off(event: 'callError', listener: (e: AdapterError) => void): void;\n off(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n off(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n off(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;\n off(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;\n /* @conditional-compile-remove(rtt) */\n off(event: 'realTimeTextReceived', listener: RealTimeTextReceivedListener): void;\n off(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;\n off(event: 'spotlightChanged', listener: SpotlightChangedListener): void;\n /* @conditional-compile-remove(breakout-rooms) */\n off(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;\n\n // Chat subscriptions\n on(event: 'messageReceived', listener: MessageReceivedListener): void;\n on(event: 'messageEdited', listener: MessageEditedListener): void;\n on(event: 'messageDeleted', listener: MessageDeletedListener): void;\n on(event: 'messageSent', listener: MessageSentListener): void;\n on(event: 'messageRead', listener: MessageReadListener): void;\n on(event: 'chatParticipantsAdded', listener: ParticipantsAddedListener): void;\n on(event: 'chatParticipantsRemoved', listener: ParticipantsRemovedListener): void;\n on(event: 'chatError', listener: (e: AdapterError) => void): void;\n\n off(event: 'messageReceived', listener: MessageReceivedListener): void;\n off(event: 'messageEdited', listener: MessageEditedListener): void;\n off(event: 'messageDeleted', listener: MessageDeletedListener): void;\n off(event: 'messageSent', listener: MessageSentListener): void;\n off(event: 'messageRead', listener: MessageReadListener): void;\n off(event: 'chatParticipantsAdded', listener: ParticipantsAddedListener): void;\n off(event: 'chatParticipantsRemoved', listener: ParticipantsRemovedListener): void;\n off(event: 'chatError', listener: (e: AdapterError) => void): void;\n\n // CallWithChat subscriptions\n on(event: 'chatInitialized', listener: ChatInitializedListener): void;\n off(event: 'chatInitialized', listener: ChatInitializedListener): void;\n}\n\n/**\n * Callback for {@link CallWithChatAdapterSubscribers} 'chatInitialized' event.\n *\n * @public\n */\nexport type ChatInitializedListener = (event: { adapter: CallWithChatAdapter }) => void;\n\n/**\n * {@link CallWithChatComposite} Adapter interface.\n *\n * @public\n */\nexport interface CallWithChatAdapter\n extends CallWithChatAdapterManagement,\n AdapterState<CallWithChatAdapterState>,\n Disposable,\n CallWithChatAdapterSubscriptions {}\n\n/**\n * Events fired off by the {@link CallWithChatAdapter}.\n *\n * @public\n */\nexport type CallWithChatEvent =\n | 'callError'\n | 'chatError'\n | 'callEnded'\n | 'isMutedChanged'\n | 'callIdChanged'\n | 'isLocalScreenSharingActiveChanged'\n | 'displayNameChanged'\n | 'isSpeakingChanged'\n | 'callParticipantsJoined'\n | 'callParticipantsLeft'\n | 'selectedMicrophoneChanged'\n | 'selectedSpeakerChanged'\n | 'isCaptionsActiveChanged'\n | 'captionsReceived'\n | 'isCaptionLanguageChanged'\n | 'isSpokenLanguageChanged'\n | /* @conditional-compile-remove(rtt) */ 'realTimeTextReceived'\n | 'capabilitiesChanged'\n | 'spotlightChanged'\n | /* @conditional-compile-remove(breakout-rooms) */ 'breakoutRoomsUpdated'\n | 'messageReceived'\n | 'messageEdited'\n | 'messageDeleted'\n | 'messageSent'\n | 'messageRead'\n | 'chatParticipantsAdded'\n | 'chatParticipantsRemoved'\n | 'chatInitialized';\n"]}
|
@@ -65,6 +65,7 @@ export declare class CallWithChatBackedCallAdapter implements CallAdapter {
|
|
65
65
|
stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void>;
|
66
66
|
setCaptionLanguage(language: string): Promise<void>;
|
67
67
|
setSpokenLanguage(language: string): Promise<void>;
|
68
|
+
sendRealTimeText(text: string, isFinalized: boolean): Promise<void>;
|
68
69
|
startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void>;
|
69
70
|
stopVideoBackgroundEffects(): Promise<void>;
|
70
71
|
updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;
|
@@ -162,6 +162,12 @@ export class CallWithChatBackedCallAdapter {
|
|
162
162
|
yield this.callWithChatAdapter.setSpokenLanguage(language);
|
163
163
|
});
|
164
164
|
}
|
165
|
+
/* @conditional-compile-remove(rtt) */
|
166
|
+
sendRealTimeText(text, isFinalized) {
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
168
|
+
yield this.callWithChatAdapter.sendRealTimeText(text, isFinalized);
|
169
|
+
});
|
170
|
+
}
|
165
171
|
startVideoBackgroundEffect(videoBackgroundEffect) {
|
166
172
|
return __awaiter(this, void 0, void 0, function* () {
|
167
173
|
yield this.callWithChatAdapter.startVideoBackgroundEffect(videoBackgroundEffect);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallWithChatBackedCallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAqBlC,OAAO,EAA2B,uBAAuB,EAAyB,MAAM,6BAA6B,CAAC;AAEtH,OAAO,EAAE,0BAA0B,EAAE,yCAAgC;AASrE,uDAAuD;AACvD,sEAAsE;AAEtE;;;;GAIG;AACH,MAAM,OAAO,6BAA6B;IAOxC,YAAY,mBAAwC;QAJpD,gJAAgJ;QAChJ,iJAAiJ;QACzI,eAAU,GAAsF,IAAI,GAAG,EAAE,CAAC;QAM3G,OAAE,GAAG,CAA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wB,CAAC,WAAW;QACjD,cAAc,EAAE,wBAAwB,CAAC,cAAc;QACvD,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,wBAAwB,CAAC,gBAAgB;QACvD,iDAAiD;QACjD,mBAAmB,EAAE,wBAAwB,CAAC,uBAAuB;QACrE,iBAAiB,EAAE,wBAAwB,CAAC,iBAAiB;QAC7D,eAAe,EAAE,wBAAwB,CAAC,eAAe;QAEzD,qBAAqB,EAAE,wBAAwB,CAAC,qBAAqB;QAErE,8BAA8B,EAAE,wBAAwB,CAAC,8BAA8B;QACvF,uCAAuC,EAAE,wBAAwB,CAAC,uCAAuC;QACzG,+BAA+B,EAAE,wBAAwB,CAAC,+BAA+B;QACzF,8BAA8B,EAAE,wBAAwB,CAAC,8BAA8B;QACvF,6BAA6B,EAAE,wBAAwB,CAAC,6BAA6B;QACrF,SAAS,EAAE,wBAAwB,CAAC,SAAS;KAC9C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallWithChatAdapter } from './CallWithChatAdapter';\nimport { CallAdapter, CallAdapterState } from '../../CallComposite';\n\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeStreamViewResult } from '@internal/react-components';\nimport {\n AudioDeviceInfo,\n VideoDeviceInfo,\n Call,\n PermissionConstraints,\n StartCallOptions,\n DeviceAccess\n} from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { CallWithChatAdapterState } from '../state/CallWithChatAdapterState';\nimport { CommunicationIdentifier, isPhoneNumberIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';\nimport { CommunicationUserIdentifier } from '@azure/communication-common';\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n JoinCallOptions,\n StartCallIdentifier,\n StartCaptionsAdapterOptions,\n StopCaptionsAdapterOptions\n} from '../../CallComposite/adapter/CallAdapter';\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/**\n * Facade around the CallWithChatAdapter to satisfy the call adapter interface.\n *\n * @private\n */\nexport class CallWithChatBackedCallAdapter implements CallAdapter {\n private callWithChatAdapter: CallWithChatAdapter;\n\n // For onStateChange we must convert CallWithChat state to chat state. This involves creating a new handler to be passed into the onStateChange.\n // In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.\n private eventStore: Map<(state: CallAdapterState) => void, (state: CallWithChatAdapterState) => void> = new Map();\n\n constructor(callWithChatAdapter: CallWithChatAdapter) {\n this.callWithChatAdapter = callWithChatAdapter;\n }\n\n public on = (event: any, listener: any): void => {\n switch (event) {\n case 'error':\n return this.callWithChatAdapter.on('callError', listener);\n case 'participantsJoined':\n return this.callWithChatAdapter.on('callParticipantsJoined', listener);\n case 'participantsLeft':\n return this.callWithChatAdapter.on('callParticipantsLeft', listener);\n default:\n return this.callWithChatAdapter.on(event, listener);\n }\n };\n public off = (event: any, listener: any): void => {\n switch (event) {\n case 'error':\n return this.callWithChatAdapter.off('callError', listener);\n case 'participantsJoined':\n return this.callWithChatAdapter.off('callParticipantsJoined', listener);\n case 'participantsLeft':\n return this.callWithChatAdapter.off('callParticipantsLeft', listener);\n default:\n return this.callWithChatAdapter.off(event, listener);\n }\n };\n public onStateChange = (handler: (state: CallAdapterState) => void): void => {\n const convertedHandler = (state: CallWithChatAdapterState): void => {\n handler(callAdapterStateFromCallWithChatAdapterState(state));\n };\n this.callWithChatAdapter.onStateChange(convertedHandler);\n this.eventStore.set(handler, convertedHandler);\n };\n public offStateChange = (handler: (state: CallAdapterState) => void): void => {\n const convertedHandler = this.eventStore.get(handler);\n convertedHandler && this.callWithChatAdapter.offStateChange(convertedHandler);\n };\n public getState = (): CallAdapterState =>\n callAdapterStateFromCallWithChatAdapterState(this.callWithChatAdapter.getState());\n public dispose = (): void => this.callWithChatAdapter.dispose();\n public joinCall = (options?: boolean | JoinCallOptions): Call | undefined => {\n if (typeof options === 'boolean') {\n return this.callWithChatAdapter.joinCall(options);\n } else {\n return this.callWithChatAdapter.joinCall(options);\n }\n };\n public leaveCall = async (forEveryone?: boolean): Promise<void> =>\n await this.callWithChatAdapter.leaveCall(forEveryone);\n\n public startCall = (participants: (string | StartCallIdentifier)[], options: StartCallOptions): Call | undefined => {\n if (participants.every((participant: string | StartCallIdentifier) => typeof participant === 'string')) {\n return this.callWithChatAdapter.startCall(participants as string[], options);\n } else {\n return this.callWithChatAdapter.startCall(participants as StartCallIdentifier[], options);\n }\n };\n public setCamera = async (sourceId: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> =>\n await this.callWithChatAdapter.setCamera(sourceId, options);\n public setMicrophone = async (sourceId: AudioDeviceInfo): Promise<void> =>\n await this.callWithChatAdapter.setMicrophone(sourceId);\n public setSpeaker = async (sourceId: AudioDeviceInfo): Promise<void> =>\n await this.callWithChatAdapter.setSpeaker(sourceId);\n public askDevicePermission = async (constraints: PermissionConstraints): Promise<DeviceAccess> =>\n await this.callWithChatAdapter.askDevicePermission(constraints);\n public queryCameras = async (): Promise<VideoDeviceInfo[]> => await this.callWithChatAdapter.queryCameras();\n public queryMicrophones = async (): Promise<AudioDeviceInfo[]> => await this.callWithChatAdapter.queryMicrophones();\n public querySpeakers = async (): Promise<AudioDeviceInfo[]> => await this.callWithChatAdapter.querySpeakers();\n public startCamera = async (options?: VideoStreamOptions): Promise<void> =>\n await this.callWithChatAdapter.startCamera(options);\n public stopCamera = async (): Promise<void> => await this.callWithChatAdapter.stopCamera();\n public mute = async (): Promise<void> => await this.callWithChatAdapter.mute();\n public unmute = async (): Promise<void> => await this.callWithChatAdapter.unmute();\n public startScreenShare = async (): Promise<void> => await this.callWithChatAdapter.startScreenShare();\n public stopScreenShare = async (): Promise<void> => await this.callWithChatAdapter.stopScreenShare();\n public raiseHand = async (): Promise<void> => await this.callWithChatAdapter.raiseHand();\n public lowerHand = async (): Promise<void> => await this.callWithChatAdapter.lowerHand();\n public onReactionClick = async (reaction: Reaction): Promise<void> =>\n await this.callWithChatAdapter.onReactionClick(reaction);\n public removeParticipant = async (userId: string | CommunicationIdentifier): Promise<void> => {\n let participant = userId;\n participant = _toCommunicationIdentifier(userId);\n await this.callWithChatAdapter.removeParticipant(participant);\n };\n public createStreamView = async (\n remoteUserId?: string,\n options?: VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> =>\n await this.callWithChatAdapter.createStreamView(remoteUserId, options);\n /* @conditional-compile-remove(together-mode) */\n public createTogetherModeStreamView = async (\n options?: VideoStreamOptions\n ): Promise<void | TogetherModeStreamViewResult> =>\n await this.callWithChatAdapter.createTogetherModeStreamView(options);\n /* @conditional-compile-remove(together-mode) */\n public startTogetherMode = async (): Promise<void> => await this.callWithChatAdapter.startTogetherMode();\n /* @conditional-compile-remove(together-mode) */\n public setTogetherModeSceneSize = (width: number, height: number): void =>\n this.callWithChatAdapter.setTogetherModeSceneSize(width, height);\n public disposeStreamView = async (remoteUserId?: string, options?: VideoStreamOptions): Promise<void> =>\n await this.callWithChatAdapter.disposeStreamView(remoteUserId, options);\n public disposeScreenShareStreamView(remoteUserId: string): Promise<void> {\n return this.callWithChatAdapter.disposeScreenShareStreamView(remoteUserId);\n }\n public disposeRemoteVideoStreamView(remoteUserId: string): Promise<void> {\n return this.callWithChatAdapter.disposeRemoteVideoStreamView(remoteUserId);\n }\n public disposeLocalVideoStreamView(): Promise<void> {\n return this.callWithChatAdapter.disposeLocalVideoStreamView();\n }\n /* @conditional-compile-remove(together-mode) */\n public disposeTogetherModeStreamView = async (): Promise<void> =>\n await this.callWithChatAdapter.disposeTogetherModeStreamView();\n public holdCall = async (): Promise<void> => {\n await this.callWithChatAdapter.holdCall();\n };\n public resumeCall = async (): Promise<void> => {\n await this.callWithChatAdapter.resumeCall();\n };\n public async addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n public async addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n public async addParticipant(\n participant: PhoneNumberIdentifier | CommunicationUserIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> {\n if (isPhoneNumberIdentifier(participant) && options) {\n return this.callWithChatAdapter.addParticipant(participant as PhoneNumberIdentifier, options);\n } else {\n return this.callWithChatAdapter.addParticipant(participant as CommunicationUserIdentifier);\n }\n }\n\n /* @conditional-compile-remove(unsupported-browser) */\n public allowUnsupportedBrowserVersion(): void {\n return this.callWithChatAdapter.allowUnsupportedBrowserVersion();\n }\n\n public sendDtmfTone = async (dtmfTone: DtmfTone): Promise<void> => {\n await this.callWithChatAdapter.sendDtmfTone(dtmfTone);\n };\n\n public async startCaptions(options?: StartCaptionsAdapterOptions): Promise<void> {\n await this.callWithChatAdapter.startCaptions(options);\n }\n\n public async stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void> {\n await this.callWithChatAdapter.stopCaptions(options);\n }\n\n public async setCaptionLanguage(language: string): Promise<void> {\n await this.callWithChatAdapter.setCaptionLanguage(language);\n }\n\n public async setSpokenLanguage(language: string): Promise<void> {\n await this.callWithChatAdapter.setSpokenLanguage(language);\n }\n\n public async startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void> {\n await this.callWithChatAdapter.startVideoBackgroundEffect(videoBackgroundEffect);\n }\n\n public async stopVideoBackgroundEffects(): Promise<void> {\n await this.callWithChatAdapter.stopVideoBackgroundEffects();\n }\n\n public updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void {\n return this.callWithChatAdapter.updateBackgroundPickerImages(backgroundImages);\n }\n\n public updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void {\n return this.callWithChatAdapter.updateSelectedVideoBackgroundEffect(selectedVideoBackground);\n }\n\n public async startNoiseSuppressionEffect(): Promise<void> {\n return this.callWithChatAdapter.startNoiseSuppressionEffect();\n }\n\n public async stopNoiseSuppressionEffect(): Promise<void> {\n return this.callWithChatAdapter.stopNoiseSuppressionEffect();\n }\n\n public async submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined> {\n return this.callWithChatAdapter.submitSurvey(survey);\n }\n\n public async startSpotlight(userIds?: string[]): Promise<void> {\n return this.callWithChatAdapter.startSpotlight(userIds);\n }\n\n public async stopSpotlight(userIds?: string[]): Promise<void> {\n return this.callWithChatAdapter.stopSpotlight(userIds);\n }\n\n public async stopAllSpotlight(): Promise<void> {\n return this.callWithChatAdapter.stopAllSpotlight();\n }\n\n public async muteParticipant(userId: string): Promise<void> {\n return this.callWithChatAdapter.muteParticipant(userId);\n }\n\n public async muteAllRemoteParticipants(): Promise<void> {\n return this.callWithChatAdapter.muteAllRemoteParticipants();\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n public async returnFromBreakoutRoom(): Promise<void> {\n return this.callWithChatAdapter.returnFromBreakoutRoom();\n }\n\n /* @conditional-compile-remove(media-access) */\n public async forbidAudio(userIds: string[]): Promise<void> {\n return this.callWithChatAdapter.forbidAudio(userIds);\n }\n\n /* @conditional-compile-remove(media-access) */\n public async permitAudio(userIds: string[]): Promise<void> {\n return this.callWithChatAdapter.permitAudio(userIds);\n }\n\n /* @conditional-compile-remove(media-access) */\n public async forbidOthersAudio(): Promise<void> {\n return this.callWithChatAdapter.forbidOthersAudio();\n }\n\n /* @conditional-compile-remove(media-access) */\n public async permitOthersAudio(): Promise<void> {\n return this.callWithChatAdapter.permitOthersAudio();\n }\n\n /* @conditional-compile-remove(media-access) */\n public async forbidVideo(userIds: string[]): Promise<void> {\n return this.callWithChatAdapter.forbidAudio(userIds);\n }\n\n /* @conditional-compile-remove(media-access) */\n public async permitVideo(userIds: string[]): Promise<void> {\n return this.callWithChatAdapter.permitAudio(userIds);\n }\n\n /* @conditional-compile-remove(media-access) */\n public async forbidOthersVideo(): Promise<void> {\n return this.callWithChatAdapter.forbidOthersAudio();\n }\n\n /* @conditional-compile-remove(media-access) */\n public async permitOthersVideo(): Promise<void> {\n return this.callWithChatAdapter.permitOthersAudio();\n }\n}\n\nfunction callAdapterStateFromCallWithChatAdapterState(\n callWithChatAdapterState: CallWithChatAdapterState\n): CallAdapterState {\n return {\n isLocalPreviewMicrophoneEnabled: callWithChatAdapterState.isLocalPreviewMicrophoneEnabled,\n page: callWithChatAdapterState.page,\n userId: callWithChatAdapterState.userId,\n displayName: callWithChatAdapterState.displayName,\n call: callWithChatAdapterState.call,\n devices: callWithChatAdapterState.devices,\n isTeamsCall: callWithChatAdapterState.isTeamsCall,\n isTeamsMeeting: callWithChatAdapterState.isTeamsMeeting,\n isRoomsCall: false,\n latestErrors: callWithChatAdapterState.latestCallErrors,\n /* @conditional-compile-remove(breakout-rooms) */\n latestNotifications: callWithChatAdapterState.latestCallNotifications,\n alternateCallerId: callWithChatAdapterState.alternateCallerId,\n environmentInfo: callWithChatAdapterState.environmentInfo,\n\n videoBackgroundImages: callWithChatAdapterState.videoBackgroundImages,\n\n onResolveVideoEffectDependency: callWithChatAdapterState.onResolveVideoEffectDependency,\n onResolveDeepNoiseSuppressionDependency: callWithChatAdapterState.onResolveDeepNoiseSuppressionDependency,\n deepNoiseSuppressionOnByDefault: callWithChatAdapterState.deepNoiseSuppressionOnByDefault,\n hideDeepNoiseSuppressionButton: callWithChatAdapterState.hideDeepNoiseSuppressionButton,\n selectedVideoBackgroundEffect: callWithChatAdapterState.selectedVideoBackgroundEffect,\n reactions: callWithChatAdapterState.reactions\n };\n}\n"]}
|
1
|
+
{"version":3,"file":"CallWithChatBackedCallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAqBlC,OAAO,EAA2B,uBAAuB,EAAyB,MA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CAA+C;IAClC,iBAAiB;;YAC5B,OAAO,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,CAAC;QACtD,CAAC;KAAA;CACF;AAED,SAAS,4CAA4C,CACnD,wBAAkD;IAElD,OAAO;QACL,+BAA+B,EAAE,wBAAwB,CAAC,+BAA+B;QACzF,IAAI,EAAE,wBAAwB,CAAC,IAAI;QACnC,MAAM,EAAE,wBAAwB,CAAC,MAAM;QACvC,WAAW,EAAE,wBAAwB,CAAC,WAAW;QACjD,IAAI,EAAE,wBAAwB,CAAC,IAAI;QACnC,OAAO,EAAE,wBAAwB,CAAC,OAAO;QACzC,WAAW,EAAE,wBAAwB,CAAC,WAAW;QACjD,cAAc,EAAE,wBAAwB,CAAC,cAAc;QACvD,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,wBAAwB,CAAC,gBAAgB;QACvD,iDAAiD;QACjD,mBAAmB,EAAE,wBAAwB,CAAC,uBAAuB;QACrE,iBAAiB,EAAE,wBAAwB,CAAC,iBAAiB;QAC7D,eAAe,EAAE,wBAAwB,CAAC,eAAe;QAEzD,qBAAqB,EAAE,wBAAwB,CAAC,qBAAqB;QAErE,8BAA8B,EAAE,wBAAwB,CAAC,8BAA8B;QACvF,uCAAuC,EAAE,wBAAwB,CAAC,uCAAuC;QACzG,+BAA+B,EAAE,wBAAwB,CAAC,+BAA+B;QACzF,8BAA8B,EAAE,wBAAwB,CAAC,8BAA8B;QACvF,6BAA6B,EAAE,wBAAwB,CAAC,6BAA6B;QACrF,SAAS,EAAE,wBAAwB,CAAC,SAAS;KAC9C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallWithChatAdapter } from './CallWithChatAdapter';\nimport { CallAdapter, CallAdapterState } from '../../CallComposite';\n\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeStreamViewResult } from '@internal/react-components';\nimport {\n AudioDeviceInfo,\n VideoDeviceInfo,\n Call,\n PermissionConstraints,\n StartCallOptions,\n DeviceAccess\n} from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { CallWithChatAdapterState } from '../state/CallWithChatAdapterState';\nimport { CommunicationIdentifier, isPhoneNumberIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';\nimport { CommunicationUserIdentifier } from '@azure/communication-common';\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n JoinCallOptions,\n StartCallIdentifier,\n StartCaptionsAdapterOptions,\n StopCaptionsAdapterOptions\n} from '../../CallComposite/adapter/CallAdapter';\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/**\n * Facade around the CallWithChatAdapter to satisfy the call adapter interface.\n *\n * @private\n */\nexport class CallWithChatBackedCallAdapter implements CallAdapter {\n private callWithChatAdapter: CallWithChatAdapter;\n\n // For onStateChange we must convert CallWithChat state to chat state. This involves creating a new handler to be passed into the onStateChange.\n // In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.\n private eventStore: Map<(state: CallAdapterState) => void, (state: CallWithChatAdapterState) => void> = new Map();\n\n constructor(callWithChatAdapter: CallWithChatAdapter) {\n this.callWithChatAdapter = callWithChatAdapter;\n }\n\n public on = (event: any, listener: any): void => {\n switch (event) {\n case 'error':\n return this.callWithChatAdapter.on('callError', listener);\n case 'participantsJoined':\n return this.callWithChatAdapter.on('callParticipantsJoined', listener);\n case 'participantsLeft':\n return this.callWithChatAdapter.on('callParticipantsLeft', listener);\n default:\n return this.callWithChatAdapter.on(event, listener);\n }\n };\n public off = (event: any, listener: any): void => {\n switch (event) {\n case 'error':\n return this.callWithChatAdapter.off('callError', listener);\n case 'participantsJoined':\n return this.callWithChatAdapter.off('callParticipantsJoined', listener);\n case 'participantsLeft':\n return this.callWithChatAdapter.off('callParticipantsLeft', listener);\n default:\n return this.callWithChatAdapter.off(event, listener);\n }\n };\n public onStateChange = (handler: (state: CallAdapterState) => void): void => {\n const convertedHandler = (state: CallWithChatAdapterState): void => {\n handler(callAdapterStateFromCallWithChatAdapterState(state));\n };\n this.callWithChatAdapter.onStateChange(convertedHandler);\n this.eventStore.set(handler, convertedHandler);\n };\n public offStateChange = (handler: (state: CallAdapterState) => void): void => {\n const convertedHandler = this.eventStore.get(handler);\n convertedHandler && this.callWithChatAdapter.offStateChange(convertedHandler);\n };\n public getState = (): CallAdapterState =>\n callAdapterStateFromCallWithChatAdapterState(this.callWithChatAdapter.getState());\n public dispose = (): void => this.callWithChatAdapter.dispose();\n public joinCall = (options?: boolean | JoinCallOptions): Call | undefined => {\n if (typeof options === 'boolean') {\n return this.callWithChatAdapter.joinCall(options);\n } else {\n return this.callWithChatAdapter.joinCall(options);\n }\n };\n public leaveCall = async (forEveryone?: boolean): Promise<void> =>\n await this.callWithChatAdapter.leaveCall(forEveryone);\n\n public startCall = (participants: (string | StartCallIdentifier)[], options: StartCallOptions): Call | undefined => {\n if (participants.every((participant: string | StartCallIdentifier) => typeof participant === 'string')) {\n return this.callWithChatAdapter.startCall(participants as string[], options);\n } else {\n return this.callWithChatAdapter.startCall(participants as StartCallIdentifier[], options);\n }\n };\n public setCamera = async (sourceId: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> =>\n await this.callWithChatAdapter.setCamera(sourceId, options);\n public setMicrophone = async (sourceId: AudioDeviceInfo): Promise<void> =>\n await this.callWithChatAdapter.setMicrophone(sourceId);\n public setSpeaker = async (sourceId: AudioDeviceInfo): Promise<void> =>\n await this.callWithChatAdapter.setSpeaker(sourceId);\n public askDevicePermission = async (constraints: PermissionConstraints): Promise<DeviceAccess> =>\n await this.callWithChatAdapter.askDevicePermission(constraints);\n public queryCameras = async (): Promise<VideoDeviceInfo[]> => await this.callWithChatAdapter.queryCameras();\n public queryMicrophones = async (): Promise<AudioDeviceInfo[]> => await this.callWithChatAdapter.queryMicrophones();\n public querySpeakers = async (): Promise<AudioDeviceInfo[]> => await this.callWithChatAdapter.querySpeakers();\n public startCamera = async (options?: VideoStreamOptions): Promise<void> =>\n await this.callWithChatAdapter.startCamera(options);\n public stopCamera = async (): Promise<void> => await this.callWithChatAdapter.stopCamera();\n public mute = async (): Promise<void> => await this.callWithChatAdapter.mute();\n public unmute = async (): Promise<void> => await this.callWithChatAdapter.unmute();\n public startScreenShare = async (): Promise<void> => await this.callWithChatAdapter.startScreenShare();\n public stopScreenShare = async (): Promise<void> => await this.callWithChatAdapter.stopScreenShare();\n public raiseHand = async (): Promise<void> => await this.callWithChatAdapter.raiseHand();\n public lowerHand = async (): Promise<void> => await this.callWithChatAdapter.lowerHand();\n public onReactionClick = async (reaction: Reaction): Promise<void> =>\n await this.callWithChatAdapter.onReactionClick(reaction);\n public removeParticipant = async (userId: string | CommunicationIdentifier): Promise<void> => {\n let participant = userId;\n participant = _toCommunicationIdentifier(userId);\n await this.callWithChatAdapter.removeParticipant(participant);\n };\n public createStreamView = async (\n remoteUserId?: string,\n options?: VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> =>\n await this.callWithChatAdapter.createStreamView(remoteUserId, options);\n /* @conditional-compile-remove(together-mode) */\n public createTogetherModeStreamView = async (\n options?: VideoStreamOptions\n ): Promise<void | TogetherModeStreamViewResult> =>\n await this.callWithChatAdapter.createTogetherModeStreamView(options);\n /* @conditional-compile-remove(together-mode) */\n public startTogetherMode = async (): Promise<void> => await this.callWithChatAdapter.startTogetherMode();\n /* @conditional-compile-remove(together-mode) */\n public setTogetherModeSceneSize = (width: number, height: number): void =>\n this.callWithChatAdapter.setTogetherModeSceneSize(width, height);\n public disposeStreamView = async (remoteUserId?: string, options?: VideoStreamOptions): Promise<void> =>\n await this.callWithChatAdapter.disposeStreamView(remoteUserId, options);\n public disposeScreenShareStreamView(remoteUserId: string): Promise<void> {\n return this.callWithChatAdapter.disposeScreenShareStreamView(remoteUserId);\n }\n public disposeRemoteVideoStreamView(remoteUserId: string): Promise<void> {\n return this.callWithChatAdapter.disposeRemoteVideoStreamView(remoteUserId);\n }\n public disposeLocalVideoStreamView(): Promise<void> {\n return this.callWithChatAdapter.disposeLocalVideoStreamView();\n }\n /* @conditional-compile-remove(together-mode) */\n public disposeTogetherModeStreamView = async (): Promise<void> =>\n await this.callWithChatAdapter.disposeTogetherModeStreamView();\n public holdCall = async (): Promise<void> => {\n await this.callWithChatAdapter.holdCall();\n };\n public resumeCall = async (): Promise<void> => {\n await this.callWithChatAdapter.resumeCall();\n };\n public async addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n public async addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n public async addParticipant(\n participant: PhoneNumberIdentifier | CommunicationUserIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> {\n if (isPhoneNumberIdentifier(participant) && options) {\n return this.callWithChatAdapter.addParticipant(participant as PhoneNumberIdentifier, options);\n } else {\n return this.callWithChatAdapter.addParticipant(participant as CommunicationUserIdentifier);\n }\n }\n\n /* @conditional-compile-remove(unsupported-browser) */\n public allowUnsupportedBrowserVersion(): void {\n return this.callWithChatAdapter.allowUnsupportedBrowserVersion();\n }\n\n public sendDtmfTone = async (dtmfTone: DtmfTone): Promise<void> => {\n await this.callWithChatAdapter.sendDtmfTone(dtmfTone);\n };\n\n public async startCaptions(options?: StartCaptionsAdapterOptions): Promise<void> {\n await this.callWithChatAdapter.startCaptions(options);\n }\n\n public async stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void> {\n await this.callWithChatAdapter.stopCaptions(options);\n }\n\n public async setCaptionLanguage(language: string): Promise<void> {\n await this.callWithChatAdapter.setCaptionLanguage(language);\n }\n\n public async setSpokenLanguage(language: string): Promise<void> {\n await this.callWithChatAdapter.setSpokenLanguage(language);\n }\n /* @conditional-compile-remove(rtt) */\n public async sendRealTimeText(text: string, isFinalized: boolean): Promise<void> {\n await this.callWithChatAdapter.sendRealTimeText(text, isFinalized);\n }\n\n public async startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void> {\n await this.callWithChatAdapter.startVideoBackgroundEffect(videoBackgroundEffect);\n }\n\n public async stopVideoBackgroundEffects(): Promise<void> {\n await this.callWithChatAdapter.stopVideoBackgroundEffects();\n }\n\n public updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void {\n return this.callWithChatAdapter.updateBackgroundPickerImages(backgroundImages);\n }\n\n public updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void {\n return this.callWithChatAdapter.updateSelectedVideoBackgroundEffect(selectedVideoBackground);\n }\n\n public async startNoiseSuppressionEffect(): Promise<void> {\n return this.callWithChatAdapter.startNoiseSuppressionEffect();\n }\n\n public async stopNoiseSuppressionEffect(): Promise<void> {\n return this.callWithChatAdapter.stopNoiseSuppressionEffect();\n }\n\n public async submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined> {\n return this.callWithChatAdapter.submitSurvey(survey);\n }\n\n public async startSpotlight(userIds?: string[]): Promise<void> {\n return this.callWithChatAdapter.startSpotlight(userIds);\n }\n\n public async stopSpotlight(userIds?: string[]): Promise<void> {\n return this.callWithChatAdapter.stopSpotlight(userIds);\n }\n\n public async stopAllSpotlight(): Promise<void> {\n return this.callWithChatAdapter.stopAllSpotlight();\n }\n\n public async muteParticipant(userId: string): Promise<void> {\n return this.callWithChatAdapter.muteParticipant(userId);\n }\n\n public async muteAllRemoteParticipants(): Promise<void> {\n return this.callWithChatAdapter.muteAllRemoteParticipants();\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n public async returnFromBreakoutRoom(): Promise<void> {\n return this.callWithChatAdapter.returnFromBreakoutRoom();\n }\n\n /* @conditional-compile-remove(media-access) */\n public async forbidAudio(userIds: string[]): Promise<void> {\n return this.callWithChatAdapter.forbidAudio(userIds);\n }\n\n /* @conditional-compile-remove(media-access) */\n public async permitAudio(userIds: string[]): Promise<void> {\n return this.callWithChatAdapter.permitAudio(userIds);\n }\n\n /* @conditional-compile-remove(media-access) */\n public async forbidOthersAudio(): Promise<void> {\n return this.callWithChatAdapter.forbidOthersAudio();\n }\n\n /* @conditional-compile-remove(media-access) */\n public async permitOthersAudio(): Promise<void> {\n return this.callWithChatAdapter.permitOthersAudio();\n }\n\n /* @conditional-compile-remove(media-access) */\n public async forbidVideo(userIds: string[]): Promise<void> {\n return this.callWithChatAdapter.forbidAudio(userIds);\n }\n\n /* @conditional-compile-remove(media-access) */\n public async permitVideo(userIds: string[]): Promise<void> {\n return this.callWithChatAdapter.permitAudio(userIds);\n }\n\n /* @conditional-compile-remove(media-access) */\n public async forbidOthersVideo(): Promise<void> {\n return this.callWithChatAdapter.forbidOthersAudio();\n }\n\n /* @conditional-compile-remove(media-access) */\n public async permitOthersVideo(): Promise<void> {\n return this.callWithChatAdapter.permitOthersAudio();\n }\n}\n\nfunction callAdapterStateFromCallWithChatAdapterState(\n callWithChatAdapterState: CallWithChatAdapterState\n): CallAdapterState {\n return {\n isLocalPreviewMicrophoneEnabled: callWithChatAdapterState.isLocalPreviewMicrophoneEnabled,\n page: callWithChatAdapterState.page,\n userId: callWithChatAdapterState.userId,\n displayName: callWithChatAdapterState.displayName,\n call: callWithChatAdapterState.call,\n devices: callWithChatAdapterState.devices,\n isTeamsCall: callWithChatAdapterState.isTeamsCall,\n isTeamsMeeting: callWithChatAdapterState.isTeamsMeeting,\n isRoomsCall: false,\n latestErrors: callWithChatAdapterState.latestCallErrors,\n /* @conditional-compile-remove(breakout-rooms) */\n latestNotifications: callWithChatAdapterState.latestCallNotifications,\n alternateCallerId: callWithChatAdapterState.alternateCallerId,\n environmentInfo: callWithChatAdapterState.environmentInfo,\n\n videoBackgroundImages: callWithChatAdapterState.videoBackgroundImages,\n\n onResolveVideoEffectDependency: callWithChatAdapterState.onResolveVideoEffectDependency,\n onResolveDeepNoiseSuppressionDependency: callWithChatAdapterState.onResolveDeepNoiseSuppressionDependency,\n deepNoiseSuppressionOnByDefault: callWithChatAdapterState.deepNoiseSuppressionOnByDefault,\n hideDeepNoiseSuppressionButton: callWithChatAdapterState.hideDeepNoiseSuppressionButton,\n selectedVideoBackgroundEffect: callWithChatAdapterState.selectedVideoBackgroundEffect,\n reactions: callWithChatAdapterState.reactions\n };\n}\n"]}
|
@@ -11,5 +11,6 @@ export declare const CallingCaptionsBanner: (props: {
|
|
11
11
|
};
|
12
12
|
/** Element to return focus to when the Captions Banner is closed */
|
13
13
|
returnFocusRef?: React.RefObject<FocusableElement>;
|
14
|
+
isRealTimeTextOn?: boolean;
|
14
15
|
}) => JSX.Element;
|
15
16
|
//# sourceMappingURL=CallingCaptionsBanner.d.ts.map
|
@@ -75,7 +75,9 @@ export const CallingCaptionsBanner = (props) => {
|
|
75
75
|
React.createElement("div", { className: containerClassName, role: "region", "aria-label": strings.liveCaptionsLabel },
|
76
76
|
React.createElement(Stack, { horizontalAlign: "center" },
|
77
77
|
React.createElement(Stack.Item, { style: { width: props.isMobile ? mobileViewBannerWidth : desktopViewBannerWidth } },
|
78
|
-
React.createElement(CaptionsBanner, Object.assign({ captionsOptions: props.captionsOptions, onRenderAvatar: onRenderAvatar, formFactor: props.isMobile ? 'compact' : 'default', strings: captionsBannerStrings }, captionsBannerProps
|
78
|
+
React.createElement(CaptionsBanner, Object.assign({ captionsOptions: props.captionsOptions, onRenderAvatar: onRenderAvatar, formFactor: props.isMobile ? 'compact' : 'default', strings: captionsBannerStrings }, captionsBannerProps, {
|
79
|
+
/* @conditional-compile-remove(rtt) */
|
80
|
+
isRealTimeTextOn: props.isRealTimeTextOn || captionsBannerProps.isRealTimeTextOn })))),
|
79
81
|
!props.isMobile && captionsBannerProps.isCaptionsOn && (React.createElement("div", { className: floatingChildClassName },
|
80
82
|
React.createElement(CaptionsBannerMoreButton, { onCaptionsSettingsClick: onClickCaptionsSettings, returnFocusRef: props.returnFocusRef }))))));
|
81
83
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallingCaptionsBanner.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/CallingCaptionsBanner.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,cAAc,EAA8C,yCAAmC;AAExG,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAA6B,MAAM,iBAAiB,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAEpC,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,
|
1
|
+
{"version":3,"file":"CallingCaptionsBanner.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/CallingCaptionsBanner.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,cAAc,EAA8C,yCAAmC;AAExG,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAA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C,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAEnE,OAAO,CACL;QACG,sBAAsB,IAAI,CACzB,oBAAC,4BAA4B,IAC3B,yBAAyB,EAAE,sBAAsB,EACjD,yBAAyB,EAAE,yBAAyB,EACpD,qBAAqB,EAAE,KAAK,CAAC,gBAAgB,GAC7C,CACH;QAEC,6BAAK,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAC,QAAQ,gBAAa,OAAO,CAAC,iBAAiB;YACrF,oBAAC,KAAK,IAAC,eAAe,EAAC,QAAQ;gBAC7B,oBAAC,KAAK,CAAC,IAAI,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,sBAAsB,EAAE;oBAC3F,oBAAC,cAAc,kBACb,eAAe,EAAE,KAAK,CAAC,eAAe,EACtC,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAClD,OAAO,EAAE,qBAAqB,IAC1B,mBAAmB;wBACvB,sCAAsC;wBACtC,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,IAAI,mBAAmB,CAAC,gBAAgB,IAChF,CACS,CACP;YACP,CAAC,KAAK,CAAC,QAAQ,IAAI,mBAAmB,CAAC,YAAY,IAAI,CACtD,6BAAK,SAAS,EAAE,sBAAsB;gBACpC,oBAAC,wBAAwB,IACvB,uBAAuB,EAAE,uBAAuB,EAChD,cAAc,EAAE,KAAK,CAAC,cAAc,GACpC,CACE,CACP,CACG,CAEP,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { useState, useEffect, useCallback } from 'react';\nimport { CaptionsBanner, CaptionsBannerStrings, CustomAvatarOptions } from '@internal/react-components';\nimport { _DrawerMenu, _DrawerMenuItemProps, _DrawerSurface } from '@internal/react-components';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { CallingCaptionsSettingsModal } from './CallingCaptionsSettingsModal';\nimport { CaptionsBannerMoreButton } from './CaptionsBannerMoreButton';\nimport { useLocale } from '../localization';\nimport { AvatarPersona, AvatarPersonaDataCallback } from './AvatarPersona';\nimport { FocusableElement } from './types/FocusableElement';\nimport { usePropsFor } from '../CallComposite/hooks/usePropsFor';\n\nconst mobileViewBannerWidth = '90%';\n\n/** @private */\nexport const CallingCaptionsBanner = (props: {\n isMobile: boolean;\n useTeamsCaptions?: boolean;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n captionsOptions?: {\n height: 'full' | 'default';\n };\n /** Element to return focus to when the Captions Banner is closed */\n returnFocusRef?: React.RefObject<FocusableElement>;\n /* @conditional-compile-remove(rtt) */\n isRealTimeTextOn?: boolean;\n}): JSX.Element => {\n const captionsBannerProps = usePropsFor(CaptionsBanner);\n const [isCaptionsSettingsOpen, setIsCaptionsSettingsOpen] = useState<boolean>(false);\n\n const onClickCaptionsSettings = (): void => {\n setIsCaptionsSettingsOpen(true);\n };\n\n const onDismissCaptionsSettings = (): void => {\n setIsCaptionsSettingsOpen(false);\n };\n\n const containerClassName = mergeStyles(\n props.captionsOptions?.height === 'full'\n ? mergeStyles({\n position: 'absolute',\n height: '100%',\n width: '100%'\n })\n : { position: 'relative' }\n );\n\n const floatingChildClassName = mergeStyles({\n position: 'absolute',\n right: 0,\n top: 0\n });\n\n const strings = useLocale().strings.call;\n\n const captionsBannerStrings: CaptionsBannerStrings = {\n captionsBannerSpinnerText: strings.captionsBannerSpinnerText,\n /* @conditional-compile-remove(rtt) */\n realTimeTextInputBoxDefaultText: strings.realTimeTextInputBoxDefaultText,\n /* @conditional-compile-remove(rtt) */\n realTimeTextInputErrorMessage: strings.realTimeTextInputErrorMessage,\n /* @conditional-compile-remove(rtt) */\n realTimeTextBannerContent: strings.realTimeTextBannerContent,\n /* @conditional-compile-remove(rtt) */\n realTimeTextBannerTitle: strings.realTimeTextBannerTitle,\n /* @conditional-compile-remove(rtt) */\n realTimeTextBannerLinkLabel: strings.realTimeTextBannerLinkLabel,\n /* @conditional-compile-remove(rtt) */\n captionsOnlyContainerTitle: strings.captionsOnlyContainerTitle,\n /* @conditional-compile-remove(rtt) */\n realTimeTextOnlyContainerTitle: strings.realTimeTextOnlyContainerTitle,\n /* @conditional-compile-remove(rtt) */\n captionsAndRealTimeTextContainerTitle: strings.captionsAndRealTimeTextContainerTitle,\n /* @conditional-compile-remove(rtt) */\n expandButtonAriaLabel: strings.expandButtonAriaLabel,\n /* @conditional-compile-remove(rtt) */\n minimizeButtonAriaLabel: strings.minimizeButtonAriaLabel\n };\n\n const onRenderAvatar = useCallback(\n (userId?: string, options?: CustomAvatarOptions) => {\n return <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />;\n },\n [props.onFetchAvatarPersonaData]\n );\n\n const { innerWidth: width } = window;\n\n const [windowWidth, setWindowWidth] = useState(width);\n\n useEffect(() => {\n function handleResize(): void {\n setWindowWidth(window.innerWidth);\n }\n\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n\n const desktopViewBannerWidth = windowWidth > 620 ? '35rem' : '80%';\n\n return (\n <>\n {isCaptionsSettingsOpen && (\n <CallingCaptionsSettingsModal\n showCaptionsSettingsModal={isCaptionsSettingsOpen}\n onDismissCaptionsSettings={onDismissCaptionsSettings}\n changeCaptionLanguage={props.useTeamsCaptions}\n />\n )}\n {\n <div className={containerClassName} role=\"region\" aria-label={strings.liveCaptionsLabel}>\n <Stack horizontalAlign=\"center\">\n <Stack.Item style={{ width: props.isMobile ? mobileViewBannerWidth : desktopViewBannerWidth }}>\n <CaptionsBanner\n captionsOptions={props.captionsOptions}\n onRenderAvatar={onRenderAvatar}\n formFactor={props.isMobile ? 'compact' : 'default'}\n strings={captionsBannerStrings}\n {...captionsBannerProps}\n /* @conditional-compile-remove(rtt) */\n isRealTimeTextOn={props.isRealTimeTextOn || captionsBannerProps.isRealTimeTextOn}\n />\n </Stack.Item>\n </Stack>\n {!props.isMobile && captionsBannerProps.isCaptionsOn && (\n <div className={floatingChildClassName}>\n <CaptionsBannerMoreButton\n onCaptionsSettingsClick={onClickCaptionsSettings}\n returnFocusRef={props.returnFocusRef}\n />\n </div>\n )}\n </div>\n }\n </>\n );\n};\n"]}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
/** @private */
|
3
|
+
export declare const CallingRealTimeTextModal: (props: {
|
4
|
+
/** The flag to show the modal */
|
5
|
+
showModal?: boolean;
|
6
|
+
/** The function to dismiss the modal */
|
7
|
+
onDismissModal?: () => void;
|
8
|
+
/** The function to start RealTimeText */
|
9
|
+
onStartRealTimeText?: () => void;
|
10
|
+
}) => JSX.Element;
|
11
|
+
export {};
|
12
|
+
//# sourceMappingURL=CallingRealTimeTextModal.d.ts.map
|
@@ -0,0 +1,23 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
/* @conditional-compile-remove(rtt) */
|
4
|
+
import React from 'react';
|
5
|
+
/* @conditional-compile-remove(rtt) */
|
6
|
+
import { RealTimeTextModal } from "../../../../react-components/src";
|
7
|
+
/* @conditional-compile-remove(rtt) */
|
8
|
+
import { useLocale } from '../localization';
|
9
|
+
/* @conditional-compile-remove(rtt) */
|
10
|
+
/** @private */
|
11
|
+
export const CallingRealTimeTextModal = (props) => {
|
12
|
+
const strings = useLocale().strings.call;
|
13
|
+
const modalStrings = {
|
14
|
+
realTimeTextModalTitle: strings.realTimeTextModalTitle,
|
15
|
+
realTimeTextModalText: strings.realTimeTextModalText,
|
16
|
+
realTimeTextConfirmButtonLabel: strings.realTimeTextConfirmButtonLabel,
|
17
|
+
realTimeTextCancelButtonLabel: strings.realTimeTextCancelButtonLabel,
|
18
|
+
realTimeTextModalAriaLabel: strings.realTimeTextModalAriaLabel,
|
19
|
+
realTimeTextCloseModalButtonAriaLabel: strings.realTimeTextCloseModalButtonAriaLabel
|
20
|
+
};
|
21
|
+
return (React.createElement(RealTimeTextModal, { strings: modalStrings, showModal: props.showModal, onDismissModal: props.onDismissModal, onStartRealTimeText: props.onStartRealTimeText }));
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=CallingRealTimeTextModal.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CallingRealTimeTextModal.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/CallingRealTimeTextModal.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,sCAAsC;AACtC,OAAO,EAAE,iBAAiB,EAA4B,yCAAmC;AACzF,sCAAsC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,sCAAsC;AACtC,eAAe;AACf,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAOxC,EAAe,EAAE;IAChB,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACzC,MAAM,YAAY,GAA6B;QAC7C,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;QACtD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,8BAA8B,EAAE,OAAO,CAAC,8BAA8B;QACtE,6BAA6B,EAAE,OAAO,CAAC,6BAA6B;QACpE,0BAA0B,EAAE,OAAO,CAAC,0BAA0B;QAC9D,qCAAqC,EAAE,OAAO,CAAC,qCAAqC;KACrF,CAAC;IAEF,OAAO,CACL,oBAAC,iBAAiB,IAChB,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,GAC9C,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* @conditional-compile-remove(rtt) */\nimport React from 'react';\n/* @conditional-compile-remove(rtt) */\nimport { RealTimeTextModal, RealTimeTextModalStrings } from '@internal/react-components';\n/* @conditional-compile-remove(rtt) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(rtt) */\n/** @private */\nexport const CallingRealTimeTextModal = (props: {\n /** The flag to show the modal */\n showModal?: boolean;\n /** The function to dismiss the modal */\n onDismissModal?: () => void;\n /** The function to start RealTimeText */\n onStartRealTimeText?: () => void;\n}): JSX.Element => {\n const strings = useLocale().strings.call;\n const modalStrings: RealTimeTextModalStrings = {\n realTimeTextModalTitle: strings.realTimeTextModalTitle,\n realTimeTextModalText: strings.realTimeTextModalText,\n realTimeTextConfirmButtonLabel: strings.realTimeTextConfirmButtonLabel,\n realTimeTextCancelButtonLabel: strings.realTimeTextCancelButtonLabel,\n realTimeTextModalAriaLabel: strings.realTimeTextModalAriaLabel,\n realTimeTextCloseModalButtonAriaLabel: strings.realTimeTextCloseModalButtonAriaLabel\n };\n\n return (\n <RealTimeTextModal\n strings={modalStrings}\n showModal={props.showModal}\n onDismissModal={props.onDismissModal}\n onStartRealTimeText={props.onStartRealTimeText}\n />\n );\n};\n\nexport {};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts
CHANGED
@@ -22,6 +22,7 @@ export interface CommonCallControlBarProps {
|
|
22
22
|
onClickShowDialpad?: () => void;
|
23
23
|
onClickVideoEffects?: (showVideoEffects: boolean) => void;
|
24
24
|
isCaptionsSupported?: boolean;
|
25
|
+
isRealTimeTextSupported?: boolean;
|
25
26
|
isCaptionsOn?: boolean;
|
26
27
|
displayVertical?: boolean;
|
27
28
|
onUserSetOverflowGalleryPositionChange?: (position: 'Responsive' | 'horizontalTop') => void;
|
@@ -37,6 +38,8 @@ export interface CommonCallControlBarProps {
|
|
37
38
|
onToggleTeamsMeetingConferenceModal?: () => void;
|
38
39
|
teamsMeetingConferenceModalPresent?: boolean;
|
39
40
|
sidePaneDismissButtonRef?: RefObject<IButton>;
|
41
|
+
onStartRealTimeText?: () => void;
|
42
|
+
startRealTimeTextButtonChecked?: boolean;
|
40
43
|
}
|
41
44
|
/**
|
42
45
|
* @private
|
package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js
CHANGED
@@ -45,6 +45,8 @@ import { callStatusSelector } from '../../CallComposite/selectors/callStatusSele
|
|
45
45
|
import { MeetingConferencePhoneInfoModal } from "../../../../../react-components/src";
|
46
46
|
/* @conditional-compile-remove(breakout-rooms) */
|
47
47
|
import { Timer } from './Timer';
|
48
|
+
/* @conditional-compile-remove(rtt) */
|
49
|
+
import { CallingRealTimeTextModal } from '../CallingRealTimeTextModal';
|
48
50
|
const inferCommonCallControlOptions = (mobileView, commonCallControlOptions) => {
|
49
51
|
if (commonCallControlOptions === false) {
|
50
52
|
return false;
|
@@ -85,6 +87,8 @@ export const CommonCallControlBar = forwardRef((props, commonCallControlBarRef)
|
|
85
87
|
const callWithChatStrings = useCallWithChatCompositeStrings();
|
86
88
|
const options = inferCommonCallControlOptions(props.mobileView, props.callControls);
|
87
89
|
const [showCaptionsSettingsModal, setShowCaptionsSettingsModal] = useState(false);
|
90
|
+
/* @conditional-compile-remove(rtt) */
|
91
|
+
const [showRealTimeTextModal, setShowRealTimeTextModal] = useState(false);
|
88
92
|
// If the hangup capability is not present, we default to true
|
89
93
|
const isHangUpForEveryoneAllowed = (_a = useSelector((state) => { var _a, _b; return (_b = (_a = state.call) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities.hangUpForEveryOne.isPresent; })) !== null && _a !== void 0 ? _a : true;
|
90
94
|
const isTeams = useSelector(getIsTeamsCall);
|
@@ -121,6 +125,14 @@ export const CommonCallControlBar = forwardRef((props, commonCallControlBarRef)
|
|
121
125
|
const openCaptionsSettingsModal = useCallback(() => {
|
122
126
|
setShowCaptionsSettingsModal(true);
|
123
127
|
}, []);
|
128
|
+
/* @conditional-compile-remove(rtt) */
|
129
|
+
const openRealTimeTextModal = useCallback(() => {
|
130
|
+
setShowRealTimeTextModal(true);
|
131
|
+
}, []);
|
132
|
+
/* @conditional-compile-remove(rtt) */
|
133
|
+
const onDismissRealTimeTextModal = useCallback(() => {
|
134
|
+
setShowRealTimeTextModal(false);
|
135
|
+
}, []);
|
124
136
|
const onDismissCaptionsSettings = useCallback(() => {
|
125
137
|
setShowCaptionsSettingsModal(false);
|
126
138
|
}, []);
|
@@ -215,15 +227,22 @@ export const CommonCallControlBar = forwardRef((props, commonCallControlBarRef)
|
|
215
227
|
const cameraButtonIsEnabled = isEnabled(options === null || options === void 0 ? void 0 : options.cameraButton);
|
216
228
|
const showExitSpotlightButton = (options === null || options === void 0 ? void 0 : options.exitSpotlightButton) !== false;
|
217
229
|
const showCaptionsButton = props.isCaptionsSupported && isEnabled(options.captionsButton);
|
230
|
+
/* @conditional-compile-remove(rtt) */
|
231
|
+
const showRealTimeTextButton = props.isRealTimeTextSupported;
|
218
232
|
const showTeamsMeetingPhoneCallButton = isEnabled(options === null || options === void 0 ? void 0 : options.teamsMeetingPhoneCallButton);
|
219
233
|
const showDesktopMoreButton = isEnabled(options === null || options === void 0 ? void 0 : options.moreButton) &&
|
220
|
-
(false ||
|
234
|
+
(false ||
|
235
|
+
isEnabled(options === null || options === void 0 ? void 0 : options.holdButton) ||
|
236
|
+
showCaptionsButton ||
|
237
|
+
props.onUserSetGalleryLayout ||
|
238
|
+
/* @conditional-compile-remove(rtt) */ showRealTimeTextButton);
|
221
239
|
const role = (_b = props.callAdapter.getState().call) === null || _b === void 0 ? void 0 : _b.role;
|
222
240
|
const hideRaiseHandButtonInRoomsCall = props.callAdapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);
|
223
241
|
const reactionResources = props.callAdapter.getState().reactions;
|
224
242
|
return (React.createElement("div", { ref: controlBarSizeRef },
|
225
243
|
React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
226
244
|
showCaptionsSettingsModal && (React.createElement(CallingCaptionsSettingsModal, { showCaptionsSettingsModal: showCaptionsSettingsModal, onDismissCaptionsSettings: onDismissCaptionsSettings, changeCaptionLanguage: props.isCaptionsOn && props.useTeamsCaptions })),
|
245
|
+
/* @conditional-compile-remove(rtt) */ showRealTimeTextModal && (React.createElement(CallingRealTimeTextModal, { showModal: showRealTimeTextModal, onDismissModal: onDismissRealTimeTextModal, onStartRealTimeText: props.onStartRealTimeText })),
|
227
246
|
props.teamsMeetingConferenceModalPresent && (React.createElement(MeetingConferencePhoneInfoModal, { conferencePhoneInfoList: (_e = (_d = (_c = props.callAdapter.getState().call) === null || _c === void 0 ? void 0 : _c.meetingConference) === null || _d === void 0 ? void 0 : _d.conferencePhones) !== null && _e !== void 0 ? _e : [], showModal: props.teamsMeetingConferenceModalPresent, onDismissMeetingPhoneInfoSettings: props.onToggleTeamsMeetingConferenceModal }))),
|
228
247
|
React.createElement(Stack, { horizontal: true, reversed: !props.mobileView && !isOutOfSpace, horizontalAlign: "space-between", className: mergeStyles(callControlsContainerStyles, controlBarContainerStyles, controlBarDesktopContainerStyles) },
|
229
248
|
React.createElement(Stack.Item, { grow: true, className: mergeStyles(controlBarWrapperDesktopStyles) },
|
@@ -260,7 +279,13 @@ export const CommonCallControlBar = forwardRef((props, commonCallControlBarRef)
|
|
260
279
|
return (React.createElement(CustomButton, { key: `primary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact', disableTooltip: props.mobileView }));
|
261
280
|
}),
|
262
281
|
props.mobileView && (React.createElement(MoreButton, { "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage, disableTooltip: props.mobileView })),
|
263
|
-
!props.mobileView && showDesktopMoreButton && (React.createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles, onClickShowDialpad: props.onClickShowDialpad, callControls: props.callControls, isCaptionsSupported: showCaptionsButton,
|
282
|
+
!props.mobileView && showDesktopMoreButton && (React.createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles, onClickShowDialpad: props.onClickShowDialpad, callControls: props.callControls, isCaptionsSupported: showCaptionsButton,
|
283
|
+
/* @conditional-compile-remove(rtt) */
|
284
|
+
isRealTimeTextSupported: showRealTimeTextButton, onCaptionsSettingsClick: openCaptionsSettingsModal,
|
285
|
+
/* @conditional-compile-remove(rtt) */
|
286
|
+
onStartRealTimeTextClick: openRealTimeTextModal,
|
287
|
+
/* @conditional-compile-remove(rtt) */
|
288
|
+
startRealTimeTextButtonChecked: props.startRealTimeTextButtonChecked, onUserSetOverflowGalleryPositionChange: props.onUserSetOverflowGalleryPositionChange, onUserSetGalleryLayout: props.onUserSetGalleryLayout, userSetGalleryLayout: props.userSetGalleryLayout, dtmfDialerPresent: props.dtmfDialerPresent, onSetDialpadPage: props.onSetDialpadPage, teamsMeetingPhoneCallEnable: showTeamsMeetingPhoneCallButton, onMeetingPhoneInfoClick: props.onToggleTeamsMeetingConferenceModal })),
|
264
289
|
React.createElement(EndCall, { displayType: "compact", mobileView: props.mobileView, styles: endCallButtonStyles, enableEndCallMenu: !isBoolean(props.callControls) &&
|
265
290
|
!isBoolean((_g = props.callControls) === null || _g === void 0 ? void 0 : _g.endCallButton) &&
|
266
291
|
!props.mobileView &&
|