@azure/communication-react 1.25.0-alpha-202503050017 → 1.25.0-alpha-202503060017
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/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-C6-ioMwK.js → ChatMessageComponentAsRichTextEditBox-UWaqdR2k.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-C6-ioMwK.js.map → ChatMessageComponentAsRichTextEditBox-UWaqdR2k.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-C62sqbFY.js → RichTextSendBoxWrapper-D2B2bXKZ.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-C62sqbFY.js.map → RichTextSendBoxWrapper-D2B2bXKZ.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-DQDR6B8P.js → index-JQbtVrRK.js} +10 -7
- package/dist/dist-cjs/communication-react/{index-DQDR6B8P.js.map → index-JQbtVrRK.js.map} +1 -1
- 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/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +4 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.25.0-alpha-
|
1
|
+
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.25.0-alpha-202503060017';\n"]}
|
@@ -1224,7 +1224,10 @@ beforeDispose) => {
|
|
1224
1224
|
export const createAzureCommunicationCallWithChatAdapterFromClients = (_b) => __awaiter(void 0, [_b], void 0, function* ({ callClient, callAgent, callLocator, chatClient, chatThreadClient, callAdapterOptions }) {
|
1225
1225
|
const callAdapter = yield createAzureCommunicationCallAdapterFromClient(callClient, callAgent, callLocator, callAdapterOptions);
|
1226
1226
|
const chatAdapter = yield createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient);
|
1227
|
-
|
1227
|
+
const callWithChatAdapter = new AzureCommunicationCallWithChatAdapter(callAdapter, chatAdapter);
|
1228
|
+
/* @conditional-compile-remove(breakout-rooms) */
|
1229
|
+
callWithChatAdapter.setCreateChatAdapterCallback((threadId) => createAzureCommunicationChatAdapterFromClient(chatClient, chatClient.getChatThreadClient(threadId)));
|
1230
|
+
return callWithChatAdapter;
|
1228
1231
|
});
|
1229
1232
|
/**
|
1230
1233
|
* Create a {@link CallWithChatAdapter} from the underlying adapters.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AzureCommunicationCallWithChatAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAyBlC,iDAAiD;AACjD,OAAO,EAAE,6BAA6B,EAAE,yCAAgC;AA2BxE,OAAO,EACL,yC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AAC,CAAC;AAC7E,CAAC,CAAA,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wDAAwD,GAAG,CACtE,WAAwB,EACxB,WAAwB,EACH,EAAE,CAAC,IAAI,qCAAqC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAE9F,MAAM,qBAAqB,GAAG,CAC5B,OAA6E,EACjB,EAAE;IAC9D,OAAO,aAAa,IAAI,OAAO,IAAI,WAAW,IAAI,OAAO,CAAC;AAC5D,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,CACpC,OAA6E,EAC7E,OAA6B,EACT,EAAE;IACtB,IAAI,aAAa,IAAI,OAAO,EAAE,CAAC;QAC7B,OAAO,IAAI,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IACD,IAAI,WAAW,IAAI,OAAO,EAAE,CAAC;QAC3B,OAAO,IAAI,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @typescript-eslint/no-unused-vars */ // REMOVE ONCE THIS FILE IS IMPLEMENTED\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ // REMOVE ONCE THIS FILE IS IMPLEMENTED\n\nimport {\n AudioDeviceInfo,\n Call,\n CallAgent,\n GroupCallLocator,\n PermissionConstraints,\n PropertyChangedEvent,\n TeamsMeetingLinkLocator,\n StartCallOptions,\n VideoDeviceInfo\n} from '@azure/communication-calling';\nimport { TeamsMeetingIdLocator } from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport { AddPhoneNumberOptions, DeviceAccess } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport type { BreakoutRoomsEventData, BreakoutRoomsUpdatedListener, TeamsCall } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { MessageOptions } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeStreamViewResult, TogetherModeStreamOptions } from '@internal/react-components';\nimport {\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n IsMutedChangedListener,\n CallIdChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n DisplayNameChangedListener,\n IsSpeakingChangedListener,\n CallAdapter,\n CallAdapterState,\n CallEndedListener\n} from '../../CallComposite';\nimport {\n MessageReceivedListener,\n MessageReadListener,\n ChatAdapter,\n ChatAdapterState,\n ParticipantsRemovedListener,\n ParticipantsAddedListener,\n MessageEditedListener,\n MessageDeletedListener\n} from '../../ChatComposite';\nimport { ResourceDetails } from '../../ChatComposite';\nimport { CallWithChatAdapter, CallWithChatEvent, ChatInitializedListener } from './CallWithChatAdapter';\nimport {\n callWithChatAdapterStateFromBackingStates,\n CallWithChatAdapterState,\n mergeCallAdapterStateIntoCallWithChatAdapterState,\n mergeChatAdapterStateIntoCallWithChatAdapterState\n} from '../state/CallWithChatAdapterState';\nimport {\n _createAzureCommunicationChatAdapterInner,\n _createLazyAzureCommunicationChatAdapterInner,\n createAzureCommunicationChatAdapterFromClient\n} from '../../ChatComposite/adapter/AzureCommunicationChatAdapter';\nimport { EventEmitter } from 'events';\nimport { CommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';\nimport {\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n PhoneNumberIdentifier\n} from '@azure/communication-common';\nimport { AdapterError } from '../../common/adapters';\n\n/* @conditional-compile-remove(call-participants-locator) */\nimport { CallParticipantsLocator } from '../../CallComposite/adapter/AzureCommunicationCallAdapter';\n\nimport { _createAzureCommunicationCallAdapterInner } from '../../CallComposite/adapter/AzureCommunicationCallAdapter';\n\nimport {\n CallAdapterLocator,\n createAzureCommunicationCallAdapterFromClient\n} from '../../CallComposite/adapter/AzureCommunicationCallAdapter';\nimport { StatefulCallClient } from '@internal/calling-stateful-client';\nimport { StatefulChatClient } from '@internal/chat-stateful-client';\nimport { ChatThreadClient } from '@azure/communication-chat';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { UploadChatImageResult } from '@internal/acs-ui-common';\nimport { useEffect, useRef, useState } from 'react';\nimport { _toCommunicationIdentifier, _TelemetryImplementationHint } from '@internal/acs-ui-common';\nimport {\n JoinCallOptions,\n StartCallIdentifier,\n StartCaptionsAdapterOptions,\n StopCaptionsAdapterOptions\n} from '../../CallComposite/adapter/CallAdapter';\n\nimport { AzureCommunicationCallAdapterOptions } from '../../CallComposite/adapter/AzureCommunicationCallAdapter';\nimport {\n IsCaptionsActiveChangedListener,\n CaptionsReceivedListener,\n IsCaptionLanguageChangedListener,\n IsSpokenLanguageChangedListener\n} from '../../CallComposite/adapter/CallAdapter';\n/* @conditional-compile-remove(rtt) */\nimport { RealTimeTextReceivedListener } from '../../CallComposite/adapter/CallAdapter';\nimport { CapabilitiesChangedListener } from '../../CallComposite/adapter/CallAdapter';\nimport { SpotlightChangedListener } from '../../CallComposite/adapter/CallAdapter';\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { busyWait } from '../../common/utils';\n\ntype CallWithChatAdapterStateChangedHandler = (newState: CallWithChatAdapterState) => void;\n\n/** Context of Call with Chat, which is a centralized context for all state updates */\nclass CallWithChatContext {\n private emitter = new EventEmitter();\n private state: CallWithChatAdapterState;\n\n constructor(clientState: CallWithChatAdapterState, maxListeners = 50) {\n this.state = clientState;\n this.emitter.setMaxListeners(maxListeners);\n }\n\n public onStateChange(handler: CallWithChatAdapterStateChangedHandler): void {\n this.emitter.on('stateChanged', handler);\n }\n\n public offStateChange(handler: CallWithChatAdapterStateChangedHandler): void {\n this.emitter.off('stateChanged', handler);\n }\n\n public setState(state: CallWithChatAdapterState): void {\n this.state = state;\n this.emitter.emit('stateChanged', this.state);\n }\n\n public getState(): CallWithChatAdapterState {\n return this.state;\n }\n\n public updateClientState(clientState: CallWithChatAdapterState): void {\n this.setState(clientState);\n }\n\n public updateClientStateWithChatState(chatAdapterState: ChatAdapterState): void {\n this.updateClientState(mergeChatAdapterStateIntoCallWithChatAdapterState(this.state, chatAdapterState));\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n public unsetChatState(): void {\n this.updateClientState({ ...this.state, chat: undefined });\n }\n\n public updateClientStateWithCallState(callAdapterState: CallAdapterState): void {\n this.updateClientState(mergeCallAdapterStateIntoCallWithChatAdapterState(this.state, callAdapterState));\n }\n}\n\n/**\n * CallWithChat adapter backed by Azure Communication Services.\n * Created for easy use with the {@link CallWithChatComposite}.\n */\nexport class AzureCommunicationCallWithChatAdapter implements CallWithChatAdapter {\n private callAdapter: CallAdapter;\n private chatAdapter: ChatAdapter | undefined;\n private context: CallWithChatContext;\n private emitter: EventEmitter = new EventEmitter();\n private onChatStateChange: (newChatAdapterState: ChatAdapterState) => void;\n private onCallStateChange: (newChatAdapterState: CallAdapterState) => void;\n private isAdapterDisposed: boolean = false;\n /* @conditional-compile-remove(breakout-rooms) */\n private createChatAdapterCallback: ((threadId: string) => Promise<ChatAdapter>) | undefined;\n /* @conditional-compile-remove(breakout-rooms) */\n private originCallChatAdapter: ChatAdapter | undefined;\n /* @conditional-compile-remove(breakout-rooms) */\n private breakoutRoomChatAdapter: ChatAdapter | undefined;\n\n constructor(callAdapter: CallAdapter, chatAdapter?: ChatAdapter) {\n this.bindPublicMethods();\n this.callAdapter = callAdapter;\n this.context = new CallWithChatContext(callWithChatAdapterStateFromBackingStates(callAdapter));\n\n const onChatStateChange = (newChatAdapterState: ChatAdapterState): void => {\n this.context.updateClientStateWithChatState(newChatAdapterState);\n };\n\n this.onChatStateChange = onChatStateChange;\n if (chatAdapter) {\n this.updateChatAdapter(chatAdapter);\n /* @conditional-compile-remove(breakout-rooms) */\n this.originCallChatAdapter = chatAdapter;\n }\n\n const onCallStateChange = (newCallAdapterState: CallAdapterState): void => {\n this.context.updateClientStateWithCallState(newCallAdapterState);\n };\n\n this.callAdapter.onStateChange(onCallStateChange);\n /* @conditional-compile-remove(breakout-rooms) */\n this.callAdapter.on('breakoutRoomsUpdated', async (eventData: BreakoutRoomsEventData) => {\n if (eventData.type === 'join') {\n await this.breakoutRoomJoined(eventData.data);\n } else if (eventData.type === 'assignedBreakoutRooms') {\n if (!eventData.data || eventData.data.state === 'closed') {\n if (\n this.originCallChatAdapter &&\n this.originCallChatAdapter?.getState().thread.threadId !== this.context.getState().chat?.threadId\n ) {\n this.updateChatAdapter(this.originCallChatAdapter);\n }\n }\n }\n });\n /* @conditional-compile-remove(breakout-rooms) */\n this.callAdapter.on('callEnded', () => {\n // If the call ended is a breakout room call with breakout room settings then update the chat adapter to the\n // origin call\n if (this.context.getState().call?.breakoutRooms?.breakoutRoomSettings) {\n // Unsubscribe from chat adapter state changes\n this.chatAdapter?.offStateChange(this.onChatStateChange);\n // Unassign chat adapter\n this.chatAdapter = undefined;\n // Set chat state to undefined to ensure that the chat thread of the breakout room is not shown\n this.context.unsetChatState();\n // Update chat state to the origin call chat adapter\n if (this.originCallChatAdapter) {\n this.updateChatAdapter(this.originCallChatAdapter);\n }\n }\n });\n this.onCallStateChange = onCallStateChange;\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n private async breakoutRoomJoined(call: Call | TeamsCall): Promise<void> {\n const targetThreadId = call.info.threadId;\n\n // If the chat adapter is not on the target thread then we need to switch to the breakout room chat adapter\n if (targetThreadId && this.chatAdapter && this.chatAdapter.getState().thread.threadId !== targetThreadId) {\n // Unsubscribe from chat adapter state changes\n this.chatAdapter.offStateChange(this.onChatStateChange);\n // Set chat state to undefined to prevent showing chat thread of origin call\n this.context.unsetChatState();\n\n // Check if the breakout room chat adapter has been initialized\n this.breakoutRoomChatAdapter = await this.setBreakoutRoomChatAdapterToThread(targetThreadId);\n\n // Wait for the user to be added to the thread of chat adapter before updating the current chat adapter\n // to avoid chat errors of not having access to the chat thread. This delayed access to the chat thread\n // is also seen in Teams\n // Check up to 20 times every 500ms and then continue.\n await busyWait(() => {\n // If the call adapter's call id has been changed, then stop waiting and don't update the chat adapter\n if (this.context.getState().call?.id !== call.id) {\n return true;\n }\n\n const userAddedToThread =\n !!this.breakoutRoomChatAdapter?.getState().thread.participants[\n toFlatCommunicationIdentifier(this.context.getState().userId)\n ];\n return userAddedToThread;\n }, 20);\n\n // If the call adapter's call has been changed while for waiting for breakout room chat adapter to be ready\n // then don't update the chat adapter\n if (this.context.getState().call?.id !== call.id) {\n return;\n }\n\n this.updateChatAdapter(this.breakoutRoomChatAdapter);\n }\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n private async setBreakoutRoomChatAdapterToThread(targetThreadId: string): Promise<ChatAdapter> {\n if (this.breakoutRoomChatAdapter) {\n // If the breakout room chat adapter is not set on the target thread then unsubscribe, dispose, and\n // reinitialize the chat adapter for the target thread\n if (this.breakoutRoomChatAdapter.getState().thread.threadId !== targetThreadId) {\n this.breakoutRoomChatAdapter.offStateChange(this.onChatStateChange);\n this.breakoutRoomChatAdapter.dispose();\n const newBreakoutRoomChatAdapter = await this.createNewChatAdapterForThread(targetThreadId);\n return newBreakoutRoomChatAdapter;\n } else {\n return this.breakoutRoomChatAdapter;\n }\n } else {\n // Initiliaze the breakout room chat adapter for the target thread\n const newBreakoutRoomChatAdapter = await this.createNewChatAdapterForThread(targetThreadId);\n return newBreakoutRoomChatAdapter;\n }\n }\n\n public setChatAdapterPromise(chatAdapter: Promise<ChatAdapter>): void {\n chatAdapter.then((adapter) => {\n if (!this.isAdapterDisposed) {\n this.updateChatAdapter(adapter);\n /* @conditional-compile-remove(breakout-rooms) */\n this.originCallChatAdapter = adapter;\n }\n });\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n public setCreateChatAdapterCallback(chatThreadCallBack: (threadId: string) => Promise<ChatAdapter>): void {\n this.createChatAdapterCallback = chatThreadCallBack;\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n public createNewChatAdapterForThread(threadId: string): Promise<ChatAdapter> {\n if (this.createChatAdapterCallback) {\n return this.createChatAdapterCallback(threadId);\n }\n throw new Error('Unable to create chat adapter for thread because createChatAdapterCallback is not set');\n }\n\n private updateChatAdapter(chatAdapter: ChatAdapter): void {\n this.chatAdapter?.offStateChange(this.onChatStateChange);\n this.chatAdapter = chatAdapter;\n this.chatAdapter.onStateChange(this.onChatStateChange);\n this.context.updateClientStateWithChatState(chatAdapter.getState());\n this.emitter.emit('chatInitialized', this.chatAdapter);\n }\n\n private bindPublicMethods(): void {\n this.joinCall.bind(this);\n this.leaveCall.bind(this);\n this.startCall.bind(this);\n this.onStateChange.bind(this);\n this.offStateChange.bind(this);\n this.getState.bind(this);\n this.dispose.bind(this);\n this.setCamera.bind(this);\n this.setMicrophone.bind(this);\n this.setSpeaker.bind(this);\n this.askDevicePermission.bind(this);\n this.queryCameras.bind(this);\n this.queryMicrophones.bind(this);\n this.querySpeakers.bind(this);\n this.startCamera.bind(this);\n this.stopCamera.bind(this);\n this.mute.bind(this);\n this.unmute.bind(this);\n this.startScreenShare.bind(this);\n this.stopScreenShare.bind(this);\n this.raiseHand.bind(this);\n this.lowerHand.bind(this);\n this.onReactionClick.bind(this);\n this.removeParticipant.bind(this);\n this.createStreamView.bind(this);\n this.disposeStreamView.bind(this);\n this.disposeScreenShareStreamView.bind(this);\n this.fetchInitialData.bind(this);\n this.sendMessage.bind(this);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n this.uploadImage.bind(this);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n this.deleteImage.bind(this);\n this.sendReadReceipt.bind(this);\n this.sendTypingIndicator.bind(this);\n this.loadPreviousChatMessages.bind(this);\n this.updateMessage.bind(this);\n this.deleteMessage.bind(this);\n this.on.bind(this);\n this.off.bind(this);\n this.downloadResourceToCache = this.downloadResourceToCache.bind(this);\n this.removeResourceFromCache = this.removeResourceFromCache.bind(this);\n this.holdCall.bind(this);\n this.resumeCall.bind(this);\n this.addParticipant.bind(this);\n this.sendDtmfTone.bind(this);\n /* @conditional-compile-remove(unsupported-browser) */\n this.allowUnsupportedBrowserVersion.bind(this);\n this.startCaptions.bind(this);\n this.stopCaptions.bind(this);\n this.setSpokenLanguage.bind(this);\n this.setCaptionLanguage.bind(this);\n /* @conditional-compile-remove(rtt) */\n this.sendRealTimeText.bind(this);\n this.startVideoBackgroundEffect.bind(this);\n this.stopVideoBackgroundEffects.bind(this);\n this.updateBackgroundPickerImages.bind(this);\n this.startNoiseSuppressionEffect.bind(this);\n this.stopNoiseSuppressionEffect.bind(this);\n }\n\n /** Join existing Call. */\n public joinCall(options?: boolean | JoinCallOptions): Call | undefined {\n if (typeof options === 'boolean') {\n return this.callAdapter.joinCall(options);\n } else {\n return this.callAdapter.joinCall(options);\n }\n }\n /** Leave current Call. */\n public async leaveCall(forEveryone?: boolean): Promise<void> {\n // Only remove self from the GroupCall. Contoso must manage access to Chat.\n await this.callAdapter.leaveCall(forEveryone);\n }\n\n /** Start a new Call. */\n public startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /** Start a new Call. */\n public startCall(participants: StartCallIdentifier[], options?: StartCallOptions): Call | undefined;\n /** Start a new Call. */\n public startCall(participants: string[] | StartCallIdentifier[], options?: StartCallOptions): Call | undefined {\n if (participants.length === 0) {\n throw new Error('At least one participant is required to start a call');\n }\n if (typeof participants[0] === 'string') {\n return this.callAdapter.startCall(participants as string[], options);\n } else {\n return this.callAdapter.startCall(participants as StartCallIdentifier[], options);\n }\n }\n /**\n * Subscribe to state change events.\n * @param handler - handler to be called when the state changes. This is passed the new state.\n */\n public onStateChange(handler: (state: CallWithChatAdapterState) => void): void {\n this.context.onStateChange(handler);\n }\n /**\n * Unsubscribe to state change events.\n * @param handler - handler to be no longer called when state changes.\n */\n public offStateChange(handler: (state: CallWithChatAdapterState) => void): void {\n this.context.offStateChange(handler);\n }\n /** Get current Call and Chat state. */\n public getState(): CallWithChatAdapterState {\n return this.context.getState();\n }\n /** Dispose of the current CallWithChatAdapter. */\n public dispose(): void {\n this.isAdapterDisposed = true;\n if (this.chatAdapter) {\n this.chatAdapter.offStateChange(this.onChatStateChange);\n this.chatAdapter.dispose();\n }\n this.callAdapter.offStateChange(this.onCallStateChange);\n this.callAdapter.dispose();\n }\n /** Remove a participant from the Call only. */\n public async removeParticipant(userId: string | CommunicationIdentifier): Promise<void> {\n let participant = userId;\n participant = _toCommunicationIdentifier(userId);\n await this.callAdapter.removeParticipant(participant);\n }\n public async setCamera(device: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> {\n await this.callAdapter.setCamera(device, options);\n }\n /** Set the microphone to be used in the Call. */\n public async setMicrophone(device: AudioDeviceInfo): Promise<void> {\n await this.callAdapter.setMicrophone(device);\n }\n /** Set the speaker to be used in the Call. */\n public async setSpeaker(device: AudioDeviceInfo): Promise<void> {\n await this.callAdapter.setSpeaker(device);\n }\n public async askDevicePermission(constraints: PermissionConstraints): Promise<DeviceAccess> {\n return await this.callAdapter.askDevicePermission(constraints);\n }\n /** Query for available cameras. */\n public async queryCameras(): Promise<VideoDeviceInfo[]> {\n return await this.callAdapter.queryCameras();\n }\n /** Query for available microphones. */\n public async queryMicrophones(): Promise<AudioDeviceInfo[]> {\n return await this.callAdapter.queryMicrophones();\n }\n /** Query for available speakers. */\n public async querySpeakers(): Promise<AudioDeviceInfo[]> {\n return await this.callAdapter.querySpeakers();\n }\n /** Start the camera for the user in the Call. */\n public async startCamera(options?: VideoStreamOptions): Promise<void> {\n await this.callAdapter.startCamera(options);\n }\n /** Stop the camera for the user in the Call. */\n public async stopCamera(): Promise<void> {\n await this.callAdapter.stopCamera();\n }\n /** Mute the user in the Call. */\n public async mute(): Promise<void> {\n await this.callAdapter.mute();\n }\n /** Unmute the user in the Call. */\n public async unmute(): Promise<void> {\n await this.callAdapter.unmute();\n }\n /** Trigger the user to start screen share. */\n public async startScreenShare(): Promise<void> {\n await this.callAdapter.startScreenShare();\n }\n /** Stop the current active screen share. */\n public async stopScreenShare(): Promise<void> {\n await this.callAdapter.stopScreenShare();\n }\n /** Raise hand for local user. */\n public async raiseHand(): Promise<void> {\n await this.callAdapter.raiseHand();\n }\n /** Lower hand for local user. */\n public async lowerHand(): Promise<void> {\n await this.callAdapter.lowerHand();\n }\n /** Reaction clicked by the local user. */\n public async onReactionClick(reaction: Reaction): Promise<void> {\n await this.callAdapter.onReactionClick(reaction);\n }\n /** Create a stream view for a remote participants video feed. */\n public async createStreamView(\n remoteUserId?: string,\n options?: VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> {\n return await this.callAdapter.createStreamView(remoteUserId, options);\n }\n /** Dispose of a created stream view of a remote participants video feed. */\n public async disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void> {\n await this.callAdapter.disposeStreamView(remoteUserId, options);\n }\n /** Dispose of a remote screen share */\n public async disposeScreenShareStreamView(remoteUserId: string): Promise<void> {\n await this.callAdapter.disposeScreenShareStreamView(remoteUserId);\n }\n /** Dispose of a remote video stream */\n public async disposeRemoteVideoStreamView(remoteUserId: string): Promise<void> {\n await this.callAdapter.disposeRemoteVideoStreamView(remoteUserId);\n }\n /** Dispose of the local video stream */\n public async disposeLocalVideoStreamView(): Promise<void> {\n await this.callAdapter.disposeLocalVideoStreamView();\n }\n /* @conditional-compile-remove(together-mode) */\n public async createTogetherModeStreamView(\n options?: TogetherModeStreamOptions\n ): Promise<void | TogetherModeStreamViewResult> {\n return await this.callAdapter.createTogetherModeStreamView(options);\n }\n /* @conditional-compile-remove(together-mode) */\n public async startTogetherMode(): Promise<void> {\n return await this.callAdapter.startTogetherMode();\n }\n /* @conditional-compile-remove(together-mode) */\n public setTogetherModeSceneSize(width: number, height: number): void {\n return this.callAdapter.setTogetherModeSceneSize(width, height);\n }\n /* @conditional-compile-remove(together-mode) */\n public async disposeTogetherModeStreamView(): Promise<void> {\n await this.callAdapter.disposeTogetherModeStreamView();\n }\n /** Fetch initial Call and Chat data such as chat messages. */\n public async fetchInitialData(): Promise<void> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.fetchInitialData();\n });\n }\n /** Send a chat message. */\n public async sendMessage(\n content: string,\n /* @conditional-compile-remove(file-sharing-acs) */\n options?: MessageOptions\n ): Promise<void> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.sendMessage(content, /* @conditional-compile-remove(file-sharing-acs) */ options);\n });\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n /** Upload a chat image. */\n public async uploadImage(image: Blob, imageFileName: string): Promise<UploadChatImageResult> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.uploadImage(image, imageFileName);\n });\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n /** Delete a chat image. */\n public async deleteImage(imageId: string): Promise<void> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.deleteImage(imageId);\n });\n }\n /** Send a chat read receipt. */\n public async sendReadReceipt(chatMessageId: string): Promise<void> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.sendReadReceipt(chatMessageId);\n });\n }\n /** Send an isTyping indicator. */\n public async sendTypingIndicator(): Promise<void> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.sendTypingIndicator();\n });\n }\n /** Load previous Chat messages. */\n public async loadPreviousChatMessages(messagesToLoad: number): Promise<boolean> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.loadPreviousChatMessages(messagesToLoad);\n });\n }\n /** Update an existing message. */\n public async updateMessage(\n messageId: string,\n content: string,\n options?: Record<string, string> | /* @conditional-compile-remove(file-sharing-acs) */ MessageOptions\n ): Promise<void> {\n return this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.updateMessage(messageId, content, options);\n });\n }\n /** Delete an existing message. */\n public async deleteMessage(messageId: string): Promise<void> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.deleteMessage(messageId);\n });\n }\n public async downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void> {\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.downloadResourceToCache(resourceDetails);\n });\n }\n public removeResourceFromCache(resourceDetails: ResourceDetails): void {\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.removeResourceFromCache(resourceDetails);\n });\n }\n public async holdCall(): Promise<void> {\n return await this.callAdapter.holdCall();\n }\n public async resumeCall(): Promise<void> {\n return await this.callAdapter.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 (isCommunicationUserIdentifier(participant)) {\n return await this.callAdapter.addParticipant(participant);\n } else {\n return await this.callAdapter.addParticipant(participant, options);\n }\n }\n\n public async sendDtmfTone(dtmfTone: DtmfTone): Promise<void> {\n return await this.callAdapter.sendDtmfTone(dtmfTone);\n }\n\n /* @conditional-compile-remove(unsupported-browser) */\n public allowUnsupportedBrowserVersion(): void {\n return this.callAdapter.allowUnsupportedBrowserVersion();\n }\n\n public async startCaptions(options?: StartCaptionsAdapterOptions): Promise<void> {\n await this.callAdapter.startCaptions(options);\n }\n\n public async stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void> {\n await this.callAdapter.stopCaptions(options);\n }\n\n public async setCaptionLanguage(language: string): Promise<void> {\n await this.callAdapter.setCaptionLanguage(language);\n }\n\n public async setSpokenLanguage(language: string): Promise<void> {\n await this.callAdapter.setSpokenLanguage(language);\n }\n /* @conditional-compile-remove(rtt) */\n public async sendRealTimeText(text: string, isFinalized: boolean): Promise<void> {\n await this.callAdapter.sendRealTimeText(text, isFinalized);\n }\n\n public async startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void> {\n await this.callAdapter.startVideoBackgroundEffect(videoBackgroundEffect);\n }\n\n public async stopVideoBackgroundEffects(): Promise<void> {\n return await this.callAdapter.stopVideoBackgroundEffects();\n }\n\n public updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void {\n return this.callAdapter.updateBackgroundPickerImages(backgroundImages);\n }\n\n public updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void {\n return this.callAdapter.updateSelectedVideoBackgroundEffect(selectedVideoBackground);\n }\n\n public async startNoiseSuppressionEffect(): Promise<void> {\n return await this.callAdapter.startNoiseSuppressionEffect();\n }\n\n public async stopNoiseSuppressionEffect(): Promise<void> {\n return await this.callAdapter.stopNoiseSuppressionEffect();\n }\n\n public async submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined> {\n return this.callAdapter.submitSurvey(survey);\n }\n\n public async startSpotlight(userIds?: string[]): Promise<void> {\n return this.callAdapter.startSpotlight(userIds);\n }\n\n public async stopSpotlight(userIds?: string[]): Promise<void> {\n return this.callAdapter.stopSpotlight(userIds);\n }\n\n public async stopAllSpotlight(): Promise<void> {\n return this.callAdapter.stopAllSpotlight();\n }\n\n public async muteParticipant(userId: string): Promise<void> {\n return this.callAdapter.muteParticipant(userId);\n }\n\n public async muteAllRemoteParticipants(): Promise<void> {\n return this.callAdapter.muteAllRemoteParticipants();\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n public async returnFromBreakoutRoom(): Promise<void> {\n if (\n this.originCallChatAdapter &&\n this.context.getState().chat?.threadId !== this.originCallChatAdapter.getState().thread.threadId\n ) {\n this.breakoutRoomChatAdapter?.dispose();\n this.updateChatAdapter(this.originCallChatAdapter);\n }\n\n // Check if breakout room settings are defined to verify the user is in a breakout room before\n // returning to the origin call.\n const breakoutRoomSettings = this.context.getState().call?.breakoutRooms?.breakoutRoomSettings;\n if (breakoutRoomSettings) {\n await this.callAdapter.returnFromBreakoutRoom();\n }\n }\n\n public async forbidAudio(userIds: string[]): Promise<void> {\n return this.callAdapter.forbidAudio(userIds);\n }\n\n public async permitAudio(userIds: string[]): Promise<void> {\n return this.callAdapter.permitAudio(userIds);\n }\n\n public async forbidOthersAudio(): Promise<void> {\n return this.callAdapter.forbidOthersAudio();\n }\n\n public async permitOthersAudio(): Promise<void> {\n return this.callAdapter.permitOthersAudio();\n }\n\n public async forbidVideo(userIds: string[]): Promise<void> {\n return this.callAdapter.forbidVideo(userIds);\n }\n\n public async permitVideo(userIds: string[]): Promise<void> {\n return this.callAdapter.permitVideo(userIds);\n }\n\n public async forbidOthersVideo(): Promise<void> {\n return this.callAdapter.forbidOthersVideo();\n }\n\n public async permitOthersVideo(): Promise<void> {\n return this.callAdapter.permitOthersVideo();\n }\n\n on(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;\n on(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;\n on(event: 'callEnded', listener: CallEndedListener): void;\n on(event: 'callError', listener: (e: AdapterError) => void): 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: 'messageReceived', listener: MessageReceivedListener): void;\n on(event: 'messageEdited', listener: MessageEditedListener): void;\n on(event: 'messageDeleted', listener: MessageDeletedListener): void;\n on(event: 'messageSent', listener: MessageReceivedListener): 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: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n on(event: 'chatError', 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 on(event: 'chatInitialized', listener: ChatInitializedListener): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n on(event: CallWithChatEvent, listener: any): void {\n switch (event) {\n case 'callParticipantsJoined':\n this.callAdapter.on('participantsJoined', listener);\n break;\n case 'callParticipantsLeft':\n this.callAdapter.on('participantsLeft', listener);\n break;\n case 'callEnded':\n this.callAdapter.on('callEnded', listener);\n break;\n case 'isMutedChanged':\n this.callAdapter.on('isMutedChanged', listener);\n break;\n case 'callIdChanged':\n this.callAdapter.on('callIdChanged', listener);\n break;\n case 'isLocalScreenSharingActiveChanged':\n this.callAdapter.on('isLocalScreenSharingActiveChanged', listener);\n break;\n case 'displayNameChanged':\n this.callAdapter.on('displayNameChanged', listener);\n break;\n case 'isSpeakingChanged':\n this.callAdapter.on('isSpeakingChanged', listener);\n break;\n case 'selectedMicrophoneChanged':\n this.callAdapter.on('selectedMicrophoneChanged', listener);\n break;\n case 'selectedSpeakerChanged':\n this.callAdapter.on('selectedSpeakerChanged', listener);\n break;\n case 'captionsReceived':\n this.callAdapter.on('captionsReceived', listener);\n break;\n /* @conditional-compile-remove(rtt) */\n case 'realTimeTextReceived':\n this.callAdapter.on('realTimeTextReceived', listener);\n break;\n case 'isCaptionsActiveChanged':\n this.callAdapter.on('isCaptionsActiveChanged', listener);\n break;\n case 'isCaptionLanguageChanged':\n this.callAdapter.on('isCaptionLanguageChanged', listener);\n break;\n case 'isSpokenLanguageChanged':\n this.callAdapter.on('isSpokenLanguageChanged', listener);\n break;\n case 'messageReceived':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('messageReceived', listener);\n });\n break;\n case 'messageEdited':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('messageEdited', listener);\n });\n break;\n case 'messageDeleted':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('messageDeleted', listener);\n });\n break;\n case 'messageSent':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('messageSent', listener);\n });\n break;\n case 'messageRead':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('messageRead', listener);\n });\n break;\n case 'chatParticipantsAdded':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('participantsAdded', listener);\n });\n break;\n case 'chatParticipantsRemoved':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('participantsRemoved', listener);\n });\n break;\n case 'callError':\n this.callAdapter.on('error', listener);\n break;\n case 'chatError':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('error', listener);\n });\n break;\n case 'chatInitialized':\n this.emitter.on(event, listener);\n break;\n case 'capabilitiesChanged':\n this.callAdapter.on('capabilitiesChanged', listener);\n break;\n case 'spotlightChanged':\n this.callAdapter.on('spotlightChanged', listener);\n break;\n /* @conditional-compile-remove(breakout-rooms) */\n case 'breakoutRoomsUpdated':\n this.callAdapter.on('breakoutRoomsUpdated', listener);\n break;\n default:\n throw `Unknown AzureCommunicationCallWithChatAdapter Event: ${event}`;\n }\n }\n\n off(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;\n off(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;\n off(event: 'callEnded', listener: CallEndedListener): void;\n off(event: 'callError', listener: (e: AdapterError) => void): 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: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\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: MessageReceivedListener): 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 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 off(event: 'chatInitialized', listener: ChatInitializedListener): void;\n /* @conditional-compile-remove(breakout-rooms) */\n off(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n off(event: CallWithChatEvent, listener: any): void {\n switch (event as unknown) {\n case 'callParticipantsJoined':\n this.callAdapter.off('participantsJoined', listener);\n break;\n case 'callParticipantsLeft':\n this.callAdapter.off('participantsLeft', listener);\n break;\n case 'callEnded':\n this.callAdapter.off('callEnded', listener);\n break;\n case 'isMutedChanged':\n this.callAdapter.off('isMutedChanged', listener);\n break;\n case 'callIdChanged':\n this.callAdapter.off('callIdChanged', listener);\n break;\n case 'isLocalScreenSharingActiveChanged':\n this.callAdapter.off('isLocalScreenSharingActiveChanged', listener);\n break;\n case 'displayNameChanged':\n this.callAdapter.off('displayNameChanged', listener);\n break;\n case 'isSpeakingChanged':\n this.callAdapter.off('isSpeakingChanged', listener);\n break;\n case 'selectedMicrophoneChanged':\n this.callAdapter.off('selectedMicrophoneChanged', listener);\n break;\n case 'selectedSpeakerChanged':\n this.callAdapter.off('selectedSpeakerChanged', listener);\n break;\n case 'captionsReceived':\n this.callAdapter.off('captionsReceived', listener);\n break;\n /* @conditional-compile-remove(rtt) */\n case 'realTimeTextReceived':\n this.callAdapter.off('realTimeTextReceived', listener);\n break;\n case 'isCaptionsActiveChanged':\n this.callAdapter.off('isCaptionsActiveChanged', listener);\n break;\n case 'isCaptionLanguageChanged':\n this.callAdapter.off('isCaptionLanguageChanged', listener);\n break;\n case 'isSpokenLanguageChanged':\n this.callAdapter.off('isSpokenLanguageChanged', listener);\n break;\n case 'messageReceived':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('messageReceived', listener);\n });\n break;\n case 'messageEdited':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('messageEdited', listener);\n });\n break;\n case 'messageDeleted':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('messageDeleted', listener);\n });\n break;\n case 'messageSent':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('messageSent', listener);\n });\n break;\n case 'messageRead':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('messageRead', listener);\n });\n break;\n case 'chatParticipantsAdded':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('participantsAdded', listener);\n });\n break;\n case 'chatParticipantsRemoved':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('participantsRemoved', listener);\n });\n break;\n case 'callError':\n this.callAdapter.off('error', listener);\n break;\n case 'chatError':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('error', listener);\n });\n break;\n case 'chatInitialized':\n this.emitter.off(event, listener);\n break;\n case 'capabilitiesChanged':\n this.callAdapter.off('capabilitiesChanged', listener);\n break;\n case 'spotlightChanged':\n this.callAdapter.off('spotlightChanged', listener);\n break;\n /* @conditional-compile-remove(breakout-rooms) */\n case 'breakoutRoomsUpdated':\n this.callAdapter.off('breakoutRoomsUpdated', listener);\n break;\n default:\n throw `Unknown AzureCommunicationCallWithChatAdapter Event: ${event}`;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private executeWithResolvedChatAdapter(callback: (adapter: ChatAdapter) => any): any {\n if (!this.chatAdapter) {\n console.error('Chat is not initialized');\n } else {\n return callback(this.chatAdapter);\n }\n }\n}\n\n/**\n * Provides a way to get the chat thread ID for a given locator.\n *\n * @private\n */\nexport interface ChatThreadProvider {\n isCallInfoRequired(): boolean;\n getChatThreadPromise(): Promise<string>;\n getChatThread(): string;\n}\n\n/**\n * Arguments for use in {@link createAzureCommunicationCallWithChatAdapter} to join a Group Call with an associated Chat thread.\n * @private\n */\nexport class CallAndChatProvider implements ChatThreadProvider {\n public locator: CallAndChatLocator;\n\n constructor(locator: CallAndChatLocator) {\n this.locator = locator;\n }\n public isCallInfoRequired(): boolean {\n return false;\n }\n public async getChatThreadPromise(): Promise<string> {\n return this.getChatThread();\n }\n\n public getChatThread(): string {\n return this.locator.chatThreadId;\n }\n}\n\n/**\n * Arguments for use in {@link createAzureCommunicationCallWithChatAdapter} to join a Teams meeting with an associated Chat thread.\n *\n * @private\n */\nexport class TeamsMeetingLinkProvider implements ChatThreadProvider {\n public locator: TeamsMeetingLinkLocator;\n private callAdapterPromise: Promise<CallAdapter>;\n private callAdapterSubscription?: (state: CallAdapterState) => void;\n\n constructor(locator: TeamsMeetingLinkLocator, callAdapterPromise: Promise<CallAdapter>) {\n this.locator = locator;\n this.callAdapterPromise = callAdapterPromise;\n }\n\n public isCallInfoRequired(): boolean {\n return true;\n }\n\n public getChatThread(): string {\n throw new Error('Chat thread ID should be retrieved from call.callInfo using method getChatThreadPromise');\n }\n\n public async getChatThreadPromise(): Promise<string> {\n {\n // Wait for the call to be connected and get the chat thread ID from `call.callInfo`.\n const chatThreadPromise = new Promise<string>((resolve) => {\n this.callAdapterPromise.then((callAdapter) => {\n // Ensure function is idempotent by removing any existing subscription.\n this.callAdapterSubscription && callAdapter.offStateChange(this.callAdapterSubscription);\n\n this.callAdapterSubscription = (state: CallAdapterState): void => {\n if (state.call?.state === 'Connected' && state.call.info?.threadId) {\n this.callAdapterSubscription && callAdapter.offStateChange(this.callAdapterSubscription);\n this.callAdapterSubscription = undefined;\n\n resolve(state.call.info?.threadId);\n }\n };\n callAdapter.onStateChange(this.callAdapterSubscription);\n });\n });\n\n return chatThreadPromise;\n }\n }\n}\n\n/**\n * Arguments for use in {@link createAzureCommunicationCallWithChatAdapter} to join a Teams meeting using meeting id.\n *\n * @private\n */\nexport class TeamsMeetingIdProvider implements ChatThreadProvider {\n public locator: TeamsMeetingIdLocator;\n private callAdapter: Promise<CallAdapter>;\n\n constructor(locator: TeamsMeetingIdLocator, callAdapter: Promise<CallAdapter>) {\n this.locator = locator;\n this.callAdapter = callAdapter;\n }\n public isCallInfoRequired(): boolean {\n return true;\n }\n public getChatThread(): string {\n throw new Error('Chat thread ID is not available for Teams meeting ID');\n }\n\n /**\n * Wait call to be connected to get thread ID.\n * @returns the chat thread ID for the given meeting ID.\n */\n public async getChatThreadPromise(): Promise<string> {\n return new Promise<string>((resolve) => {\n const stateChangeListener = (state: CallAdapterState): void => {\n if (state.call?.state === 'Connected' && state.call.info?.threadId) {\n this.callAdapter.then((adapter) => {\n adapter.offStateChange(stateChangeListener);\n });\n resolve(state.call.info?.threadId);\n }\n };\n\n this.callAdapter.then((adapter) => {\n const callState = adapter.getState().call?.state;\n const threadId = adapter.getState().call?.info?.threadId;\n if (callState === 'Connected' && threadId) {\n resolve(threadId);\n } else {\n adapter.onStateChange(stateChangeListener);\n }\n });\n });\n }\n}\n\n/**\n * Combination of available adapters for use in {@link createAzureCommunicationCallWithChatAdapter}.\n * @public\n */\nexport type CommunicationAdapter = CallAndChatProvider | TeamsMeetingLinkProvider | TeamsMeetingIdProvider;\n\n/**\n * Arguments for use in {@link createAzureCommunicationCallWithChatAdapter} to join a Call with an associated Chat thread.\n *\n * @public\n */\nexport interface CallAndChatLocator {\n /** Locator used by {@link createAzureCommunicationCallWithChatAdapter} to locate the call to join */\n callLocator: GroupCallLocator | /* @conditional-compile-remove(call-participants-locator) */ CallParticipantsLocator;\n /** Chat thread ID used by {@link createAzureCommunicationCallWithChatAdapter} to locate the chat thread to join */\n chatThreadId: string;\n}\n\n/**\n * Arguments for {@link createAzureCommunicationCallWithChatAdapter}\n *\n * @public\n */\nexport type AzureCommunicationCallWithChatAdapterArgs = {\n endpoint: string;\n userId: CommunicationUserIdentifier;\n displayName: string;\n credential: CommunicationTokenCredential;\n locator: CallAndChatLocator | TeamsMeetingLinkLocator | TeamsMeetingIdLocator;\n alternateCallerId?: string;\n callAdapterOptions?: AzureCommunicationCallAdapterOptions;\n};\n\n/**\n * Create a CallWithChatAdapter backed by Azure Communication services\n * to plug into the {@link CallWithChatComposite}.\n *\n * @public\n */\nexport const createAzureCommunicationCallWithChatAdapter = async ({\n userId,\n displayName,\n credential,\n endpoint,\n locator,\n alternateCallerId,\n callAdapterOptions\n}: AzureCommunicationCallWithChatAdapterArgs): Promise<CallWithChatAdapter> => {\n const callAdapterLocator = isTeamsMeetingLocator(locator) ? locator : locator.callLocator;\n const callAdapter = _createAzureCommunicationCallAdapterInner({\n userId,\n displayName,\n credential,\n locator: callAdapterLocator,\n alternateCallerId,\n options: callAdapterOptions,\n telemetryImplementationHint: 'CallWithChat' as _TelemetryImplementationHint\n });\n\n const chatThreadAdapter = _createChatThreadAdapterInner(locator, callAdapter);\n if (chatThreadAdapter.isCallInfoRequired()) {\n const callWithChatAdapter = new AzureCommunicationCallWithChatAdapter(await callAdapter);\n const chatAdapterPromise = _createLazyAzureCommunicationChatAdapterInner(\n endpoint,\n userId,\n displayName,\n credential,\n chatThreadAdapter.getChatThreadPromise(),\n 'CallWithChat' as _TelemetryImplementationHint\n );\n callWithChatAdapter.setChatAdapterPromise(chatAdapterPromise);\n /* @conditional-compile-remove(breakout-rooms) */\n callWithChatAdapter.setCreateChatAdapterCallback((threadId: string) =>\n _createAzureCommunicationChatAdapterInner(\n endpoint,\n userId,\n displayName,\n credential,\n threadId,\n 'CallWithChat' as _TelemetryImplementationHint\n )\n );\n return callWithChatAdapter;\n } else {\n const chatAdapter = _createAzureCommunicationChatAdapterInner(\n endpoint,\n userId,\n displayName,\n credential,\n chatThreadAdapter.getChatThread(),\n 'CallWithChat' as _TelemetryImplementationHint\n );\n\n const callWithChatAdapter = new AzureCommunicationCallWithChatAdapter(await callAdapter, await chatAdapter);\n /* @conditional-compile-remove(breakout-rooms) */\n callWithChatAdapter.setCreateChatAdapterCallback((threadId: string) =>\n _createAzureCommunicationChatAdapterInner(\n endpoint,\n userId,\n displayName,\n credential,\n threadId,\n 'CallWithChat' as _TelemetryImplementationHint\n )\n );\n return callWithChatAdapter;\n }\n};\n\n/**\n * A custom React hook to simplify the creation of {@link CallWithChatAdapter}.\n *\n * Similar to {@link createAzureCommunicationCallWithChatAdapter}, but takes care of asynchronous\n * creation of the adapter internally.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n *\n * Note that you must memoize the arguments to avoid recreating adapter on each render.\n * See storybook for typical usage examples.\n *\n * @public\n */\nexport const useAzureCommunicationCallWithChatAdapter = (\n /**\n * Arguments to be passed to {@link createAzureCommunicationCallWithChatAdapter}.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n */\n args: Partial<AzureCommunicationCallWithChatAdapterArgs>,\n /**\n * Optional callback to modify the adapter once it is created.\n *\n * If set, must return the modified adapter.\n */\n afterCreate?: (adapter: CallWithChatAdapter) => Promise<CallWithChatAdapter>,\n /**\n * Optional callback called before the adapter is disposed.\n *\n * This is useful for clean up tasks, e.g., leaving any ongoing calls.\n */\n beforeDispose?: (adapter: CallWithChatAdapter) => Promise<void>\n): CallWithChatAdapter | undefined => {\n const { credential, displayName, endpoint, locator, userId, alternateCallerId, callAdapterOptions } = args;\n\n // State update needed to rerender the parent component when a new adapter is created.\n const [adapter, setAdapter] = useState<CallWithChatAdapter | undefined>(undefined);\n // Ref needed for cleanup to access the old adapter created asynchronously.\n const adapterRef = useRef<CallWithChatAdapter | undefined>(undefined);\n const creatingAdapterRef = useRef<boolean>(false);\n\n const afterCreateRef = useRef<((adapter: CallWithChatAdapter) => Promise<CallWithChatAdapter>) | undefined>(\n undefined\n );\n const beforeDisposeRef = useRef<((adapter: CallWithChatAdapter) => Promise<void>) | undefined>(undefined);\n // These refs are updated on *each* render, so that the latest values\n // are used in the `useEffect` closures below.\n // Using a Ref ensures that new values for the callbacks do not trigger the\n // useEffect blocks, and a new adapter creation / distruction is not triggered.\n afterCreateRef.current = afterCreate;\n beforeDisposeRef.current = beforeDispose;\n\n useEffect(\n () => {\n if (!credential || !displayName || !endpoint || !locator || !userId) {\n return;\n }\n (async () => {\n if (adapterRef.current) {\n // Dispose the old adapter when a new one is created.\n //\n // This clean up function uses `adapterRef` because `adapter` can not be added to the dependency array of\n // this `useEffect` -- we do not want to trigger a new adapter creation because of the first adapter\n // creation.\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n if (creatingAdapterRef.current) {\n console.warn(\n 'Adapter is already being created, please see storybook for more information: https://azure.github.io/communication-ui-library/?path=/story/troubleshooting--page'\n );\n return;\n }\n creatingAdapterRef.current = true;\n let newAdapter = await createAzureCommunicationCallWithChatAdapter({\n credential,\n displayName,\n endpoint,\n locator,\n userId,\n alternateCallerId,\n callAdapterOptions\n });\n if (afterCreateRef.current) {\n newAdapter = await afterCreateRef.current(newAdapter);\n }\n adapterRef.current = newAdapter;\n creatingAdapterRef.current = false;\n setAdapter(newAdapter);\n })();\n },\n // Explicitly list all arguments so that caller doesn't have to memoize the `args` object.\n [\n adapterRef,\n afterCreateRef,\n alternateCallerId,\n beforeDisposeRef,\n credential,\n displayName,\n endpoint,\n locator,\n userId,\n callAdapterOptions\n ]\n );\n\n // Dispose any existing adapter when the component unmounts.\n useEffect(() => {\n return () => {\n (async () => {\n if (adapterRef.current) {\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n })();\n };\n }, []);\n\n return adapter;\n};\n\n/**\n * Arguments for {@link createAzureCommunicationCallWithChatAdapterFromClient}\n *\n * @public\n */\nexport type AzureCommunicationCallWithChatAdapterFromClientArgs = {\n callLocator: CallAdapterLocator | TeamsMeetingLinkLocator;\n callAgent: CallAgent;\n callClient: StatefulCallClient;\n chatClient: StatefulChatClient;\n chatThreadClient: ChatThreadClient;\n\n callAdapterOptions?: AzureCommunicationCallAdapterOptions;\n};\n\n/**\n * Create a {@link CallWithChatAdapter} using the provided {@link StatefulChatClient} and {@link StatefulCallClient}.\n *\n * Useful if you want to keep a reference to {@link StatefulChatClient} and {@link StatefulCallClient}.\n * Please note that chatThreadClient has to be created by StatefulChatClient via chatClient.getChatThreadClient(chatThreadId) API.\n * Consider using {@link createAzureCommunicationCallWithChatAdapter} for a simpler API.\n *\n * @public\n */\nexport const createAzureCommunicationCallWithChatAdapterFromClients = async ({\n callClient,\n callAgent,\n callLocator,\n chatClient,\n chatThreadClient,\n callAdapterOptions\n}: AzureCommunicationCallWithChatAdapterFromClientArgs): Promise<CallWithChatAdapter> => {\n const callAdapter = await createAzureCommunicationCallAdapterFromClient(\n callClient,\n callAgent,\n callLocator,\n\n callAdapterOptions\n );\n const chatAdapter = await createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient);\n return new AzureCommunicationCallWithChatAdapter(callAdapter, chatAdapter);\n};\n\n/**\n * Create a {@link CallWithChatAdapter} from the underlying adapters.\n *\n * This is an internal factory function used by browser tests to inject fake adapters for call and chat.\n *\n * @internal\n */\nexport const _createAzureCommunicationCallWithChatAdapterFromAdapters = (\n callAdapter: CallAdapter,\n chatAdapter: ChatAdapter\n): CallWithChatAdapter => new AzureCommunicationCallWithChatAdapter(callAdapter, chatAdapter);\n\nconst isTeamsMeetingLocator = (\n locator: CallAndChatLocator | TeamsMeetingLinkLocator | TeamsMeetingIdLocator\n): locator is TeamsMeetingLinkLocator | TeamsMeetingIdLocator => {\n return 'meetingLink' in locator || 'meetingId' in locator;\n};\n\nconst _createChatThreadAdapterInner = (\n locator: CallAndChatLocator | TeamsMeetingLinkLocator | TeamsMeetingIdLocator,\n adapter: Promise<CallAdapter>\n): ChatThreadProvider => {\n if ('meetingLink' in locator) {\n return new TeamsMeetingLinkProvider(locator, adapter);\n }\n if ('meetingId' in locator) {\n return new TeamsMeetingIdProvider(locator, adapter);\n }\n return new CallAndChatProvider(locator);\n};\n"]}
|
1
|
+
{"version":3,"file":"AzureCommunicationCallWithChatAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAyBlC,iDAAiD;AACjD,OAAO,EAAE,6BAA6B,EAAE,yCAAgC;AA2BxE,OAAO,EACL,yCAAyC,EAEzC,iDAAiD,EACjD,iDAAiD,EAClD,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,yCAAyC,EACzC,6CAA6C,EAC7C,6CAA6C,EAC9C,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EAEL,6BAA6B,EAE9B,MAAM,6BAA6B,CAAC;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;GAMG;AACH,MAAM,CAAC,MAAM,wDAAwD,GAAG,CACtE,WAAwB,EACxB,WAAwB,EACH,EAAE,CAAC,IAAI,qCAAqC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAE9F,MAAM,qBAAqB,GAAG,CAC5B,OAA6E,EACjB,EAAE;IAC9D,OAAO,aAAa,IAAI,OAAO,IAAI,WAAW,IAAI,OAAO,CAAC;AAC5D,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,CACpC,OAA6E,EAC7E,OAA6B,EACT,EAAE;IACtB,IAAI,aAAa,IAAI,OAAO,EAAE,CAAC;QAC7B,OAAO,IAAI,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IACD,IAAI,WAAW,IAAI,OAAO,EAAE,CAAC;QAC3B,OAAO,IAAI,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @typescript-eslint/no-unused-vars */ // REMOVE ONCE THIS FILE IS IMPLEMENTED\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ // REMOVE ONCE THIS FILE IS IMPLEMENTED\n\nimport {\n AudioDeviceInfo,\n Call,\n CallAgent,\n GroupCallLocator,\n PermissionConstraints,\n PropertyChangedEvent,\n TeamsMeetingLinkLocator,\n StartCallOptions,\n VideoDeviceInfo\n} from '@azure/communication-calling';\nimport { TeamsMeetingIdLocator } from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport { AddPhoneNumberOptions, DeviceAccess } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport type { BreakoutRoomsEventData, BreakoutRoomsUpdatedListener, TeamsCall } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { MessageOptions } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeStreamViewResult, TogetherModeStreamOptions } from '@internal/react-components';\nimport {\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n IsMutedChangedListener,\n CallIdChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n DisplayNameChangedListener,\n IsSpeakingChangedListener,\n CallAdapter,\n CallAdapterState,\n CallEndedListener\n} from '../../CallComposite';\nimport {\n MessageReceivedListener,\n MessageReadListener,\n ChatAdapter,\n ChatAdapterState,\n ParticipantsRemovedListener,\n ParticipantsAddedListener,\n MessageEditedListener,\n MessageDeletedListener\n} from '../../ChatComposite';\nimport { ResourceDetails } from '../../ChatComposite';\nimport { CallWithChatAdapter, CallWithChatEvent, ChatInitializedListener } from './CallWithChatAdapter';\nimport {\n callWithChatAdapterStateFromBackingStates,\n CallWithChatAdapterState,\n mergeCallAdapterStateIntoCallWithChatAdapterState,\n mergeChatAdapterStateIntoCallWithChatAdapterState\n} from '../state/CallWithChatAdapterState';\nimport {\n _createAzureCommunicationChatAdapterInner,\n _createLazyAzureCommunicationChatAdapterInner,\n createAzureCommunicationChatAdapterFromClient\n} from '../../ChatComposite/adapter/AzureCommunicationChatAdapter';\nimport { EventEmitter } from 'events';\nimport { CommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';\nimport {\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n PhoneNumberIdentifier\n} from '@azure/communication-common';\nimport { AdapterError } from '../../common/adapters';\n\n/* @conditional-compile-remove(call-participants-locator) */\nimport { CallParticipantsLocator } from '../../CallComposite/adapter/AzureCommunicationCallAdapter';\n\nimport { _createAzureCommunicationCallAdapterInner } from '../../CallComposite/adapter/AzureCommunicationCallAdapter';\n\nimport {\n CallAdapterLocator,\n createAzureCommunicationCallAdapterFromClient\n} from '../../CallComposite/adapter/AzureCommunicationCallAdapter';\nimport { StatefulCallClient } from '@internal/calling-stateful-client';\nimport { StatefulChatClient } from '@internal/chat-stateful-client';\nimport { ChatThreadClient } from '@azure/communication-chat';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { UploadChatImageResult } from '@internal/acs-ui-common';\nimport { useEffect, useRef, useState } from 'react';\nimport { _toCommunicationIdentifier, _TelemetryImplementationHint } from '@internal/acs-ui-common';\nimport {\n JoinCallOptions,\n StartCallIdentifier,\n StartCaptionsAdapterOptions,\n StopCaptionsAdapterOptions\n} from '../../CallComposite/adapter/CallAdapter';\n\nimport { AzureCommunicationCallAdapterOptions } from '../../CallComposite/adapter/AzureCommunicationCallAdapter';\nimport {\n IsCaptionsActiveChangedListener,\n CaptionsReceivedListener,\n IsCaptionLanguageChangedListener,\n IsSpokenLanguageChangedListener\n} from '../../CallComposite/adapter/CallAdapter';\n/* @conditional-compile-remove(rtt) */\nimport { RealTimeTextReceivedListener } from '../../CallComposite/adapter/CallAdapter';\nimport { CapabilitiesChangedListener } from '../../CallComposite/adapter/CallAdapter';\nimport { SpotlightChangedListener } from '../../CallComposite/adapter/CallAdapter';\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { busyWait } from '../../common/utils';\n\ntype CallWithChatAdapterStateChangedHandler = (newState: CallWithChatAdapterState) => void;\n\n/** Context of Call with Chat, which is a centralized context for all state updates */\nclass CallWithChatContext {\n private emitter = new EventEmitter();\n private state: CallWithChatAdapterState;\n\n constructor(clientState: CallWithChatAdapterState, maxListeners = 50) {\n this.state = clientState;\n this.emitter.setMaxListeners(maxListeners);\n }\n\n public onStateChange(handler: CallWithChatAdapterStateChangedHandler): void {\n this.emitter.on('stateChanged', handler);\n }\n\n public offStateChange(handler: CallWithChatAdapterStateChangedHandler): void {\n this.emitter.off('stateChanged', handler);\n }\n\n public setState(state: CallWithChatAdapterState): void {\n this.state = state;\n this.emitter.emit('stateChanged', this.state);\n }\n\n public getState(): CallWithChatAdapterState {\n return this.state;\n }\n\n public updateClientState(clientState: CallWithChatAdapterState): void {\n this.setState(clientState);\n }\n\n public updateClientStateWithChatState(chatAdapterState: ChatAdapterState): void {\n this.updateClientState(mergeChatAdapterStateIntoCallWithChatAdapterState(this.state, chatAdapterState));\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n public unsetChatState(): void {\n this.updateClientState({ ...this.state, chat: undefined });\n }\n\n public updateClientStateWithCallState(callAdapterState: CallAdapterState): void {\n this.updateClientState(mergeCallAdapterStateIntoCallWithChatAdapterState(this.state, callAdapterState));\n }\n}\n\n/**\n * CallWithChat adapter backed by Azure Communication Services.\n * Created for easy use with the {@link CallWithChatComposite}.\n */\nexport class AzureCommunicationCallWithChatAdapter implements CallWithChatAdapter {\n private callAdapter: CallAdapter;\n private chatAdapter: ChatAdapter | undefined;\n private context: CallWithChatContext;\n private emitter: EventEmitter = new EventEmitter();\n private onChatStateChange: (newChatAdapterState: ChatAdapterState) => void;\n private onCallStateChange: (newChatAdapterState: CallAdapterState) => void;\n private isAdapterDisposed: boolean = false;\n /* @conditional-compile-remove(breakout-rooms) */\n private createChatAdapterCallback: ((threadId: string) => Promise<ChatAdapter>) | undefined;\n /* @conditional-compile-remove(breakout-rooms) */\n private originCallChatAdapter: ChatAdapter | undefined;\n /* @conditional-compile-remove(breakout-rooms) */\n private breakoutRoomChatAdapter: ChatAdapter | undefined;\n\n constructor(callAdapter: CallAdapter, chatAdapter?: ChatAdapter) {\n this.bindPublicMethods();\n this.callAdapter = callAdapter;\n this.context = new CallWithChatContext(callWithChatAdapterStateFromBackingStates(callAdapter));\n\n const onChatStateChange = (newChatAdapterState: ChatAdapterState): void => {\n this.context.updateClientStateWithChatState(newChatAdapterState);\n };\n\n this.onChatStateChange = onChatStateChange;\n if (chatAdapter) {\n this.updateChatAdapter(chatAdapter);\n /* @conditional-compile-remove(breakout-rooms) */\n this.originCallChatAdapter = chatAdapter;\n }\n\n const onCallStateChange = (newCallAdapterState: CallAdapterState): void => {\n this.context.updateClientStateWithCallState(newCallAdapterState);\n };\n\n this.callAdapter.onStateChange(onCallStateChange);\n /* @conditional-compile-remove(breakout-rooms) */\n this.callAdapter.on('breakoutRoomsUpdated', async (eventData: BreakoutRoomsEventData) => {\n if (eventData.type === 'join') {\n await this.breakoutRoomJoined(eventData.data);\n } else if (eventData.type === 'assignedBreakoutRooms') {\n if (!eventData.data || eventData.data.state === 'closed') {\n if (\n this.originCallChatAdapter &&\n this.originCallChatAdapter?.getState().thread.threadId !== this.context.getState().chat?.threadId\n ) {\n this.updateChatAdapter(this.originCallChatAdapter);\n }\n }\n }\n });\n /* @conditional-compile-remove(breakout-rooms) */\n this.callAdapter.on('callEnded', () => {\n // If the call ended is a breakout room call with breakout room settings then update the chat adapter to the\n // origin call\n if (this.context.getState().call?.breakoutRooms?.breakoutRoomSettings) {\n // Unsubscribe from chat adapter state changes\n this.chatAdapter?.offStateChange(this.onChatStateChange);\n // Unassign chat adapter\n this.chatAdapter = undefined;\n // Set chat state to undefined to ensure that the chat thread of the breakout room is not shown\n this.context.unsetChatState();\n // Update chat state to the origin call chat adapter\n if (this.originCallChatAdapter) {\n this.updateChatAdapter(this.originCallChatAdapter);\n }\n }\n });\n this.onCallStateChange = onCallStateChange;\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n private async breakoutRoomJoined(call: Call | TeamsCall): Promise<void> {\n const targetThreadId = call.info.threadId;\n\n // If the chat adapter is not on the target thread then we need to switch to the breakout room chat adapter\n if (targetThreadId && this.chatAdapter && this.chatAdapter.getState().thread.threadId !== targetThreadId) {\n // Unsubscribe from chat adapter state changes\n this.chatAdapter.offStateChange(this.onChatStateChange);\n // Set chat state to undefined to prevent showing chat thread of origin call\n this.context.unsetChatState();\n\n // Check if the breakout room chat adapter has been initialized\n this.breakoutRoomChatAdapter = await this.setBreakoutRoomChatAdapterToThread(targetThreadId);\n\n // Wait for the user to be added to the thread of chat adapter before updating the current chat adapter\n // to avoid chat errors of not having access to the chat thread. This delayed access to the chat thread\n // is also seen in Teams\n // Check up to 20 times every 500ms and then continue.\n await busyWait(() => {\n // If the call adapter's call id has been changed, then stop waiting and don't update the chat adapter\n if (this.context.getState().call?.id !== call.id) {\n return true;\n }\n\n const userAddedToThread =\n !!this.breakoutRoomChatAdapter?.getState().thread.participants[\n toFlatCommunicationIdentifier(this.context.getState().userId)\n ];\n return userAddedToThread;\n }, 20);\n\n // If the call adapter's call has been changed while for waiting for breakout room chat adapter to be ready\n // then don't update the chat adapter\n if (this.context.getState().call?.id !== call.id) {\n return;\n }\n\n this.updateChatAdapter(this.breakoutRoomChatAdapter);\n }\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n private async setBreakoutRoomChatAdapterToThread(targetThreadId: string): Promise<ChatAdapter> {\n if (this.breakoutRoomChatAdapter) {\n // If the breakout room chat adapter is not set on the target thread then unsubscribe, dispose, and\n // reinitialize the chat adapter for the target thread\n if (this.breakoutRoomChatAdapter.getState().thread.threadId !== targetThreadId) {\n this.breakoutRoomChatAdapter.offStateChange(this.onChatStateChange);\n this.breakoutRoomChatAdapter.dispose();\n const newBreakoutRoomChatAdapter = await this.createNewChatAdapterForThread(targetThreadId);\n return newBreakoutRoomChatAdapter;\n } else {\n return this.breakoutRoomChatAdapter;\n }\n } else {\n // Initiliaze the breakout room chat adapter for the target thread\n const newBreakoutRoomChatAdapter = await this.createNewChatAdapterForThread(targetThreadId);\n return newBreakoutRoomChatAdapter;\n }\n }\n\n public setChatAdapterPromise(chatAdapter: Promise<ChatAdapter>): void {\n chatAdapter.then((adapter) => {\n if (!this.isAdapterDisposed) {\n this.updateChatAdapter(adapter);\n /* @conditional-compile-remove(breakout-rooms) */\n this.originCallChatAdapter = adapter;\n }\n });\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n public setCreateChatAdapterCallback(chatThreadCallBack: (threadId: string) => Promise<ChatAdapter>): void {\n this.createChatAdapterCallback = chatThreadCallBack;\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n public createNewChatAdapterForThread(threadId: string): Promise<ChatAdapter> {\n if (this.createChatAdapterCallback) {\n return this.createChatAdapterCallback(threadId);\n }\n throw new Error('Unable to create chat adapter for thread because createChatAdapterCallback is not set');\n }\n\n private updateChatAdapter(chatAdapter: ChatAdapter): void {\n this.chatAdapter?.offStateChange(this.onChatStateChange);\n this.chatAdapter = chatAdapter;\n this.chatAdapter.onStateChange(this.onChatStateChange);\n this.context.updateClientStateWithChatState(chatAdapter.getState());\n this.emitter.emit('chatInitialized', this.chatAdapter);\n }\n\n private bindPublicMethods(): void {\n this.joinCall.bind(this);\n this.leaveCall.bind(this);\n this.startCall.bind(this);\n this.onStateChange.bind(this);\n this.offStateChange.bind(this);\n this.getState.bind(this);\n this.dispose.bind(this);\n this.setCamera.bind(this);\n this.setMicrophone.bind(this);\n this.setSpeaker.bind(this);\n this.askDevicePermission.bind(this);\n this.queryCameras.bind(this);\n this.queryMicrophones.bind(this);\n this.querySpeakers.bind(this);\n this.startCamera.bind(this);\n this.stopCamera.bind(this);\n this.mute.bind(this);\n this.unmute.bind(this);\n this.startScreenShare.bind(this);\n this.stopScreenShare.bind(this);\n this.raiseHand.bind(this);\n this.lowerHand.bind(this);\n this.onReactionClick.bind(this);\n this.removeParticipant.bind(this);\n this.createStreamView.bind(this);\n this.disposeStreamView.bind(this);\n this.disposeScreenShareStreamView.bind(this);\n this.fetchInitialData.bind(this);\n this.sendMessage.bind(this);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n this.uploadImage.bind(this);\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n this.deleteImage.bind(this);\n this.sendReadReceipt.bind(this);\n this.sendTypingIndicator.bind(this);\n this.loadPreviousChatMessages.bind(this);\n this.updateMessage.bind(this);\n this.deleteMessage.bind(this);\n this.on.bind(this);\n this.off.bind(this);\n this.downloadResourceToCache = this.downloadResourceToCache.bind(this);\n this.removeResourceFromCache = this.removeResourceFromCache.bind(this);\n this.holdCall.bind(this);\n this.resumeCall.bind(this);\n this.addParticipant.bind(this);\n this.sendDtmfTone.bind(this);\n /* @conditional-compile-remove(unsupported-browser) */\n this.allowUnsupportedBrowserVersion.bind(this);\n this.startCaptions.bind(this);\n this.stopCaptions.bind(this);\n this.setSpokenLanguage.bind(this);\n this.setCaptionLanguage.bind(this);\n /* @conditional-compile-remove(rtt) */\n this.sendRealTimeText.bind(this);\n this.startVideoBackgroundEffect.bind(this);\n this.stopVideoBackgroundEffects.bind(this);\n this.updateBackgroundPickerImages.bind(this);\n this.startNoiseSuppressionEffect.bind(this);\n this.stopNoiseSuppressionEffect.bind(this);\n }\n\n /** Join existing Call. */\n public joinCall(options?: boolean | JoinCallOptions): Call | undefined {\n if (typeof options === 'boolean') {\n return this.callAdapter.joinCall(options);\n } else {\n return this.callAdapter.joinCall(options);\n }\n }\n /** Leave current Call. */\n public async leaveCall(forEveryone?: boolean): Promise<void> {\n // Only remove self from the GroupCall. Contoso must manage access to Chat.\n await this.callAdapter.leaveCall(forEveryone);\n }\n\n /** Start a new Call. */\n public startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /** Start a new Call. */\n public startCall(participants: StartCallIdentifier[], options?: StartCallOptions): Call | undefined;\n /** Start a new Call. */\n public startCall(participants: string[] | StartCallIdentifier[], options?: StartCallOptions): Call | undefined {\n if (participants.length === 0) {\n throw new Error('At least one participant is required to start a call');\n }\n if (typeof participants[0] === 'string') {\n return this.callAdapter.startCall(participants as string[], options);\n } else {\n return this.callAdapter.startCall(participants as StartCallIdentifier[], options);\n }\n }\n /**\n * Subscribe to state change events.\n * @param handler - handler to be called when the state changes. This is passed the new state.\n */\n public onStateChange(handler: (state: CallWithChatAdapterState) => void): void {\n this.context.onStateChange(handler);\n }\n /**\n * Unsubscribe to state change events.\n * @param handler - handler to be no longer called when state changes.\n */\n public offStateChange(handler: (state: CallWithChatAdapterState) => void): void {\n this.context.offStateChange(handler);\n }\n /** Get current Call and Chat state. */\n public getState(): CallWithChatAdapterState {\n return this.context.getState();\n }\n /** Dispose of the current CallWithChatAdapter. */\n public dispose(): void {\n this.isAdapterDisposed = true;\n if (this.chatAdapter) {\n this.chatAdapter.offStateChange(this.onChatStateChange);\n this.chatAdapter.dispose();\n }\n this.callAdapter.offStateChange(this.onCallStateChange);\n this.callAdapter.dispose();\n }\n /** Remove a participant from the Call only. */\n public async removeParticipant(userId: string | CommunicationIdentifier): Promise<void> {\n let participant = userId;\n participant = _toCommunicationIdentifier(userId);\n await this.callAdapter.removeParticipant(participant);\n }\n public async setCamera(device: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> {\n await this.callAdapter.setCamera(device, options);\n }\n /** Set the microphone to be used in the Call. */\n public async setMicrophone(device: AudioDeviceInfo): Promise<void> {\n await this.callAdapter.setMicrophone(device);\n }\n /** Set the speaker to be used in the Call. */\n public async setSpeaker(device: AudioDeviceInfo): Promise<void> {\n await this.callAdapter.setSpeaker(device);\n }\n public async askDevicePermission(constraints: PermissionConstraints): Promise<DeviceAccess> {\n return await this.callAdapter.askDevicePermission(constraints);\n }\n /** Query for available cameras. */\n public async queryCameras(): Promise<VideoDeviceInfo[]> {\n return await this.callAdapter.queryCameras();\n }\n /** Query for available microphones. */\n public async queryMicrophones(): Promise<AudioDeviceInfo[]> {\n return await this.callAdapter.queryMicrophones();\n }\n /** Query for available speakers. */\n public async querySpeakers(): Promise<AudioDeviceInfo[]> {\n return await this.callAdapter.querySpeakers();\n }\n /** Start the camera for the user in the Call. */\n public async startCamera(options?: VideoStreamOptions): Promise<void> {\n await this.callAdapter.startCamera(options);\n }\n /** Stop the camera for the user in the Call. */\n public async stopCamera(): Promise<void> {\n await this.callAdapter.stopCamera();\n }\n /** Mute the user in the Call. */\n public async mute(): Promise<void> {\n await this.callAdapter.mute();\n }\n /** Unmute the user in the Call. */\n public async unmute(): Promise<void> {\n await this.callAdapter.unmute();\n }\n /** Trigger the user to start screen share. */\n public async startScreenShare(): Promise<void> {\n await this.callAdapter.startScreenShare();\n }\n /** Stop the current active screen share. */\n public async stopScreenShare(): Promise<void> {\n await this.callAdapter.stopScreenShare();\n }\n /** Raise hand for local user. */\n public async raiseHand(): Promise<void> {\n await this.callAdapter.raiseHand();\n }\n /** Lower hand for local user. */\n public async lowerHand(): Promise<void> {\n await this.callAdapter.lowerHand();\n }\n /** Reaction clicked by the local user. */\n public async onReactionClick(reaction: Reaction): Promise<void> {\n await this.callAdapter.onReactionClick(reaction);\n }\n /** Create a stream view for a remote participants video feed. */\n public async createStreamView(\n remoteUserId?: string,\n options?: VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> {\n return await this.callAdapter.createStreamView(remoteUserId, options);\n }\n /** Dispose of a created stream view of a remote participants video feed. */\n public async disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void> {\n await this.callAdapter.disposeStreamView(remoteUserId, options);\n }\n /** Dispose of a remote screen share */\n public async disposeScreenShareStreamView(remoteUserId: string): Promise<void> {\n await this.callAdapter.disposeScreenShareStreamView(remoteUserId);\n }\n /** Dispose of a remote video stream */\n public async disposeRemoteVideoStreamView(remoteUserId: string): Promise<void> {\n await this.callAdapter.disposeRemoteVideoStreamView(remoteUserId);\n }\n /** Dispose of the local video stream */\n public async disposeLocalVideoStreamView(): Promise<void> {\n await this.callAdapter.disposeLocalVideoStreamView();\n }\n /* @conditional-compile-remove(together-mode) */\n public async createTogetherModeStreamView(\n options?: TogetherModeStreamOptions\n ): Promise<void | TogetherModeStreamViewResult> {\n return await this.callAdapter.createTogetherModeStreamView(options);\n }\n /* @conditional-compile-remove(together-mode) */\n public async startTogetherMode(): Promise<void> {\n return await this.callAdapter.startTogetherMode();\n }\n /* @conditional-compile-remove(together-mode) */\n public setTogetherModeSceneSize(width: number, height: number): void {\n return this.callAdapter.setTogetherModeSceneSize(width, height);\n }\n /* @conditional-compile-remove(together-mode) */\n public async disposeTogetherModeStreamView(): Promise<void> {\n await this.callAdapter.disposeTogetherModeStreamView();\n }\n /** Fetch initial Call and Chat data such as chat messages. */\n public async fetchInitialData(): Promise<void> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.fetchInitialData();\n });\n }\n /** Send a chat message. */\n public async sendMessage(\n content: string,\n /* @conditional-compile-remove(file-sharing-acs) */\n options?: MessageOptions\n ): Promise<void> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.sendMessage(content, /* @conditional-compile-remove(file-sharing-acs) */ options);\n });\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n /** Upload a chat image. */\n public async uploadImage(image: Blob, imageFileName: string): Promise<UploadChatImageResult> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.uploadImage(image, imageFileName);\n });\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n /** Delete a chat image. */\n public async deleteImage(imageId: string): Promise<void> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.deleteImage(imageId);\n });\n }\n /** Send a chat read receipt. */\n public async sendReadReceipt(chatMessageId: string): Promise<void> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.sendReadReceipt(chatMessageId);\n });\n }\n /** Send an isTyping indicator. */\n public async sendTypingIndicator(): Promise<void> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.sendTypingIndicator();\n });\n }\n /** Load previous Chat messages. */\n public async loadPreviousChatMessages(messagesToLoad: number): Promise<boolean> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.loadPreviousChatMessages(messagesToLoad);\n });\n }\n /** Update an existing message. */\n public async updateMessage(\n messageId: string,\n content: string,\n options?: Record<string, string> | /* @conditional-compile-remove(file-sharing-acs) */ MessageOptions\n ): Promise<void> {\n return this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.updateMessage(messageId, content, options);\n });\n }\n /** Delete an existing message. */\n public async deleteMessage(messageId: string): Promise<void> {\n return await this.executeWithResolvedChatAdapter((adapter) => {\n return adapter.deleteMessage(messageId);\n });\n }\n public async downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void> {\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.downloadResourceToCache(resourceDetails);\n });\n }\n public removeResourceFromCache(resourceDetails: ResourceDetails): void {\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.removeResourceFromCache(resourceDetails);\n });\n }\n public async holdCall(): Promise<void> {\n return await this.callAdapter.holdCall();\n }\n public async resumeCall(): Promise<void> {\n return await this.callAdapter.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 (isCommunicationUserIdentifier(participant)) {\n return await this.callAdapter.addParticipant(participant);\n } else {\n return await this.callAdapter.addParticipant(participant, options);\n }\n }\n\n public async sendDtmfTone(dtmfTone: DtmfTone): Promise<void> {\n return await this.callAdapter.sendDtmfTone(dtmfTone);\n }\n\n /* @conditional-compile-remove(unsupported-browser) */\n public allowUnsupportedBrowserVersion(): void {\n return this.callAdapter.allowUnsupportedBrowserVersion();\n }\n\n public async startCaptions(options?: StartCaptionsAdapterOptions): Promise<void> {\n await this.callAdapter.startCaptions(options);\n }\n\n public async stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void> {\n await this.callAdapter.stopCaptions(options);\n }\n\n public async setCaptionLanguage(language: string): Promise<void> {\n await this.callAdapter.setCaptionLanguage(language);\n }\n\n public async setSpokenLanguage(language: string): Promise<void> {\n await this.callAdapter.setSpokenLanguage(language);\n }\n /* @conditional-compile-remove(rtt) */\n public async sendRealTimeText(text: string, isFinalized: boolean): Promise<void> {\n await this.callAdapter.sendRealTimeText(text, isFinalized);\n }\n\n public async startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void> {\n await this.callAdapter.startVideoBackgroundEffect(videoBackgroundEffect);\n }\n\n public async stopVideoBackgroundEffects(): Promise<void> {\n return await this.callAdapter.stopVideoBackgroundEffects();\n }\n\n public updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void {\n return this.callAdapter.updateBackgroundPickerImages(backgroundImages);\n }\n\n public updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void {\n return this.callAdapter.updateSelectedVideoBackgroundEffect(selectedVideoBackground);\n }\n\n public async startNoiseSuppressionEffect(): Promise<void> {\n return await this.callAdapter.startNoiseSuppressionEffect();\n }\n\n public async stopNoiseSuppressionEffect(): Promise<void> {\n return await this.callAdapter.stopNoiseSuppressionEffect();\n }\n\n public async submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined> {\n return this.callAdapter.submitSurvey(survey);\n }\n\n public async startSpotlight(userIds?: string[]): Promise<void> {\n return this.callAdapter.startSpotlight(userIds);\n }\n\n public async stopSpotlight(userIds?: string[]): Promise<void> {\n return this.callAdapter.stopSpotlight(userIds);\n }\n\n public async stopAllSpotlight(): Promise<void> {\n return this.callAdapter.stopAllSpotlight();\n }\n\n public async muteParticipant(userId: string): Promise<void> {\n return this.callAdapter.muteParticipant(userId);\n }\n\n public async muteAllRemoteParticipants(): Promise<void> {\n return this.callAdapter.muteAllRemoteParticipants();\n }\n\n /* @conditional-compile-remove(breakout-rooms) */\n public async returnFromBreakoutRoom(): Promise<void> {\n if (\n this.originCallChatAdapter &&\n this.context.getState().chat?.threadId !== this.originCallChatAdapter.getState().thread.threadId\n ) {\n this.breakoutRoomChatAdapter?.dispose();\n this.updateChatAdapter(this.originCallChatAdapter);\n }\n\n // Check if breakout room settings are defined to verify the user is in a breakout room before\n // returning to the origin call.\n const breakoutRoomSettings = this.context.getState().call?.breakoutRooms?.breakoutRoomSettings;\n if (breakoutRoomSettings) {\n await this.callAdapter.returnFromBreakoutRoom();\n }\n }\n\n public async forbidAudio(userIds: string[]): Promise<void> {\n return this.callAdapter.forbidAudio(userIds);\n }\n\n public async permitAudio(userIds: string[]): Promise<void> {\n return this.callAdapter.permitAudio(userIds);\n }\n\n public async forbidOthersAudio(): Promise<void> {\n return this.callAdapter.forbidOthersAudio();\n }\n\n public async permitOthersAudio(): Promise<void> {\n return this.callAdapter.permitOthersAudio();\n }\n\n public async forbidVideo(userIds: string[]): Promise<void> {\n return this.callAdapter.forbidVideo(userIds);\n }\n\n public async permitVideo(userIds: string[]): Promise<void> {\n return this.callAdapter.permitVideo(userIds);\n }\n\n public async forbidOthersVideo(): Promise<void> {\n return this.callAdapter.forbidOthersVideo();\n }\n\n public async permitOthersVideo(): Promise<void> {\n return this.callAdapter.permitOthersVideo();\n }\n\n on(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;\n on(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;\n on(event: 'callEnded', listener: CallEndedListener): void;\n on(event: 'callError', listener: (e: AdapterError) => void): 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: 'messageReceived', listener: MessageReceivedListener): void;\n on(event: 'messageEdited', listener: MessageEditedListener): void;\n on(event: 'messageDeleted', listener: MessageDeletedListener): void;\n on(event: 'messageSent', listener: MessageReceivedListener): 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: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n on(event: 'chatError', 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 on(event: 'chatInitialized', listener: ChatInitializedListener): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n on(event: CallWithChatEvent, listener: any): void {\n switch (event) {\n case 'callParticipantsJoined':\n this.callAdapter.on('participantsJoined', listener);\n break;\n case 'callParticipantsLeft':\n this.callAdapter.on('participantsLeft', listener);\n break;\n case 'callEnded':\n this.callAdapter.on('callEnded', listener);\n break;\n case 'isMutedChanged':\n this.callAdapter.on('isMutedChanged', listener);\n break;\n case 'callIdChanged':\n this.callAdapter.on('callIdChanged', listener);\n break;\n case 'isLocalScreenSharingActiveChanged':\n this.callAdapter.on('isLocalScreenSharingActiveChanged', listener);\n break;\n case 'displayNameChanged':\n this.callAdapter.on('displayNameChanged', listener);\n break;\n case 'isSpeakingChanged':\n this.callAdapter.on('isSpeakingChanged', listener);\n break;\n case 'selectedMicrophoneChanged':\n this.callAdapter.on('selectedMicrophoneChanged', listener);\n break;\n case 'selectedSpeakerChanged':\n this.callAdapter.on('selectedSpeakerChanged', listener);\n break;\n case 'captionsReceived':\n this.callAdapter.on('captionsReceived', listener);\n break;\n /* @conditional-compile-remove(rtt) */\n case 'realTimeTextReceived':\n this.callAdapter.on('realTimeTextReceived', listener);\n break;\n case 'isCaptionsActiveChanged':\n this.callAdapter.on('isCaptionsActiveChanged', listener);\n break;\n case 'isCaptionLanguageChanged':\n this.callAdapter.on('isCaptionLanguageChanged', listener);\n break;\n case 'isSpokenLanguageChanged':\n this.callAdapter.on('isSpokenLanguageChanged', listener);\n break;\n case 'messageReceived':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('messageReceived', listener);\n });\n break;\n case 'messageEdited':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('messageEdited', listener);\n });\n break;\n case 'messageDeleted':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('messageDeleted', listener);\n });\n break;\n case 'messageSent':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('messageSent', listener);\n });\n break;\n case 'messageRead':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('messageRead', listener);\n });\n break;\n case 'chatParticipantsAdded':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('participantsAdded', listener);\n });\n break;\n case 'chatParticipantsRemoved':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('participantsRemoved', listener);\n });\n break;\n case 'callError':\n this.callAdapter.on('error', listener);\n break;\n case 'chatError':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.on('error', listener);\n });\n break;\n case 'chatInitialized':\n this.emitter.on(event, listener);\n break;\n case 'capabilitiesChanged':\n this.callAdapter.on('capabilitiesChanged', listener);\n break;\n case 'spotlightChanged':\n this.callAdapter.on('spotlightChanged', listener);\n break;\n /* @conditional-compile-remove(breakout-rooms) */\n case 'breakoutRoomsUpdated':\n this.callAdapter.on('breakoutRoomsUpdated', listener);\n break;\n default:\n throw `Unknown AzureCommunicationCallWithChatAdapter Event: ${event}`;\n }\n }\n\n off(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;\n off(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;\n off(event: 'callEnded', listener: CallEndedListener): void;\n off(event: 'callError', listener: (e: AdapterError) => void): 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: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\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: MessageReceivedListener): 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 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 off(event: 'chatInitialized', listener: ChatInitializedListener): void;\n /* @conditional-compile-remove(breakout-rooms) */\n off(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n off(event: CallWithChatEvent, listener: any): void {\n switch (event as unknown) {\n case 'callParticipantsJoined':\n this.callAdapter.off('participantsJoined', listener);\n break;\n case 'callParticipantsLeft':\n this.callAdapter.off('participantsLeft', listener);\n break;\n case 'callEnded':\n this.callAdapter.off('callEnded', listener);\n break;\n case 'isMutedChanged':\n this.callAdapter.off('isMutedChanged', listener);\n break;\n case 'callIdChanged':\n this.callAdapter.off('callIdChanged', listener);\n break;\n case 'isLocalScreenSharingActiveChanged':\n this.callAdapter.off('isLocalScreenSharingActiveChanged', listener);\n break;\n case 'displayNameChanged':\n this.callAdapter.off('displayNameChanged', listener);\n break;\n case 'isSpeakingChanged':\n this.callAdapter.off('isSpeakingChanged', listener);\n break;\n case 'selectedMicrophoneChanged':\n this.callAdapter.off('selectedMicrophoneChanged', listener);\n break;\n case 'selectedSpeakerChanged':\n this.callAdapter.off('selectedSpeakerChanged', listener);\n break;\n case 'captionsReceived':\n this.callAdapter.off('captionsReceived', listener);\n break;\n /* @conditional-compile-remove(rtt) */\n case 'realTimeTextReceived':\n this.callAdapter.off('realTimeTextReceived', listener);\n break;\n case 'isCaptionsActiveChanged':\n this.callAdapter.off('isCaptionsActiveChanged', listener);\n break;\n case 'isCaptionLanguageChanged':\n this.callAdapter.off('isCaptionLanguageChanged', listener);\n break;\n case 'isSpokenLanguageChanged':\n this.callAdapter.off('isSpokenLanguageChanged', listener);\n break;\n case 'messageReceived':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('messageReceived', listener);\n });\n break;\n case 'messageEdited':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('messageEdited', listener);\n });\n break;\n case 'messageDeleted':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('messageDeleted', listener);\n });\n break;\n case 'messageSent':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('messageSent', listener);\n });\n break;\n case 'messageRead':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('messageRead', listener);\n });\n break;\n case 'chatParticipantsAdded':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('participantsAdded', listener);\n });\n break;\n case 'chatParticipantsRemoved':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('participantsRemoved', listener);\n });\n break;\n case 'callError':\n this.callAdapter.off('error', listener);\n break;\n case 'chatError':\n this.executeWithResolvedChatAdapter((adapter) => {\n adapter.off('error', listener);\n });\n break;\n case 'chatInitialized':\n this.emitter.off(event, listener);\n break;\n case 'capabilitiesChanged':\n this.callAdapter.off('capabilitiesChanged', listener);\n break;\n case 'spotlightChanged':\n this.callAdapter.off('spotlightChanged', listener);\n break;\n /* @conditional-compile-remove(breakout-rooms) */\n case 'breakoutRoomsUpdated':\n this.callAdapter.off('breakoutRoomsUpdated', listener);\n break;\n default:\n throw `Unknown AzureCommunicationCallWithChatAdapter Event: ${event}`;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private executeWithResolvedChatAdapter(callback: (adapter: ChatAdapter) => any): any {\n if (!this.chatAdapter) {\n console.error('Chat is not initialized');\n } else {\n return callback(this.chatAdapter);\n }\n }\n}\n\n/**\n * Provides a way to get the chat thread ID for a given locator.\n *\n * @private\n */\nexport interface ChatThreadProvider {\n isCallInfoRequired(): boolean;\n getChatThreadPromise(): Promise<string>;\n getChatThread(): string;\n}\n\n/**\n * Arguments for use in {@link createAzureCommunicationCallWithChatAdapter} to join a Group Call with an associated Chat thread.\n * @private\n */\nexport class CallAndChatProvider implements ChatThreadProvider {\n public locator: CallAndChatLocator;\n\n constructor(locator: CallAndChatLocator) {\n this.locator = locator;\n }\n public isCallInfoRequired(): boolean {\n return false;\n }\n public async getChatThreadPromise(): Promise<string> {\n return this.getChatThread();\n }\n\n public getChatThread(): string {\n return this.locator.chatThreadId;\n }\n}\n\n/**\n * Arguments for use in {@link createAzureCommunicationCallWithChatAdapter} to join a Teams meeting with an associated Chat thread.\n *\n * @private\n */\nexport class TeamsMeetingLinkProvider implements ChatThreadProvider {\n public locator: TeamsMeetingLinkLocator;\n private callAdapterPromise: Promise<CallAdapter>;\n private callAdapterSubscription?: (state: CallAdapterState) => void;\n\n constructor(locator: TeamsMeetingLinkLocator, callAdapterPromise: Promise<CallAdapter>) {\n this.locator = locator;\n this.callAdapterPromise = callAdapterPromise;\n }\n\n public isCallInfoRequired(): boolean {\n return true;\n }\n\n public getChatThread(): string {\n throw new Error('Chat thread ID should be retrieved from call.callInfo using method getChatThreadPromise');\n }\n\n public async getChatThreadPromise(): Promise<string> {\n {\n // Wait for the call to be connected and get the chat thread ID from `call.callInfo`.\n const chatThreadPromise = new Promise<string>((resolve) => {\n this.callAdapterPromise.then((callAdapter) => {\n // Ensure function is idempotent by removing any existing subscription.\n this.callAdapterSubscription && callAdapter.offStateChange(this.callAdapterSubscription);\n\n this.callAdapterSubscription = (state: CallAdapterState): void => {\n if (state.call?.state === 'Connected' && state.call.info?.threadId) {\n this.callAdapterSubscription && callAdapter.offStateChange(this.callAdapterSubscription);\n this.callAdapterSubscription = undefined;\n\n resolve(state.call.info?.threadId);\n }\n };\n callAdapter.onStateChange(this.callAdapterSubscription);\n });\n });\n\n return chatThreadPromise;\n }\n }\n}\n\n/**\n * Arguments for use in {@link createAzureCommunicationCallWithChatAdapter} to join a Teams meeting using meeting id.\n *\n * @private\n */\nexport class TeamsMeetingIdProvider implements ChatThreadProvider {\n public locator: TeamsMeetingIdLocator;\n private callAdapter: Promise<CallAdapter>;\n\n constructor(locator: TeamsMeetingIdLocator, callAdapter: Promise<CallAdapter>) {\n this.locator = locator;\n this.callAdapter = callAdapter;\n }\n public isCallInfoRequired(): boolean {\n return true;\n }\n public getChatThread(): string {\n throw new Error('Chat thread ID is not available for Teams meeting ID');\n }\n\n /**\n * Wait call to be connected to get thread ID.\n * @returns the chat thread ID for the given meeting ID.\n */\n public async getChatThreadPromise(): Promise<string> {\n return new Promise<string>((resolve) => {\n const stateChangeListener = (state: CallAdapterState): void => {\n if (state.call?.state === 'Connected' && state.call.info?.threadId) {\n this.callAdapter.then((adapter) => {\n adapter.offStateChange(stateChangeListener);\n });\n resolve(state.call.info?.threadId);\n }\n };\n\n this.callAdapter.then((adapter) => {\n const callState = adapter.getState().call?.state;\n const threadId = adapter.getState().call?.info?.threadId;\n if (callState === 'Connected' && threadId) {\n resolve(threadId);\n } else {\n adapter.onStateChange(stateChangeListener);\n }\n });\n });\n }\n}\n\n/**\n * Combination of available adapters for use in {@link createAzureCommunicationCallWithChatAdapter}.\n * @public\n */\nexport type CommunicationAdapter = CallAndChatProvider | TeamsMeetingLinkProvider | TeamsMeetingIdProvider;\n\n/**\n * Arguments for use in {@link createAzureCommunicationCallWithChatAdapter} to join a Call with an associated Chat thread.\n *\n * @public\n */\nexport interface CallAndChatLocator {\n /** Locator used by {@link createAzureCommunicationCallWithChatAdapter} to locate the call to join */\n callLocator: GroupCallLocator | /* @conditional-compile-remove(call-participants-locator) */ CallParticipantsLocator;\n /** Chat thread ID used by {@link createAzureCommunicationCallWithChatAdapter} to locate the chat thread to join */\n chatThreadId: string;\n}\n\n/**\n * Arguments for {@link createAzureCommunicationCallWithChatAdapter}\n *\n * @public\n */\nexport type AzureCommunicationCallWithChatAdapterArgs = {\n endpoint: string;\n userId: CommunicationUserIdentifier;\n displayName: string;\n credential: CommunicationTokenCredential;\n locator: CallAndChatLocator | TeamsMeetingLinkLocator | TeamsMeetingIdLocator;\n alternateCallerId?: string;\n callAdapterOptions?: AzureCommunicationCallAdapterOptions;\n};\n\n/**\n * Create a CallWithChatAdapter backed by Azure Communication services\n * to plug into the {@link CallWithChatComposite}.\n *\n * @public\n */\nexport const createAzureCommunicationCallWithChatAdapter = async ({\n userId,\n displayName,\n credential,\n endpoint,\n locator,\n alternateCallerId,\n callAdapterOptions\n}: AzureCommunicationCallWithChatAdapterArgs): Promise<CallWithChatAdapter> => {\n const callAdapterLocator = isTeamsMeetingLocator(locator) ? locator : locator.callLocator;\n const callAdapter = _createAzureCommunicationCallAdapterInner({\n userId,\n displayName,\n credential,\n locator: callAdapterLocator,\n alternateCallerId,\n options: callAdapterOptions,\n telemetryImplementationHint: 'CallWithChat' as _TelemetryImplementationHint\n });\n\n const chatThreadAdapter = _createChatThreadAdapterInner(locator, callAdapter);\n if (chatThreadAdapter.isCallInfoRequired()) {\n const callWithChatAdapter = new AzureCommunicationCallWithChatAdapter(await callAdapter);\n const chatAdapterPromise = _createLazyAzureCommunicationChatAdapterInner(\n endpoint,\n userId,\n displayName,\n credential,\n chatThreadAdapter.getChatThreadPromise(),\n 'CallWithChat' as _TelemetryImplementationHint\n );\n callWithChatAdapter.setChatAdapterPromise(chatAdapterPromise);\n /* @conditional-compile-remove(breakout-rooms) */\n callWithChatAdapter.setCreateChatAdapterCallback((threadId: string) =>\n _createAzureCommunicationChatAdapterInner(\n endpoint,\n userId,\n displayName,\n credential,\n threadId,\n 'CallWithChat' as _TelemetryImplementationHint\n )\n );\n return callWithChatAdapter;\n } else {\n const chatAdapter = _createAzureCommunicationChatAdapterInner(\n endpoint,\n userId,\n displayName,\n credential,\n chatThreadAdapter.getChatThread(),\n 'CallWithChat' as _TelemetryImplementationHint\n );\n\n const callWithChatAdapter = new AzureCommunicationCallWithChatAdapter(await callAdapter, await chatAdapter);\n /* @conditional-compile-remove(breakout-rooms) */\n callWithChatAdapter.setCreateChatAdapterCallback((threadId: string) =>\n _createAzureCommunicationChatAdapterInner(\n endpoint,\n userId,\n displayName,\n credential,\n threadId,\n 'CallWithChat' as _TelemetryImplementationHint\n )\n );\n return callWithChatAdapter;\n }\n};\n\n/**\n * A custom React hook to simplify the creation of {@link CallWithChatAdapter}.\n *\n * Similar to {@link createAzureCommunicationCallWithChatAdapter}, but takes care of asynchronous\n * creation of the adapter internally.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n *\n * Note that you must memoize the arguments to avoid recreating adapter on each render.\n * See storybook for typical usage examples.\n *\n * @public\n */\nexport const useAzureCommunicationCallWithChatAdapter = (\n /**\n * Arguments to be passed to {@link createAzureCommunicationCallWithChatAdapter}.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n */\n args: Partial<AzureCommunicationCallWithChatAdapterArgs>,\n /**\n * Optional callback to modify the adapter once it is created.\n *\n * If set, must return the modified adapter.\n */\n afterCreate?: (adapter: CallWithChatAdapter) => Promise<CallWithChatAdapter>,\n /**\n * Optional callback called before the adapter is disposed.\n *\n * This is useful for clean up tasks, e.g., leaving any ongoing calls.\n */\n beforeDispose?: (adapter: CallWithChatAdapter) => Promise<void>\n): CallWithChatAdapter | undefined => {\n const { credential, displayName, endpoint, locator, userId, alternateCallerId, callAdapterOptions } = args;\n\n // State update needed to rerender the parent component when a new adapter is created.\n const [adapter, setAdapter] = useState<CallWithChatAdapter | undefined>(undefined);\n // Ref needed for cleanup to access the old adapter created asynchronously.\n const adapterRef = useRef<CallWithChatAdapter | undefined>(undefined);\n const creatingAdapterRef = useRef<boolean>(false);\n\n const afterCreateRef = useRef<((adapter: CallWithChatAdapter) => Promise<CallWithChatAdapter>) | undefined>(\n undefined\n );\n const beforeDisposeRef = useRef<((adapter: CallWithChatAdapter) => Promise<void>) | undefined>(undefined);\n // These refs are updated on *each* render, so that the latest values\n // are used in the `useEffect` closures below.\n // Using a Ref ensures that new values for the callbacks do not trigger the\n // useEffect blocks, and a new adapter creation / distruction is not triggered.\n afterCreateRef.current = afterCreate;\n beforeDisposeRef.current = beforeDispose;\n\n useEffect(\n () => {\n if (!credential || !displayName || !endpoint || !locator || !userId) {\n return;\n }\n (async () => {\n if (adapterRef.current) {\n // Dispose the old adapter when a new one is created.\n //\n // This clean up function uses `adapterRef` because `adapter` can not be added to the dependency array of\n // this `useEffect` -- we do not want to trigger a new adapter creation because of the first adapter\n // creation.\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n if (creatingAdapterRef.current) {\n console.warn(\n 'Adapter is already being created, please see storybook for more information: https://azure.github.io/communication-ui-library/?path=/story/troubleshooting--page'\n );\n return;\n }\n creatingAdapterRef.current = true;\n let newAdapter = await createAzureCommunicationCallWithChatAdapter({\n credential,\n displayName,\n endpoint,\n locator,\n userId,\n alternateCallerId,\n callAdapterOptions\n });\n if (afterCreateRef.current) {\n newAdapter = await afterCreateRef.current(newAdapter);\n }\n adapterRef.current = newAdapter;\n creatingAdapterRef.current = false;\n setAdapter(newAdapter);\n })();\n },\n // Explicitly list all arguments so that caller doesn't have to memoize the `args` object.\n [\n adapterRef,\n afterCreateRef,\n alternateCallerId,\n beforeDisposeRef,\n credential,\n displayName,\n endpoint,\n locator,\n userId,\n callAdapterOptions\n ]\n );\n\n // Dispose any existing adapter when the component unmounts.\n useEffect(() => {\n return () => {\n (async () => {\n if (adapterRef.current) {\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n })();\n };\n }, []);\n\n return adapter;\n};\n\n/**\n * Arguments for {@link createAzureCommunicationCallWithChatAdapterFromClient}\n *\n * @public\n */\nexport type AzureCommunicationCallWithChatAdapterFromClientArgs = {\n callLocator: CallAdapterLocator | TeamsMeetingLinkLocator;\n callAgent: CallAgent;\n callClient: StatefulCallClient;\n chatClient: StatefulChatClient;\n chatThreadClient: ChatThreadClient;\n\n callAdapterOptions?: AzureCommunicationCallAdapterOptions;\n};\n\n/**\n * Create a {@link CallWithChatAdapter} using the provided {@link StatefulChatClient} and {@link StatefulCallClient}.\n *\n * Useful if you want to keep a reference to {@link StatefulChatClient} and {@link StatefulCallClient}.\n * Please note that chatThreadClient has to be created by StatefulChatClient via chatClient.getChatThreadClient(chatThreadId) API.\n * Consider using {@link createAzureCommunicationCallWithChatAdapter} for a simpler API.\n *\n * @public\n */\nexport const createAzureCommunicationCallWithChatAdapterFromClients = async ({\n callClient,\n callAgent,\n callLocator,\n chatClient,\n chatThreadClient,\n callAdapterOptions\n}: AzureCommunicationCallWithChatAdapterFromClientArgs): Promise<CallWithChatAdapter> => {\n const callAdapter = await createAzureCommunicationCallAdapterFromClient(\n callClient,\n callAgent,\n callLocator,\n\n callAdapterOptions\n );\n const chatAdapter = await createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient);\n const callWithChatAdapter = new AzureCommunicationCallWithChatAdapter(callAdapter, chatAdapter);\n /* @conditional-compile-remove(breakout-rooms) */\n callWithChatAdapter.setCreateChatAdapterCallback((threadId: string) =>\n createAzureCommunicationChatAdapterFromClient(chatClient, chatClient.getChatThreadClient(threadId))\n );\n return callWithChatAdapter;\n};\n\n/**\n * Create a {@link CallWithChatAdapter} from the underlying adapters.\n *\n * This is an internal factory function used by browser tests to inject fake adapters for call and chat.\n *\n * @internal\n */\nexport const _createAzureCommunicationCallWithChatAdapterFromAdapters = (\n callAdapter: CallAdapter,\n chatAdapter: ChatAdapter\n): CallWithChatAdapter => new AzureCommunicationCallWithChatAdapter(callAdapter, chatAdapter);\n\nconst isTeamsMeetingLocator = (\n locator: CallAndChatLocator | TeamsMeetingLinkLocator | TeamsMeetingIdLocator\n): locator is TeamsMeetingLinkLocator | TeamsMeetingIdLocator => {\n return 'meetingLink' in locator || 'meetingId' in locator;\n};\n\nconst _createChatThreadAdapterInner = (\n locator: CallAndChatLocator | TeamsMeetingLinkLocator | TeamsMeetingIdLocator,\n adapter: Promise<CallAdapter>\n): ChatThreadProvider => {\n if ('meetingLink' in locator) {\n return new TeamsMeetingLinkProvider(locator, adapter);\n }\n if ('meetingId' in locator) {\n return new TeamsMeetingIdProvider(locator, adapter);\n }\n return new CallAndChatProvider(locator);\n};\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@azure/communication-react",
|
3
|
-
"version": "1.25.0-alpha-
|
3
|
+
"version": "1.25.0-alpha-202503060017",
|
4
4
|
"sideEffects": false,
|
5
5
|
"description": "React library for building modern communication user experiences utilizing Azure Communication Services",
|
6
6
|
"keywords": [
|