@azure/communication-react 1.19.0-alpha-202409060015 → 1.19.0-alpha-202409070015

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.
Files changed (43) hide show
  1. package/dist/communication-react.d.ts +24 -12
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-d2PFi3-l.js → ChatMessageComponentAsRichTextEditBox-DFzIZcdr.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-d2PFi3-l.js.map → ChatMessageComponentAsRichTextEditBox-DFzIZcdr.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DSiJTLwu.js → RichTextSendBoxWrapper-Bcr0yV14.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DSiJTLwu.js.map → RichTextSendBoxWrapper-Bcr0yV14.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-CKU6pfS7.js → index-CczmcjJ7.js} +59 -55
  7. package/dist/dist-cjs/communication-react/index-CczmcjJ7.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +1 -1
  12. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  13. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -1
  14. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +4 -5
  15. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  16. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js +1 -1
  17. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +13 -8
  19. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +14 -16
  20. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +7 -0
  22. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +3 -1
  24. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +3 -4
  26. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +1 -1
  27. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  28. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -1
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/ParticipantSubcriber.d.ts +1 -1
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/ParticipantSubcriber.js.map +1 -1
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SvgWithWordWrapping.d.ts +1 -0
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SvgWithWordWrapping.js +2 -2
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SvgWithWordWrapping.js.map +1 -1
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +1 -1
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  37. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +10 -3
  38. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  39. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +1 -1
  40. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  41. package/dist/tsdoc-metadata.json +1 -1
  42. package/package.json +2 -1
  43. package/dist/dist-cjs/communication-react/index-CKU6pfS7.js.map +0 -1
@@ -114,7 +114,7 @@ export type CallAdapterClientState = {
114
114
  /**
115
115
  * State to track whether the noise suppression should be on by default.
116
116
  * @beta
117
- * @default false
117
+ * @default true
118
118
  */
119
119
  deepNoiseSuppressionOnByDefault?: boolean;
120
120
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"CallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/CallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAuElC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB;IACjD,0BAA0B;IAC1B,8BAA8B;IAC9B,UAAU;IACV,iBAAiB;IACjB,sDAAsD,CAAC,wBAAwB;CAChF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallState, DeviceManagerState } from '@internal/calling-stateful-client';\nimport { CaptionsInfo } from '@internal/calling-stateful-client';\nimport type { BackgroundBlurConfig, BackgroundReplacementConfig } from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport type { CapabilitiesChangeInfo } from '@azure/communication-calling';\nimport type { SpotlightedParticipant } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\nimport { TransferEventArgs } from '@azure/communication-calling';\nimport { StartCaptionsOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport type { BreakoutRoomsUpdatedListener } from '@azure/communication-calling';\nimport type {\n AudioDeviceInfo,\n VideoDeviceInfo,\n Call,\n PermissionConstraints,\n RemoteParticipant,\n StartCallOptions,\n MediaDiagnosticChangedEventArgs,\n NetworkDiagnosticChangedEventArgs,\n PropertyChangedEvent\n} from '@azure/communication-calling';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport type {\n CommunicationIdentifierKind,\n MicrosoftTeamsAppIdentifier,\n UnknownIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(teams-adhoc-call) */\nimport type { MicrosoftTeamsUserIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { CommunicationIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport type { CommunicationUserIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';\nimport type { AdapterState, Disposable, AdapterError, AdapterErrors } from '../../common/adapters';\n/* @conditional-compile-remove(breakout-rooms) */\nimport type { AdapterNotifications } from '../../common/adapters';\n\nimport { VideoBackgroundEffectsDependency } from '@internal/calling-component-bindings';\n\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\nimport { ReactionResources } from '@internal/react-components';\n/* @conditional-compile-remove(DNS) */\nimport { DeepNoiseSuppressionEffectDependency } from '@internal/calling-component-bindings';\n\n/**\n * Major UI screens shown in the {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositePage =\n | 'accessDeniedTeamsMeeting'\n | 'call'\n | 'configuration'\n | /* @conditional-compile-remove(PSTN-calls) */ 'hold'\n | 'joinCallFailedDueToNoNetwork'\n | 'leftCall'\n | 'leaving'\n | 'lobby'\n | 'removedFromCall'\n | /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment'\n | 'transferring'\n | 'badRequest';\n\n/**\n * Subset of CallCompositePages that represent an end call state.\n * @private\n */\nexport const END_CALL_PAGES: CallCompositePage[] = [\n 'accessDeniedTeamsMeeting',\n 'joinCallFailedDueToNoNetwork',\n 'leftCall',\n 'removedFromCall',\n /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment'\n];\n\n/**\n * {@link CommonCallAdapter} state for pure UI purposes.\n *\n * @public\n */\nexport type CallAdapterUiState = {\n isLocalPreviewMicrophoneEnabled: boolean;\n page: CallCompositePage;\n /* @conditional-compile-remove(unsupported-browser) */\n unsupportedBrowserVersionsAllowed?: boolean;\n};\n\n/**\n * Identifier types for initiating a call using the CallAdapter\n * @public\n */\nexport type StartCallIdentifier =\n | (\n | MicrosoftTeamsAppIdentifier\n | /* @conditional-compile-remove(PSTN-calls) */ PhoneNumberIdentifier\n | /* @conditional-compile-remove(one-to-n-calling) */ CommunicationUserIdentifier\n | /* @conditional-compile-remove(teams-adhoc-call) */ MicrosoftTeamsUserIdentifier\n | UnknownIdentifier\n )\n | /* @conditional-compile-remove(start-call-beta) */ CommunicationIdentifier;\n\n/**\n * {@link CommonCallAdapter} state inferred from Azure Communication Services backend.\n *\n * @public\n */\nexport type CallAdapterClientState = {\n userId: CommunicationIdentifierKind;\n displayName?: string;\n call?: CallState;\n /**\n * State to track who the original call went out to. will be undefined the call is not a outbound\n * modality. This includes, groupCalls, Rooms calls, and Teams InteropMeetings.\n */\n targetCallees?: CommunicationIdentifier[];\n devices: DeviceManagerState;\n endedCall?: CallState;\n /**\n * State to track whether the call is a teams call.\n */\n isTeamsCall: boolean;\n /**\n * State to track whether the call is a teams meeting.\n */\n isTeamsMeeting: boolean;\n /**\n * State to track whether the call is a rooms call.\n */\n isRoomsCall: boolean;\n /**\n * Latest error encountered for each operation performed via the adapter.\n */\n latestErrors: AdapterErrors;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Latest notifications from call client state.\n */\n latestNotifications: AdapterNotifications;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Azure communications Phone number to make PSTN calls with.\n */\n alternateCallerId?: string;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Environment information about system the adapter is made on\n */\n environmentInfo?: EnvironmentInfo;\n /**\n * State to track whether the local participant's camera is on. To be used when creating a custom\n * control bar with the CallComposite.\n */\n cameraStatus?: 'On' | 'Off';\n\n /**\n * Default set of background images for background replacement effect.\n */\n videoBackgroundImages?: VideoBackgroundImage[];\n\n /**\n * Dependency to be injected for video background effect.\n */\n onResolveVideoEffectDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n /* @conditional-compile-remove(DNS) */\n /**\n * Dependency to be injected for deep noise suppression effect.\n * @beta\n */\n onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;\n /* @conditional-compile-remove(DNS) */\n /**\n * State to track whether the noise suppression should be on by default.\n * @beta\n * @default false\n */\n deepNoiseSuppressionOnByDefault?: boolean;\n /* @conditional-compile-remove(DNS) */\n /**\n * State to track whether to hide the noise suppression button.\n * @beta\n * @default false\n */\n hideNoiseSuppressionButton?: boolean;\n /**\n * State to track the selected video background effect.\n */\n selectedVideoBackgroundEffect?: VideoBackgroundEffect;\n /**\n * Call from transfer request accepted by local user\n */\n acceptedTransferCallState?: CallState;\n /* @conditional-compile-remove(hide-attendee-name) */\n /**\n * Hide attendee names in teams meeting\n */\n hideAttendeeNames?: boolean;\n /**\n * State to track the sounds to be used in the call.\n */\n sounds?: CallingSounds;\n /**\n * State to track the reactions to be used.\n * @public\n */\n reactions?: ReactionResources;\n};\n\n/**\n * {@link CommonCallAdapter} state.\n *\n * @public\n */\nexport type CallAdapterState = CallAdapterUiState & CallAdapterClientState;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsJoined' event.\n *\n * @public\n */\nexport type ParticipantsJoinedListener = (event: { joined: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsLeft' event.\n *\n * @public\n */\nexport type ParticipantsLeftListener = (event: { removed: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isMuted' event.\n *\n * @public\n */\nexport type IsMutedChangedListener = (event: { identifier: CommunicationIdentifierKind; isMuted: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callIdChanged' event.\n *\n * @public\n */\nexport type CallIdChangedListener = (event: { callId: string }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isLocalScreenSharingActiveChanged' event.\n *\n * @public\n */\nexport type IsLocalScreenSharingActiveChangedListener = (event: { isScreenSharingOn: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isSpeakingChanged' event.\n *\n * @public\n */\nexport type IsSpeakingChangedListener = (event: {\n identifier: CommunicationIdentifierKind;\n isSpeaking: boolean;\n}) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'displayNameChanged' event.\n *\n * @public\n */\nexport type DisplayNameChangedListener = (event: {\n participantId: CommunicationIdentifierKind;\n displayName: string;\n}) => void;\n\n/**\n * Payload for {@link CallEndedListener} containing details on the ended call.\n *\n * @public\n */\nexport type CallAdapterCallEndedEvent = { callId: string };\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callEnded' event.\n *\n * @public\n */\nexport type CallEndedListener = (event: CallAdapterCallEndedEvent) => void;\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a media diagnostic.\n *\n * @public\n */\nexport type MediaDiagnosticChangedEvent = MediaDiagnosticChangedEventArgs & {\n type: 'media';\n};\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a network diagnostic.\n *\n * @public\n */\nexport type NetworkDiagnosticChangedEvent = NetworkDiagnosticChangedEventArgs & {\n type: 'network';\n};\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'diagnosticChanged' event.\n *\n * @public\n */\nexport type DiagnosticChangedEventListner = (\n event: MediaDiagnosticChangedEvent | NetworkDiagnosticChangedEvent\n) => void;\n\n/**\n * Contains the attibutes of a background image like url, name etc.\n *\n * @public\n */\nexport interface VideoBackgroundImage {\n /**\n * key for unique identification of the custom background\n */\n key: string;\n /**\n * URL of the uploaded background image.\n */\n url: string;\n /**\n * Image name to be displayed.\n */\n tooltipText?: string;\n}\n\n/**\n * @public\n * Type for representing a custom sound to use for a calling event\n */\nexport type SoundEffect = {\n /**\n * Path to sound effect\n */\n url: string;\n};\n\n/**\n * @public\n * Type for representing a set of sounds to use for different calling events\n */\nexport type CallingSounds = {\n /**\n * Sound to be played when the call ends\n */\n callEnded?: SoundEffect;\n /**\n * Sound to be played when the call is ringing\n */\n callRinging?: SoundEffect;\n /**\n * Sound to be played when the call is rejected by the user being callede\n */\n callBusy?: SoundEffect;\n};\n\n/**\n * Options for setting microphone and camera state when joining a call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @public\n */\nexport interface JoinCallOptions {\n /**\n * microphone state when joining call\n * true: turn on\n * false: turn off\n * 'keep': maintain precall state\n */\n microphoneOn?: boolean | 'keep';\n /**\n * camera state when joining call\n * true: turn on\n * false: turn off\n * 'keep': maintain precall state\n */\n cameraOn?: boolean | 'keep';\n}\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'captionsReceived' event.\n *\n * @public\n */\nexport type CaptionsReceivedListener = (event: { captionsInfo: CaptionsInfo }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isCaptionsActiveChanged' event.\n *\n * @public\n */\nexport type IsCaptionsActiveChangedListener = (event: { isActive: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isCaptionLanguageChanged' event.\n *\n * @public\n */\nexport type IsCaptionLanguageChangedListener = (event: { activeCaptionLanguage: string }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isSpokenLanguageChanged' event.\n *\n * @public\n */\nexport type IsSpokenLanguageChangedListener = (event: { activeSpokenLanguage: string }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'transferRequested' event.\n *\n * @public\n */\nexport type TransferAcceptedListener = (event: TransferEventArgs) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'capabilitiesChanged' event.\n *\n * @public\n */\nexport type CapabilitiesChangedListener = (data: CapabilitiesChangeInfo) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'spotlightChanged' event.\n *\n * @public\n */\nexport type SpotlightChangedListener = (args: {\n added: SpotlightedParticipant[];\n removed: SpotlightedParticipant[];\n}) => void;\n\n/**\n * Contains the attibutes of a selected video background effect\n *\n * @public\n */\nexport type VideoBackgroundEffect =\n | VideoBackgroundNoEffect\n | VideoBackgroundBlurEffect\n | VideoBackgroundReplacementEffect;\n\n/**\n * Contains the attibutes to remove video background effect\n *\n * @public\n */\nexport interface VideoBackgroundNoEffect {\n /**\n * Name of effect to remove video background effect\n */\n effectName: 'none';\n}\n\n/**\n * Contains the attibutes of the blur video background effect\n *\n * @public\n */\nexport interface VideoBackgroundBlurEffect extends BackgroundBlurConfig {\n /**\n * Name of effect to blur video background effect\n */\n effectName: 'blur';\n}\n\n/**\n * Contains the attibutes of a selected replacement video background effect\n *\n * @public\n */\nexport interface VideoBackgroundReplacementEffect extends BackgroundReplacementConfig {\n /**\n * Name of effect to replace video background effect\n */\n effectName: 'replacement';\n /**\n * key for unique identification of the custom background\n */\n key?: string;\n}\n\n/**\n * Options passed to adapter.startCaptions\n *\n * @public\n */\nexport interface StartCaptionsAdapterOptions extends StartCaptionsOptions {\n /**\n * Start captions in the background without showing the captions UI to the Composite user.\n *\n * @defaultValue false\n */\n startInBackground?: boolean;\n}\n\n/**\n * Options passed to adapter.stopCaptions\n *\n * @public\n */\nexport interface StopCaptionsAdapterOptions {\n /**\n * Stop captions that have been started in the background.\n *\n * @remarks\n * This option is only applicable when stopping captions that have been started using the `startInBackground` property of adpater.startCaptions.\n *\n * @defaultValue false\n */\n stopInBackground?: boolean;\n}\n\n/**\n * Functionality for managing the current call.\n *\n * @public\n */\nexport interface CallAdapterCallOperations {\n /**\n * Leave the call\n *\n * @param forEveryone - Whether to remove all participants when leaving\n *\n * @public\n */\n leaveCall(forEveryone?: boolean): Promise<void>;\n /**\n * Start the camera\n * This method will start rendering a local camera view when the call is not active\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n startCamera(options?: VideoStreamOptions): Promise<void>;\n /**\n * Stop the camera\n * This method will stop rendering a local camera view when the call is not active\n *\n * @public\n */\n stopCamera(): Promise<void>;\n /**\n * Mute the current user during the call or disable microphone locally\n *\n * @public\n */\n mute(): Promise<void>;\n /**\n * Unmute the current user during the call or enable microphone locally\n *\n * @public\n */\n unmute(): Promise<void>;\n /**\n * Start sharing the screen during a call.\n *\n * @public\n */\n startScreenShare(): Promise<void>;\n /**\n * Raise hand for current user\n *\n * @public\n */\n raiseHand(): Promise<void>;\n /**\n * lower hand for current user\n *\n * @public\n */\n lowerHand(): Promise<void>;\n /**\n * Send reaction emoji\n *\n * @public\n */\n onReactionClick(reaction: Reaction): Promise<void>;\n /**\n * Stop sharing the screen\n *\n * @public\n */\n stopScreenShare(): Promise<void>;\n /**\n * Remove a participant from the call.\n *\n * @param userId - Id of the participant to be removed\n *\n * @public\n */\n removeParticipant(userId: string): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Remove a participant from the call.\n * @param participant - {@link @azure/communication-common#CommunicationIdentifier} of the participant to be removed\n * @beta\n */\n removeParticipant(participant: CommunicationIdentifier): Promise<void>;\n /**\n * Create the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;\n /**\n * Dispose the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @deprecated Use {@link disposeRemoteVideoStreamView}, {@link disposeLocalVideoStreamView} and {@link disposeRemoteVideoStreamView} instead.\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;\n /**\n * Dispose the html view for a screen share stream\n *\n * @remarks\n * this method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to dispose the screen share stream view for.\n *\n * @public\n */\n disposeScreenShareStreamView(remoteUserId: string): Promise<void>;\n /**\n * Dispose the html view for a remote video stream\n *\n * @param remoteUserId - Id of the participant to dispose\n *\n * @public\n */\n disposeRemoteVideoStreamView(remoteUserId: string): Promise<void>;\n /**\n * Dispose the html view for a local video stream\n *\n * @public\n */\n disposeLocalVideoStreamView(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Holds the call.\n *\n * @beta\n */\n holdCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Resumes the call from a `LocalHold` state.\n *\n * @beta\n */\n resumeCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Add a participant to the call.\n *\n * @beta\n */\n addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /**\n * send dtmf tone to another participant in a 1:1 PSTN call\n *\n * @public\n */\n sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Continues into a call when the browser version is not supported.\n */\n allowUnsupportedBrowserVersion(): void;\n /**\n * Function to Start captions\n * @param options - options for start captions\n */\n startCaptions(options?: StartCaptionsAdapterOptions): Promise<void>;\n /**\n * Function to set caption language\n * @param language - language set for caption\n */\n setCaptionLanguage(language: string): Promise<void>;\n /**\n * Function to set spoken language\n * @param language - spoken language\n */\n setSpokenLanguage(language: string): Promise<void>;\n /**\n * Funtion to stop captions\n */\n stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void>;\n\n /**\n * Start the video background effect.\n *\n * @public\n */\n startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void>;\n\n /**\n * Stop the video background effect.\n *\n * @public\n */\n stopVideoBackgroundEffects(): Promise<void>;\n\n /**\n * Override the background picker images for background replacement effect.\n *\n * @param backgroundImages - Array of custom background images.\n *\n * @public\n */\n updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;\n\n /**\n * Update the selected video background effect.\n *\n * @public\n */\n updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void;\n /* @conditional-compile-remove(DNS) */\n /**\n * Start the noise suppression effect.\n *\n * @beta\n */\n startNoiseSuppressionEffect(): Promise<void>;\n /* @conditional-compile-remove(DNS) */\n /**\n * Stop the noise suppression effect.\n *\n * @beta\n */\n stopNoiseSuppressionEffect(): Promise<void>;\n /**\n * Send the end of call survey result\n *\n * @public\n */\n submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined>;\n /**\n * Start spotlight for local and remote participants by their user ids.\n * If no array of user ids is passed then action is performed on local participant.\n */\n startSpotlight(userIds?: string[]): Promise<void>;\n /**\n * Stop spotlight for local and remote participants by their user ids.\n * If no array of user ids is passed then action is performed on local participant.\n */\n stopSpotlight(userIds?: string[]): Promise<void>;\n /**\n * Stop all spotlights\n */\n stopAllSpotlight(): Promise<void>;\n /* @conditional-compile-remove(soft-mute) */\n /**\n * Mute a participant\n *\n * @param userId - Id of the participant to mute\n */\n muteParticipant(userId: string): Promise<void>;\n /* @conditional-compile-remove(soft-mute) */\n /**\n * Mute All participants\n */\n muteAllRemoteParticipants(): Promise<void>;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Return to origin call of breakout room\n */\n returnFromBreakoutRoom(): Promise<void>;\n}\n\n/**\n * Functionality for managing devices within a call.\n *\n * @public\n */\nexport interface CallAdapterDeviceManagement {\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @public\n */\n askDevicePermission(constrain: PermissionConstraints): Promise<void>;\n /**\n * Query for available camera devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }\n *\n * @public\n */\n queryCameras(): Promise<VideoDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n queryMicrophones(): Promise<AudioDeviceInfo[]>;\n /**\n * Query for available speaker devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n querySpeakers(): Promise<AudioDeviceInfo[]>;\n /**\n * Set the camera to use in the call.\n *\n * @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }\n * @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>;\n /**\n * Set the microphone to use in the call.\n *\n * @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }\n *\n * @public\n */\n setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>;\n /**\n * Set the speaker to use in the call.\n *\n * @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }\n *\n * @public\n */\n setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>;\n}\n\n/**\n * Call composite events that can be subscribed to.\n *\n * @public\n */\nexport interface CallAdapterSubscribers {\n /**\n * Subscribe function for 'participantsJoined' event.\n */\n on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Subscribe function for 'participantsLeft' event.\n */\n on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Subscribe function for 'isMutedChanged' event.\n *\n * @remarks\n * The event will be triggered whenever current user or remote user mute state changed\n *\n */\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Subscribe function for 'callIdChanged' event.\n *\n * @remarks\n * The event will be triggered when callId of current user changed.\n *\n */\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Subscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Subscribe function for 'displayNameChanged' event.\n */\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Subscribe function for 'isSpeakingChanged' event.\n */\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Subscribe function for 'callEnded' event.\n */\n on(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Subscribe function for 'diagnosticChanged' event.\n *\n * This event fires whenever there is a change in user facing diagnostics about the ongoing call.\n */\n on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Subscribe function for 'selectedMicrophoneChanged' event.\n *\n * This event fires whenever the user selects a new microphone device.\n */\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'selectedSpeakerChanged' event.\n *\n * This event fires whenever the user selects a new speaker device.\n */\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'error' event.\n */\n on(event: 'error', listener: (e: AdapterError) => void): void;\n /**\n * Subscribe function for 'captionsReceived' event.\n */\n on(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n /**\n * Subscribe function for 'isCaptionsActiveChanged' event.\n */\n on(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n\n /**\n * Subscribe function for 'isCaptionLanguageChanged' event.\n */\n on(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;\n\n /**\n * Subscribe function for 'isSpokenLanguageChanged' event.\n */\n on(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;\n\n /**\n * Subscribe function for 'transferRequested' event.\n */\n on(event: 'transferAccepted', listener: TransferAcceptedListener): void;\n\n /**\n * Subscribe function for 'capabilitiesChanged' event.\n */\n on(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;\n /**\n * Subscribe function for 'roleChanged' event.\n */\n on(event: 'roleChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'spotlightChanged' event.\n */\n on(event: 'spotlightChanged', listener: SpotlightChangedListener): void;\n /* @conditional-compile-remove(soft-mute) */\n /**\n * Subscribe function for 'mutedByOthers' event.\n */\n on(event: 'mutedByOthers', listener: PropertyChangedEvent): void;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Subscribe function for 'breakoutRoomsUpdated' event.\n */\n on(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;\n /**\n * Unsubscribe function for 'participantsJoined' event.\n */\n off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Unsubscribe function for 'participantsLeft' event.\n */\n off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Unsubscribe function for 'isMutedChanged' event.\n */\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Unsubscribe function for 'callIdChanged' event.\n */\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Unsubscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Unsubscribe function for 'displayNameChanged' event.\n */\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Unsubscribe function for 'isSpeakingChanged' event.\n */\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Unsubscribe function for 'callEnded' event.\n */\n off(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Unsubscribe function for 'diagnosticChanged' event.\n */\n off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Unsubscribe function for 'selectedMicrophoneChanged' event.\n */\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'selectedSpeakerChanged' event.\n */\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'error' event.\n */\n off(event: 'error', listener: (e: AdapterError) => void): void;\n /**\n * Unsubscribe function for 'captionsReceived' event.\n */\n off(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n /**\n * Unsubscribe function for 'isCaptionsActiveChanged' event.\n */\n off(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n /**\n * Unsubscribe function for 'isCaptionLanguageChanged' event.\n */\n off(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;\n /**\n * Unsubscribe function for 'isSpokenLanguageChanged' event.\n */\n off(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;\n /**\n * Unsubscribe function for 'transferRequested' event.\n */\n off(event: 'transferAccepted', listener: TransferAcceptedListener): void;\n\n /**\n * Unsubscribe function for 'capabilitiesChanged' event.\n */\n off(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;\n /**\n * Unsubscribe function for 'roleChanged' event.\n */\n off(event: 'roleChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'spotlightChanged' event.\n */\n off(event: 'spotlightChanged', listener: SpotlightChangedListener): void;\n /* @conditional-compile-remove(soft-mute) */\n /**\n * Unsubscribe function for 'mutedByOthers' event.\n */\n off(event: 'mutedByOthers', listener: PropertyChangedEvent): void;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Unsubscribe function for 'breakoutRoomsUpdated' event.\n */\n off(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;\n}\n\n// This type remains for non-breaking change reason\n/**\n * Functionality for managing the current call or start a new call\n * @deprecated CallAdapter interface will be flatten, consider using CallAdapter directly\n * @public\n */\nexport interface CallAdapterCallManagement extends CallAdapterCallOperations {\n /**\n * Join the call with microphone initially on/off.\n * @deprecated Use joinCall(options?:JoinCallOptions) instead.\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n\n /**\n * Join the call with options bag to set microphone/camera initial state when joining call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @param options - param to set microphone/camera initially on/off/use precall state.\n *\n * @public\n */\n joinCall(options?: JoinCallOptions): Call | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @public\n */\n startCall(participants: StartCallIdentifier[], options?: StartCallOptions): Call | undefined;\n}\n\n// TODO: Flatten the adapter structure\n/**\n * {@link CallComposite} Adapter interface.\n *\n * @public\n */\nexport interface CommonCallAdapter\n extends AdapterState<CallAdapterState>,\n Disposable,\n CallAdapterCallOperations,\n CallAdapterDeviceManagement,\n CallAdapterSubscribers {\n /**\n * Join the call with microphone initially on/off.\n * @deprecated Use joinCall(options?:JoinCallOptions) instead.\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): void;\n /**\n * Join the call with options bag to set microphone/camera initial state when joining call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @param options - param to set microphone/camera initially on/off/use precall state.\n *\n * @public\n */\n joinCall(options?: JoinCallOptions): void;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): void;\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @public\n */\n startCall(participants: StartCallIdentifier[], options?: StartCallOptions): void;\n}\n\n/**\n * An Adapter interface specific for Azure Communication identity which extends {@link CommonCallAdapter}.\n *\n * @public\n */\nexport interface CallAdapter extends CommonCallAdapter {\n /**\n * Join the call with microphone initially on/off.\n * @deprecated Use joinCall(options?:JoinCallOptions) instead.\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n\n /**\n * Join the call with options bag to set microphone/camera initial state when joining call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @param options - param to set microphone/camera initially on/off/use precall state.\n *\n * @public\n */\n joinCall(options?: JoinCallOptions): Call | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @public\n */\n startCall(participants: StartCallIdentifier[], options?: StartCallOptions): Call | undefined;\n}\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * An Adapter interface specific for Teams identity which extends {@link CommonCallAdapter}.\n *\n * @public\n */\nexport interface TeamsCallAdapter extends CommonCallAdapter {\n /**\n * Join the call with microphone initially on/off.\n * @deprecated Use joinCall(options?:JoinCallOptions) instead.\n * @param microphoneOn - Whether microphone is initially enabled\n */\n joinCall(microphoneOn?: boolean): TeamsCall | undefined;\n /**\n * Join the call with options bag to set microphone/camera initial state when joining call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @param options - param to set microphone/camera initially on/off.\n *\n * @public\n */\n joinCall(options?: JoinCallOptions): TeamsCall | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): TeamsCall | undefined;\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @public\n */\n startCall(participants: StartCallIdentifier[], options?: StartCallOptions): TeamsCall | undefined;\n}\n"]}
1
+ {"version":3,"file":"CallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/CallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAuElC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB;IACjD,0BAA0B;IAC1B,8BAA8B;IAC9B,UAAU;IACV,iBAAiB;IACjB,sDAAsD,CAAC,wBAAwB;CAChF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallState, DeviceManagerState } from '@internal/calling-stateful-client';\nimport { CaptionsInfo } from '@internal/calling-stateful-client';\nimport type { BackgroundBlurConfig, BackgroundReplacementConfig } from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport type { CapabilitiesChangeInfo } from '@azure/communication-calling';\nimport type { SpotlightedParticipant } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\nimport { TransferEventArgs } from '@azure/communication-calling';\nimport { StartCaptionsOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport type { BreakoutRoomsUpdatedListener } from '@azure/communication-calling';\nimport type {\n AudioDeviceInfo,\n VideoDeviceInfo,\n Call,\n PermissionConstraints,\n RemoteParticipant,\n StartCallOptions,\n MediaDiagnosticChangedEventArgs,\n NetworkDiagnosticChangedEventArgs,\n PropertyChangedEvent\n} from '@azure/communication-calling';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport type {\n CommunicationIdentifierKind,\n MicrosoftTeamsAppIdentifier,\n UnknownIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(teams-adhoc-call) */\nimport type { MicrosoftTeamsUserIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { CommunicationIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport type { CommunicationUserIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';\nimport type { AdapterState, Disposable, AdapterError, AdapterErrors } from '../../common/adapters';\n/* @conditional-compile-remove(breakout-rooms) */\nimport type { AdapterNotifications } from '../../common/adapters';\n\nimport { VideoBackgroundEffectsDependency } from '@internal/calling-component-bindings';\n\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\nimport { ReactionResources } from '@internal/react-components';\n/* @conditional-compile-remove(DNS) */\nimport { DeepNoiseSuppressionEffectDependency } from '@internal/calling-component-bindings';\n\n/**\n * Major UI screens shown in the {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositePage =\n | 'accessDeniedTeamsMeeting'\n | 'call'\n | 'configuration'\n | /* @conditional-compile-remove(PSTN-calls) */ 'hold'\n | 'joinCallFailedDueToNoNetwork'\n | 'leftCall'\n | 'leaving'\n | 'lobby'\n | 'removedFromCall'\n | /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment'\n | 'transferring'\n | 'badRequest';\n\n/**\n * Subset of CallCompositePages that represent an end call state.\n * @private\n */\nexport const END_CALL_PAGES: CallCompositePage[] = [\n 'accessDeniedTeamsMeeting',\n 'joinCallFailedDueToNoNetwork',\n 'leftCall',\n 'removedFromCall',\n /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment'\n];\n\n/**\n * {@link CommonCallAdapter} state for pure UI purposes.\n *\n * @public\n */\nexport type CallAdapterUiState = {\n isLocalPreviewMicrophoneEnabled: boolean;\n page: CallCompositePage;\n /* @conditional-compile-remove(unsupported-browser) */\n unsupportedBrowserVersionsAllowed?: boolean;\n};\n\n/**\n * Identifier types for initiating a call using the CallAdapter\n * @public\n */\nexport type StartCallIdentifier =\n | (\n | MicrosoftTeamsAppIdentifier\n | /* @conditional-compile-remove(PSTN-calls) */ PhoneNumberIdentifier\n | /* @conditional-compile-remove(one-to-n-calling) */ CommunicationUserIdentifier\n | /* @conditional-compile-remove(teams-adhoc-call) */ MicrosoftTeamsUserIdentifier\n | UnknownIdentifier\n )\n | /* @conditional-compile-remove(start-call-beta) */ CommunicationIdentifier;\n\n/**\n * {@link CommonCallAdapter} state inferred from Azure Communication Services backend.\n *\n * @public\n */\nexport type CallAdapterClientState = {\n userId: CommunicationIdentifierKind;\n displayName?: string;\n call?: CallState;\n /**\n * State to track who the original call went out to. will be undefined the call is not a outbound\n * modality. This includes, groupCalls, Rooms calls, and Teams InteropMeetings.\n */\n targetCallees?: CommunicationIdentifier[];\n devices: DeviceManagerState;\n endedCall?: CallState;\n /**\n * State to track whether the call is a teams call.\n */\n isTeamsCall: boolean;\n /**\n * State to track whether the call is a teams meeting.\n */\n isTeamsMeeting: boolean;\n /**\n * State to track whether the call is a rooms call.\n */\n isRoomsCall: boolean;\n /**\n * Latest error encountered for each operation performed via the adapter.\n */\n latestErrors: AdapterErrors;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Latest notifications from call client state.\n */\n latestNotifications: AdapterNotifications;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Azure communications Phone number to make PSTN calls with.\n */\n alternateCallerId?: string;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Environment information about system the adapter is made on\n */\n environmentInfo?: EnvironmentInfo;\n /**\n * State to track whether the local participant's camera is on. To be used when creating a custom\n * control bar with the CallComposite.\n */\n cameraStatus?: 'On' | 'Off';\n\n /**\n * Default set of background images for background replacement effect.\n */\n videoBackgroundImages?: VideoBackgroundImage[];\n\n /**\n * Dependency to be injected for video background effect.\n */\n onResolveVideoEffectDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n /* @conditional-compile-remove(DNS) */\n /**\n * Dependency to be injected for deep noise suppression effect.\n * @beta\n */\n onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;\n /* @conditional-compile-remove(DNS) */\n /**\n * State to track whether the noise suppression should be on by default.\n * @beta\n * @default true\n */\n deepNoiseSuppressionOnByDefault?: boolean;\n /* @conditional-compile-remove(DNS) */\n /**\n * State to track whether to hide the noise suppression button.\n * @beta\n * @default false\n */\n hideNoiseSuppressionButton?: boolean;\n /**\n * State to track the selected video background effect.\n */\n selectedVideoBackgroundEffect?: VideoBackgroundEffect;\n /**\n * Call from transfer request accepted by local user\n */\n acceptedTransferCallState?: CallState;\n /* @conditional-compile-remove(hide-attendee-name) */\n /**\n * Hide attendee names in teams meeting\n */\n hideAttendeeNames?: boolean;\n /**\n * State to track the sounds to be used in the call.\n */\n sounds?: CallingSounds;\n /**\n * State to track the reactions to be used.\n * @public\n */\n reactions?: ReactionResources;\n};\n\n/**\n * {@link CommonCallAdapter} state.\n *\n * @public\n */\nexport type CallAdapterState = CallAdapterUiState & CallAdapterClientState;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsJoined' event.\n *\n * @public\n */\nexport type ParticipantsJoinedListener = (event: { joined: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsLeft' event.\n *\n * @public\n */\nexport type ParticipantsLeftListener = (event: { removed: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isMuted' event.\n *\n * @public\n */\nexport type IsMutedChangedListener = (event: { identifier: CommunicationIdentifierKind; isMuted: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callIdChanged' event.\n *\n * @public\n */\nexport type CallIdChangedListener = (event: { callId: string }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isLocalScreenSharingActiveChanged' event.\n *\n * @public\n */\nexport type IsLocalScreenSharingActiveChangedListener = (event: { isScreenSharingOn: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isSpeakingChanged' event.\n *\n * @public\n */\nexport type IsSpeakingChangedListener = (event: {\n identifier: CommunicationIdentifierKind;\n isSpeaking: boolean;\n}) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'displayNameChanged' event.\n *\n * @public\n */\nexport type DisplayNameChangedListener = (event: {\n participantId: CommunicationIdentifierKind;\n displayName: string;\n}) => void;\n\n/**\n * Payload for {@link CallEndedListener} containing details on the ended call.\n *\n * @public\n */\nexport type CallAdapterCallEndedEvent = { callId: string };\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callEnded' event.\n *\n * @public\n */\nexport type CallEndedListener = (event: CallAdapterCallEndedEvent) => void;\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a media diagnostic.\n *\n * @public\n */\nexport type MediaDiagnosticChangedEvent = MediaDiagnosticChangedEventArgs & {\n type: 'media';\n};\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a network diagnostic.\n *\n * @public\n */\nexport type NetworkDiagnosticChangedEvent = NetworkDiagnosticChangedEventArgs & {\n type: 'network';\n};\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'diagnosticChanged' event.\n *\n * @public\n */\nexport type DiagnosticChangedEventListner = (\n event: MediaDiagnosticChangedEvent | NetworkDiagnosticChangedEvent\n) => void;\n\n/**\n * Contains the attibutes of a background image like url, name etc.\n *\n * @public\n */\nexport interface VideoBackgroundImage {\n /**\n * key for unique identification of the custom background\n */\n key: string;\n /**\n * URL of the uploaded background image.\n */\n url: string;\n /**\n * Image name to be displayed.\n */\n tooltipText?: string;\n}\n\n/**\n * @public\n * Type for representing a custom sound to use for a calling event\n */\nexport type SoundEffect = {\n /**\n * Path to sound effect\n */\n url: string;\n};\n\n/**\n * @public\n * Type for representing a set of sounds to use for different calling events\n */\nexport type CallingSounds = {\n /**\n * Sound to be played when the call ends\n */\n callEnded?: SoundEffect;\n /**\n * Sound to be played when the call is ringing\n */\n callRinging?: SoundEffect;\n /**\n * Sound to be played when the call is rejected by the user being callede\n */\n callBusy?: SoundEffect;\n};\n\n/**\n * Options for setting microphone and camera state when joining a call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @public\n */\nexport interface JoinCallOptions {\n /**\n * microphone state when joining call\n * true: turn on\n * false: turn off\n * 'keep': maintain precall state\n */\n microphoneOn?: boolean | 'keep';\n /**\n * camera state when joining call\n * true: turn on\n * false: turn off\n * 'keep': maintain precall state\n */\n cameraOn?: boolean | 'keep';\n}\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'captionsReceived' event.\n *\n * @public\n */\nexport type CaptionsReceivedListener = (event: { captionsInfo: CaptionsInfo }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isCaptionsActiveChanged' event.\n *\n * @public\n */\nexport type IsCaptionsActiveChangedListener = (event: { isActive: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isCaptionLanguageChanged' event.\n *\n * @public\n */\nexport type IsCaptionLanguageChangedListener = (event: { activeCaptionLanguage: string }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isSpokenLanguageChanged' event.\n *\n * @public\n */\nexport type IsSpokenLanguageChangedListener = (event: { activeSpokenLanguage: string }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'transferRequested' event.\n *\n * @public\n */\nexport type TransferAcceptedListener = (event: TransferEventArgs) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'capabilitiesChanged' event.\n *\n * @public\n */\nexport type CapabilitiesChangedListener = (data: CapabilitiesChangeInfo) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'spotlightChanged' event.\n *\n * @public\n */\nexport type SpotlightChangedListener = (args: {\n added: SpotlightedParticipant[];\n removed: SpotlightedParticipant[];\n}) => void;\n\n/**\n * Contains the attibutes of a selected video background effect\n *\n * @public\n */\nexport type VideoBackgroundEffect =\n | VideoBackgroundNoEffect\n | VideoBackgroundBlurEffect\n | VideoBackgroundReplacementEffect;\n\n/**\n * Contains the attibutes to remove video background effect\n *\n * @public\n */\nexport interface VideoBackgroundNoEffect {\n /**\n * Name of effect to remove video background effect\n */\n effectName: 'none';\n}\n\n/**\n * Contains the attibutes of the blur video background effect\n *\n * @public\n */\nexport interface VideoBackgroundBlurEffect extends BackgroundBlurConfig {\n /**\n * Name of effect to blur video background effect\n */\n effectName: 'blur';\n}\n\n/**\n * Contains the attibutes of a selected replacement video background effect\n *\n * @public\n */\nexport interface VideoBackgroundReplacementEffect extends BackgroundReplacementConfig {\n /**\n * Name of effect to replace video background effect\n */\n effectName: 'replacement';\n /**\n * key for unique identification of the custom background\n */\n key?: string;\n}\n\n/**\n * Options passed to adapter.startCaptions\n *\n * @public\n */\nexport interface StartCaptionsAdapterOptions extends StartCaptionsOptions {\n /**\n * Start captions in the background without showing the captions UI to the Composite user.\n *\n * @defaultValue false\n */\n startInBackground?: boolean;\n}\n\n/**\n * Options passed to adapter.stopCaptions\n *\n * @public\n */\nexport interface StopCaptionsAdapterOptions {\n /**\n * Stop captions that have been started in the background.\n *\n * @remarks\n * This option is only applicable when stopping captions that have been started using the `startInBackground` property of adpater.startCaptions.\n *\n * @defaultValue false\n */\n stopInBackground?: boolean;\n}\n\n/**\n * Functionality for managing the current call.\n *\n * @public\n */\nexport interface CallAdapterCallOperations {\n /**\n * Leave the call\n *\n * @param forEveryone - Whether to remove all participants when leaving\n *\n * @public\n */\n leaveCall(forEveryone?: boolean): Promise<void>;\n /**\n * Start the camera\n * This method will start rendering a local camera view when the call is not active\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n startCamera(options?: VideoStreamOptions): Promise<void>;\n /**\n * Stop the camera\n * This method will stop rendering a local camera view when the call is not active\n *\n * @public\n */\n stopCamera(): Promise<void>;\n /**\n * Mute the current user during the call or disable microphone locally\n *\n * @public\n */\n mute(): Promise<void>;\n /**\n * Unmute the current user during the call or enable microphone locally\n *\n * @public\n */\n unmute(): Promise<void>;\n /**\n * Start sharing the screen during a call.\n *\n * @public\n */\n startScreenShare(): Promise<void>;\n /**\n * Raise hand for current user\n *\n * @public\n */\n raiseHand(): Promise<void>;\n /**\n * lower hand for current user\n *\n * @public\n */\n lowerHand(): Promise<void>;\n /**\n * Send reaction emoji\n *\n * @public\n */\n onReactionClick(reaction: Reaction): Promise<void>;\n /**\n * Stop sharing the screen\n *\n * @public\n */\n stopScreenShare(): Promise<void>;\n /**\n * Remove a participant from the call.\n *\n * @param userId - Id of the participant to be removed\n *\n * @public\n */\n removeParticipant(userId: string): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Remove a participant from the call.\n * @param participant - {@link @azure/communication-common#CommunicationIdentifier} of the participant to be removed\n * @beta\n */\n removeParticipant(participant: CommunicationIdentifier): Promise<void>;\n /**\n * Create the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;\n /**\n * Dispose the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @deprecated Use {@link disposeRemoteVideoStreamView}, {@link disposeLocalVideoStreamView} and {@link disposeRemoteVideoStreamView} instead.\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;\n /**\n * Dispose the html view for a screen share stream\n *\n * @remarks\n * this method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to dispose the screen share stream view for.\n *\n * @public\n */\n disposeScreenShareStreamView(remoteUserId: string): Promise<void>;\n /**\n * Dispose the html view for a remote video stream\n *\n * @param remoteUserId - Id of the participant to dispose\n *\n * @public\n */\n disposeRemoteVideoStreamView(remoteUserId: string): Promise<void>;\n /**\n * Dispose the html view for a local video stream\n *\n * @public\n */\n disposeLocalVideoStreamView(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Holds the call.\n *\n * @beta\n */\n holdCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Resumes the call from a `LocalHold` state.\n *\n * @beta\n */\n resumeCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Add a participant to the call.\n *\n * @beta\n */\n addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n addParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /**\n * send dtmf tone to another participant in a 1:1 PSTN call\n *\n * @public\n */\n sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Continues into a call when the browser version is not supported.\n */\n allowUnsupportedBrowserVersion(): void;\n /**\n * Function to Start captions\n * @param options - options for start captions\n */\n startCaptions(options?: StartCaptionsAdapterOptions): Promise<void>;\n /**\n * Function to set caption language\n * @param language - language set for caption\n */\n setCaptionLanguage(language: string): Promise<void>;\n /**\n * Function to set spoken language\n * @param language - spoken language\n */\n setSpokenLanguage(language: string): Promise<void>;\n /**\n * Funtion to stop captions\n */\n stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void>;\n\n /**\n * Start the video background effect.\n *\n * @public\n */\n startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void>;\n\n /**\n * Stop the video background effect.\n *\n * @public\n */\n stopVideoBackgroundEffects(): Promise<void>;\n\n /**\n * Override the background picker images for background replacement effect.\n *\n * @param backgroundImages - Array of custom background images.\n *\n * @public\n */\n updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;\n\n /**\n * Update the selected video background effect.\n *\n * @public\n */\n updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void;\n /* @conditional-compile-remove(DNS) */\n /**\n * Start the noise suppression effect.\n *\n * @beta\n */\n startNoiseSuppressionEffect(): Promise<void>;\n /* @conditional-compile-remove(DNS) */\n /**\n * Stop the noise suppression effect.\n *\n * @beta\n */\n stopNoiseSuppressionEffect(): Promise<void>;\n /**\n * Send the end of call survey result\n *\n * @public\n */\n submitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined>;\n /**\n * Start spotlight for local and remote participants by their user ids.\n * If no array of user ids is passed then action is performed on local participant.\n */\n startSpotlight(userIds?: string[]): Promise<void>;\n /**\n * Stop spotlight for local and remote participants by their user ids.\n * If no array of user ids is passed then action is performed on local participant.\n */\n stopSpotlight(userIds?: string[]): Promise<void>;\n /**\n * Stop all spotlights\n */\n stopAllSpotlight(): Promise<void>;\n /* @conditional-compile-remove(soft-mute) */\n /**\n * Mute a participant\n *\n * @param userId - Id of the participant to mute\n */\n muteParticipant(userId: string): Promise<void>;\n /* @conditional-compile-remove(soft-mute) */\n /**\n * Mute All participants\n */\n muteAllRemoteParticipants(): Promise<void>;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Return to origin call of breakout room\n */\n returnFromBreakoutRoom(): Promise<void>;\n}\n\n/**\n * Functionality for managing devices within a call.\n *\n * @public\n */\nexport interface CallAdapterDeviceManagement {\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @public\n */\n askDevicePermission(constrain: PermissionConstraints): Promise<void>;\n /**\n * Query for available camera devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }\n *\n * @public\n */\n queryCameras(): Promise<VideoDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n queryMicrophones(): Promise<AudioDeviceInfo[]>;\n /**\n * Query for available speaker devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n querySpeakers(): Promise<AudioDeviceInfo[]>;\n /**\n * Set the camera to use in the call.\n *\n * @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }\n * @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>;\n /**\n * Set the microphone to use in the call.\n *\n * @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }\n *\n * @public\n */\n setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>;\n /**\n * Set the speaker to use in the call.\n *\n * @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }\n *\n * @public\n */\n setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>;\n}\n\n/**\n * Call composite events that can be subscribed to.\n *\n * @public\n */\nexport interface CallAdapterSubscribers {\n /**\n * Subscribe function for 'participantsJoined' event.\n */\n on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Subscribe function for 'participantsLeft' event.\n */\n on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Subscribe function for 'isMutedChanged' event.\n *\n * @remarks\n * The event will be triggered whenever current user or remote user mute state changed\n *\n */\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Subscribe function for 'callIdChanged' event.\n *\n * @remarks\n * The event will be triggered when callId of current user changed.\n *\n */\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Subscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Subscribe function for 'displayNameChanged' event.\n */\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Subscribe function for 'isSpeakingChanged' event.\n */\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Subscribe function for 'callEnded' event.\n */\n on(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Subscribe function for 'diagnosticChanged' event.\n *\n * This event fires whenever there is a change in user facing diagnostics about the ongoing call.\n */\n on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Subscribe function for 'selectedMicrophoneChanged' event.\n *\n * This event fires whenever the user selects a new microphone device.\n */\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'selectedSpeakerChanged' event.\n *\n * This event fires whenever the user selects a new speaker device.\n */\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'error' event.\n */\n on(event: 'error', listener: (e: AdapterError) => void): void;\n /**\n * Subscribe function for 'captionsReceived' event.\n */\n on(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n /**\n * Subscribe function for 'isCaptionsActiveChanged' event.\n */\n on(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n\n /**\n * Subscribe function for 'isCaptionLanguageChanged' event.\n */\n on(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;\n\n /**\n * Subscribe function for 'isSpokenLanguageChanged' event.\n */\n on(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;\n\n /**\n * Subscribe function for 'transferRequested' event.\n */\n on(event: 'transferAccepted', listener: TransferAcceptedListener): void;\n\n /**\n * Subscribe function for 'capabilitiesChanged' event.\n */\n on(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;\n /**\n * Subscribe function for 'roleChanged' event.\n */\n on(event: 'roleChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'spotlightChanged' event.\n */\n on(event: 'spotlightChanged', listener: SpotlightChangedListener): void;\n /* @conditional-compile-remove(soft-mute) */\n /**\n * Subscribe function for 'mutedByOthers' event.\n */\n on(event: 'mutedByOthers', listener: PropertyChangedEvent): void;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Subscribe function for 'breakoutRoomsUpdated' event.\n */\n on(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;\n /**\n * Unsubscribe function for 'participantsJoined' event.\n */\n off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Unsubscribe function for 'participantsLeft' event.\n */\n off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Unsubscribe function for 'isMutedChanged' event.\n */\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Unsubscribe function for 'callIdChanged' event.\n */\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Unsubscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Unsubscribe function for 'displayNameChanged' event.\n */\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Unsubscribe function for 'isSpeakingChanged' event.\n */\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Unsubscribe function for 'callEnded' event.\n */\n off(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Unsubscribe function for 'diagnosticChanged' event.\n */\n off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Unsubscribe function for 'selectedMicrophoneChanged' event.\n */\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'selectedSpeakerChanged' event.\n */\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'error' event.\n */\n off(event: 'error', listener: (e: AdapterError) => void): void;\n /**\n * Unsubscribe function for 'captionsReceived' event.\n */\n off(event: 'captionsReceived', listener: CaptionsReceivedListener): void;\n /**\n * Unsubscribe function for 'isCaptionsActiveChanged' event.\n */\n off(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;\n /**\n * Unsubscribe function for 'isCaptionLanguageChanged' event.\n */\n off(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;\n /**\n * Unsubscribe function for 'isSpokenLanguageChanged' event.\n */\n off(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;\n /**\n * Unsubscribe function for 'transferRequested' event.\n */\n off(event: 'transferAccepted', listener: TransferAcceptedListener): void;\n\n /**\n * Unsubscribe function for 'capabilitiesChanged' event.\n */\n off(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;\n /**\n * Unsubscribe function for 'roleChanged' event.\n */\n off(event: 'roleChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'spotlightChanged' event.\n */\n off(event: 'spotlightChanged', listener: SpotlightChangedListener): void;\n /* @conditional-compile-remove(soft-mute) */\n /**\n * Unsubscribe function for 'mutedByOthers' event.\n */\n off(event: 'mutedByOthers', listener: PropertyChangedEvent): void;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Unsubscribe function for 'breakoutRoomsUpdated' event.\n */\n off(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;\n}\n\n// This type remains for non-breaking change reason\n/**\n * Functionality for managing the current call or start a new call\n * @deprecated CallAdapter interface will be flatten, consider using CallAdapter directly\n * @public\n */\nexport interface CallAdapterCallManagement extends CallAdapterCallOperations {\n /**\n * Join the call with microphone initially on/off.\n * @deprecated Use joinCall(options?:JoinCallOptions) instead.\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n\n /**\n * Join the call with options bag to set microphone/camera initial state when joining call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @param options - param to set microphone/camera initially on/off/use precall state.\n *\n * @public\n */\n joinCall(options?: JoinCallOptions): Call | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @public\n */\n startCall(participants: StartCallIdentifier[], options?: StartCallOptions): Call | undefined;\n}\n\n// TODO: Flatten the adapter structure\n/**\n * {@link CallComposite} Adapter interface.\n *\n * @public\n */\nexport interface CommonCallAdapter\n extends AdapterState<CallAdapterState>,\n Disposable,\n CallAdapterCallOperations,\n CallAdapterDeviceManagement,\n CallAdapterSubscribers {\n /**\n * Join the call with microphone initially on/off.\n * @deprecated Use joinCall(options?:JoinCallOptions) instead.\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): void;\n /**\n * Join the call with options bag to set microphone/camera initial state when joining call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @param options - param to set microphone/camera initially on/off/use precall state.\n *\n * @public\n */\n joinCall(options?: JoinCallOptions): void;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): void;\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @public\n */\n startCall(participants: StartCallIdentifier[], options?: StartCallOptions): void;\n}\n\n/**\n * An Adapter interface specific for Azure Communication identity which extends {@link CommonCallAdapter}.\n *\n * @public\n */\nexport interface CallAdapter extends CommonCallAdapter {\n /**\n * Join the call with microphone initially on/off.\n * @deprecated Use joinCall(options?:JoinCallOptions) instead.\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n\n /**\n * Join the call with options bag to set microphone/camera initial state when joining call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @param options - param to set microphone/camera initially on/off/use precall state.\n *\n * @public\n */\n joinCall(options?: JoinCallOptions): Call | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @public\n */\n startCall(participants: StartCallIdentifier[], options?: StartCallOptions): Call | undefined;\n}\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * An Adapter interface specific for Teams identity which extends {@link CommonCallAdapter}.\n *\n * @public\n */\nexport interface TeamsCallAdapter extends CommonCallAdapter {\n /**\n * Join the call with microphone initially on/off.\n * @deprecated Use joinCall(options?:JoinCallOptions) instead.\n * @param microphoneOn - Whether microphone is initially enabled\n */\n joinCall(microphoneOn?: boolean): TeamsCall | undefined;\n /**\n * Join the call with options bag to set microphone/camera initial state when joining call\n * true = turn on the device when joining call\n * false = turn off the device when joining call\n * 'keep'/undefined = retain devices' precall state\n *\n * @param options - param to set microphone/camera initially on/off.\n *\n * @public\n */\n joinCall(options?: JoinCallOptions): TeamsCall | undefined;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): TeamsCall | undefined;\n /**\n * Start the call.\n * @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called\n * @public\n */\n startCall(participants: StartCallIdentifier[], options?: StartCallOptions): TeamsCall | undefined;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { RemoteParticipant } from '@azure/communication-calling';
3
- import EventEmitter from 'events';
3
+ import { EventEmitter } from 'events';
4
4
  /**
5
5
  * @private
6
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ParticipantSubcriber.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallCompos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E,CAAC,oBAAoB,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;QAC1E,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,mBAAmB,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;QACxE,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,qBAAqB,EAAE,IAAI,CAAC,0BAA0B,CAAC,CAAC;IAC9E,CAAC;IAEM,cAAc;QACnB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACnE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;QAC3E,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;QACzE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,0BAA0B,CAAC,CAAC;IAC/E,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RemoteParticipant, RemoteVideoStream } from '@azure/communication-calling';\nimport EventEmitter from 'events';\n\n/**\n * @private\n */\nexport class ParticipantSubscriber {\n private participant: RemoteParticipant;\n private emitter: EventEmitter;\n\n constructor(participant: RemoteParticipant, emitter: EventEmitter) {\n this.participant = participant;\n this.emitter = emitter;\n this.subscribeParticipantEvents();\n }\n\n private isMutedChangedHandler = (): void => {\n this.emitter.emit('isMutedChanged', {\n participantId: this.participant.identifier,\n isMuted: this.participant.isMuted\n });\n };\n\n private displayNameChangedHandler = (): void => {\n this.emitter.emit('displayNameChanged', {\n participantId: this.participant.identifier,\n displayName: this.participant.displayName\n });\n };\n\n private isSpeakingChangedHandler = (): void => {\n this.emitter.emit('isSpeakingChanged', {\n participantId: this.participant.identifier,\n isSpeaking: this.participant.isSpeaking\n });\n };\n\n private videoStreamsUpdatedHandler = (event: { added: RemoteVideoStream[]; removed: RemoteVideoStream[] }): void => {\n this.emitter.emit('videoStreamsUpdated', event);\n };\n\n private subscribeParticipantEvents(): void {\n this.participant.on('isMutedChanged', this.isMutedChangedHandler);\n this.participant.on('displayNameChanged', this.displayNameChangedHandler);\n this.participant.on('isSpeakingChanged', this.isSpeakingChangedHandler);\n this.participant.on('videoStreamsUpdated', this.videoStreamsUpdatedHandler);\n }\n\n public unsubscribeAll(): void {\n this.participant.off('isMutedChanged', this.isMutedChangedHandler);\n this.participant.off('displayNameChanged', this.displayNameChangedHandler);\n this.participant.off('isSpeakingChanged', this.isSpeakingChangedHandler);\n this.participant.off('videoStreamsUpdated', this.videoStreamsUpdatedHandler);\n }\n}\n\n/**\n * @private\n */\nexport type ParticipantEvent = 'isMutedChanged' | 'displayNameChanged' | 'isSpeakingChanged' | 'videoStreamsUpdated';\n"]}
1
+ {"version":3,"file":"ParticipantSubcriber.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/ParticipantSubcriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,OAAO,qBAAqB;IAIhC,YAAY,WAA8B,EAAE,OAAqB;QAMzD,0BAAqB,GAAG,GAAS,EAAE;YACzC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE;gBAClC,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC,UAAU;gBAC1C,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO;aAClC,CAAC,CAAC;QACL,CAAC,CAAC;QAEM,8BAAyB,GAAG,GAAS,EAAE;YAC7C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE;gBACtC,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC,UAAU;gBAC1C,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,WAAW;aAC1C,CAAC,CAAC;QACL,CAAC,CAAC;QAEM,6BAAwB,GAAG,GAAS,EAAE;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CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RemoteParticipant, RemoteVideoStream } from '@azure/communication-calling';\nimport { EventEmitter } from 'events';\n\n/**\n * @private\n */\nexport class ParticipantSubscriber {\n private participant: RemoteParticipant;\n private emitter: EventEmitter;\n\n constructor(participant: RemoteParticipant, emitter: EventEmitter) {\n this.participant = participant;\n this.emitter = emitter;\n this.subscribeParticipantEvents();\n }\n\n private isMutedChangedHandler = (): void => {\n this.emitter.emit('isMutedChanged', {\n participantId: this.participant.identifier,\n isMuted: this.participant.isMuted\n });\n };\n\n private displayNameChangedHandler = (): void => {\n this.emitter.emit('displayNameChanged', {\n participantId: this.participant.identifier,\n displayName: this.participant.displayName\n });\n };\n\n private isSpeakingChangedHandler = (): void => {\n this.emitter.emit('isSpeakingChanged', {\n participantId: this.participant.identifier,\n isSpeaking: this.participant.isSpeaking\n });\n };\n\n private videoStreamsUpdatedHandler = (event: { added: RemoteVideoStream[]; removed: RemoteVideoStream[] }): void => {\n this.emitter.emit('videoStreamsUpdated', event);\n };\n\n private subscribeParticipantEvents(): void {\n this.participant.on('isMutedChanged', this.isMutedChangedHandler);\n this.participant.on('displayNameChanged', this.displayNameChangedHandler);\n this.participant.on('isSpeakingChanged', this.isSpeakingChangedHandler);\n this.participant.on('videoStreamsUpdated', this.videoStreamsUpdatedHandler);\n }\n\n public unsubscribeAll(): void {\n this.participant.off('isMutedChanged', this.isMutedChangedHandler);\n this.participant.off('displayNameChanged', this.displayNameChangedHandler);\n this.participant.off('isSpeakingChanged', this.isSpeakingChangedHandler);\n this.participant.off('videoStreamsUpdated', this.videoStreamsUpdatedHandler);\n }\n}\n\n/**\n * @private\n */\nexport type ParticipantEvent = 'isMutedChanged' | 'displayNameChanged' | 'isSpeakingChanged' | 'videoStreamsUpdated';\n"]}
@@ -8,5 +8,6 @@ export declare const SvgWithWordWrapping: (props: {
8
8
  text: string;
9
9
  lineHeightPx: number;
10
10
  bufferHeightPx: number;
11
+ role?: string;
11
12
  }) => JSX.Element;
12
13
  //# sourceMappingURL=SvgWithWordWrapping.d.ts.map
@@ -6,7 +6,7 @@ import React, { useLayoutEffect, useRef, useState } from 'react';
6
6
  * @private
7
7
  */
8
8
  export const SvgWithWordWrapping = (props) => {
9
- const { width, text, lineHeightPx, bufferHeightPx } = props;
9
+ const { width, text, lineHeightPx, bufferHeightPx, role } = props;
10
10
  const svgRef = useRef(null);
11
11
  const calculationTextElement = useRef(null);
12
12
  const visibleTextElement = useRef(null);
@@ -22,7 +22,7 @@ export const SvgWithWordWrapping = (props) => {
22
22
  setHeight(numLines * lineHeightPx);
23
23
  }
24
24
  }, [width, lineHeightPx, text]);
25
- return (React.createElement("svg", { width: width, height: height + bufferHeightPx, ref: svgRef, xmlns: "http://www.w3.org/2000/svg" },
25
+ return (React.createElement("svg", { role: role, width: width, height: height + bufferHeightPx, ref: svgRef, xmlns: "http://www.w3.org/2000/svg" },
26
26
  React.createElement("text", { height: 0, ref: calculationTextElement, style: { visibility: 'hidden' } }, text),
27
27
  React.createElement("text", { ref: visibleTextElement, x: "0", y: bufferHeightPx / 4, role: "heading", "aria-level": 1 })));
28
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SvgWithWordWrapping.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/SvgWithWordWrapping.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAKnC,EAAe,EAAE;IAChB,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAC5D,MAAM,MAAM,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC;IAC3C,MAAM,sBAAsB,GAAG,MAAM,CA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B,GAAG,CAAC,IAAY,EAAE,YAAoB,EAAmB,EAAE;IACjF,MAAM,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IAC9E,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC/B,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,YAAY,IAAI,CAAC,CAAC;IAC9C,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC5C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\n\n/**\n * An SVG element component that wraps inner text to fit the width of the SVG.\n * @private\n */\nexport const SvgWithWordWrapping = (props: {\n width: number;\n text: string;\n lineHeightPx: number;\n bufferHeightPx: number;\n}): JSX.Element => {\n const { width, text, lineHeightPx, bufferHeightPx } = props;\n const svgRef = useRef<SVGSVGElement>(null);\n const calculationTextElement = useRef<SVGTextElement>(null);\n const visibleTextElement = useRef<SVGTextElement>(null);\n const [height, setHeight] = useState<number>(0);\n\n // useLayoutEffect ensures that the calculationTextElement is rendered before being used for calculations.\n // Using useLayoutEffect over useEffect ensures we do not get a layout shift when the visibleTextElement is rendered\n // and the height is updated. This is because useLayoutEffect runs synchronously after DOM mutations but\n // before the browser has a chance to paint. See https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n // for more details.\n useLayoutEffect(() => {\n if (text && calculationTextElement.current && visibleTextElement.current) {\n const numLines = convertTextToWrappedText(\n calculationTextElement.current,\n visibleTextElement.current,\n width,\n lineHeightPx\n );\n setHeight(numLines * lineHeightPx);\n }\n }, [width, lineHeightPx, text]);\n\n return (\n <svg width={width} height={height + bufferHeightPx} ref={svgRef} xmlns=\"http://www.w3.org/2000/svg\">\n <text height={0} ref={calculationTextElement} style={{ visibility: 'hidden' }}>\n {text}\n </text>\n <text ref={visibleTextElement} x=\"0\" y={bufferHeightPx / 4} role=\"heading\" aria-level={1} />\n </svg>\n );\n};\n\n/**\n * Wrap text in tspan elements to fit the width of the SVG\n * @param baseTextElement The text element to create the wrapped text from.\n * @param outputTextElement The text element to insert the wrapped text into.\n * @param maxWidth The maximum width of the text element.\n * @param lineHeightPx The height of each line in pixels.\n * @returns The number of lines of text.\n */\nconst convertTextToWrappedText = (\n inputTextElement: SVGTextElement,\n outputTextElement: SVGTextElement,\n maxWidth: number,\n lineHeightPx: number\n): number => {\n const words = inputTextElement.textContent?.split(' ') ?? [];\n if (words.length === 0 || words[0] === '') {\n throw new Error('Text element must contain text');\n }\n\n // The current line being built.\n let line = '';\n\n // Running total of the number of lines.\n let numLines = 0;\n\n // First, clear the output text element.\n outputTextElement.textContent = '';\n\n // Iterate through each word and create a tspan element for each line.\n for (let i = 0; i < words.length; i++) {\n const testLine = line + words[i] + ' ';\n const testWidth = inputTextElement.getSubStringLength(0, testLine.length);\n\n if (testWidth > maxWidth && i > 0) {\n const newLine = constructTSpanLine(line, lineHeightPx);\n outputTextElement.appendChild(newLine);\n line = words[i] + ' ';\n numLines++;\n } else {\n line = testLine;\n }\n }\n\n // Add the last line.\n const newLine = constructTSpanLine(line, lineHeightPx);\n outputTextElement.appendChild(newLine);\n numLines++;\n\n // Return the number of lines to calculate the height of the SVG.\n return numLines;\n};\n\n/**\n * Create a tspan element for a line of text, with text set to be centered.\n * @param line The line of text.\n * @param lineHeightPx The height of each line in pixels.\n * @returns The tspan element.\n */\nconst constructTSpanLine = (line: string, lineHeightPx: number): SVGTSpanElement => {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.textContent = line;\n tspan.setAttribute('x', '50%');\n tspan.setAttribute('dy', `${lineHeightPx}px`);\n tspan.setAttribute('text-anchor', 'middle');\n return tspan;\n};\n"]}
1
+ {"version":3,"file":"SvgWithWordWrapping.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/SvgWithWordWrapping.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAMnC,EAAe,EAAE;IAChB,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAClE,MAAM,MAAM,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC;IAC3C,MAAM,sBAAsB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC5D,MAAM,kBAAkB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;IAEhD,0GAA0G;IAC1G,oHAAoH;IACpH,wGAAwG;IACxG,8GAA8G;IAC9G,oBAAoB;IACpB,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,IAAI,IAAI,sBAAsB,CAAC,OAAO,IAAI,kBAAkB,CAAC,OAAO,EAAE,CAAC;YACzE,MAAM,QAAQ,GAAG,wBAAwB,CACvC,sBAAsB,CAAC,OAAO,EAC9B,kBAAkB,CAAC,OAAO,EAC1B,KAAK,EACL,YAAY,CACb,CAAC;YACF,SAAS,CAAC,QAAQ,GAAG,YAAY,CAAC,CAAC;QACrC,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;IAEhC,OAAO,CACL,6BAAK,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK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AO,GAAG,kBAAkB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;YACvD,iBAAiB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACvC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;YACtB,QAAQ,EAAE,CAAC;QACb,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,QAAQ,CAAC;QAClB,CAAC;IACH,CAAC;IAED,qBAAqB;IACrB,MAAM,OAAO,GAAG,kBAAkB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACvD,iBAAiB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACvC,QAAQ,EAAE,CAAC;IAEX,iEAAiE;IACjE,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,YAAoB,EAAmB,EAAE;IACjF,MAAM,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IAC9E,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC/B,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,YAAY,IAAI,CAAC,CAAC;IAC9C,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC5C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\n\n/**\n * An SVG element component that wraps inner text to fit the width of the SVG.\n * @private\n */\nexport const SvgWithWordWrapping = (props: {\n width: number;\n text: string;\n lineHeightPx: number;\n bufferHeightPx: number;\n role?: string;\n}): JSX.Element => {\n const { width, text, lineHeightPx, bufferHeightPx, role } = props;\n const svgRef = useRef<SVGSVGElement>(null);\n const calculationTextElement = useRef<SVGTextElement>(null);\n const visibleTextElement = useRef<SVGTextElement>(null);\n const [height, setHeight] = useState<number>(0);\n\n // useLayoutEffect ensures that the calculationTextElement is rendered before being used for calculations.\n // Using useLayoutEffect over useEffect ensures we do not get a layout shift when the visibleTextElement is rendered\n // and the height is updated. This is because useLayoutEffect runs synchronously after DOM mutations but\n // before the browser has a chance to paint. See https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n // for more details.\n useLayoutEffect(() => {\n if (text && calculationTextElement.current && visibleTextElement.current) {\n const numLines = convertTextToWrappedText(\n calculationTextElement.current,\n visibleTextElement.current,\n width,\n lineHeightPx\n );\n setHeight(numLines * lineHeightPx);\n }\n }, [width, lineHeightPx, text]);\n\n return (\n <svg role={role} width={width} height={height + bufferHeightPx} ref={svgRef} xmlns=\"http://www.w3.org/2000/svg\">\n <text height={0} ref={calculationTextElement} style={{ visibility: 'hidden' }}>\n {text}\n </text>\n <text ref={visibleTextElement} x=\"0\" y={bufferHeightPx / 4} role=\"heading\" aria-level={1} />\n </svg>\n );\n};\n\n/**\n * Wrap text in tspan elements to fit the width of the SVG\n * @param baseTextElement The text element to create the wrapped text from.\n * @param outputTextElement The text element to insert the wrapped text into.\n * @param maxWidth The maximum width of the text element.\n * @param lineHeightPx The height of each line in pixels.\n * @returns The number of lines of text.\n */\nconst convertTextToWrappedText = (\n inputTextElement: SVGTextElement,\n outputTextElement: SVGTextElement,\n maxWidth: number,\n lineHeightPx: number\n): number => {\n const words = inputTextElement.textContent?.split(' ') ?? [];\n if (words.length === 0 || words[0] === '') {\n throw new Error('Text element must contain text');\n }\n\n // The current line being built.\n let line = '';\n\n // Running total of the number of lines.\n let numLines = 0;\n\n // First, clear the output text element.\n outputTextElement.textContent = '';\n\n // Iterate through each word and create a tspan element for each line.\n for (let i = 0; i < words.length; i++) {\n const testLine = line + words[i] + ' ';\n const testWidth = inputTextElement.getSubStringLength(0, testLine.length);\n\n if (testWidth > maxWidth && i > 0) {\n const newLine = constructTSpanLine(line, lineHeightPx);\n outputTextElement.appendChild(newLine);\n line = words[i] + ' ';\n numLines++;\n } else {\n line = testLine;\n }\n }\n\n // Add the last line.\n const newLine = constructTSpanLine(line, lineHeightPx);\n outputTextElement.appendChild(newLine);\n numLines++;\n\n // Return the number of lines to calculate the height of the SVG.\n return numLines;\n};\n\n/**\n * Create a tspan element for a line of text, with text set to be centered.\n * @param line The line of text.\n * @param lineHeightPx The height of each line in pixels.\n * @returns The tspan element.\n */\nconst constructTSpanLine = (line: string, lineHeightPx: number): SVGTSpanElement => {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.textContent = line;\n tspan.setAttribute('x', '50%');\n tspan.setAttribute('dy', `${lineHeightPx}px`);\n tspan.setAttribute('text-anchor', 'middle');\n return tspan;\n};\n"]}
@@ -92,7 +92,7 @@ export const ConfigurationPage = (props) => {
92
92
  }
93
93
  const locale = useLocale();
94
94
  const title = locale.strings.call.configurationPageTitle.length > 0 ? (React.createElement(Stack.Item, { className: mobileView ? titleContainerStyleMobile(theme) : titleContainerStyleDesktop(theme) },
95
- React.createElement(SvgWithWordWrapping, { width: mobileView ? 325 : 445, lineHeightPx: 16 * 1.5, bufferHeightPx: 16, text: locale.strings.call.configurationPageTitle }))) : (React.createElement(React.Fragment, null));
95
+ React.createElement(SvgWithWordWrapping, { width: mobileView ? 325 : 445, lineHeightPx: 16 * 1.5, bufferHeightPx: 16, text: locale.strings.call.configurationPageTitle, role: "heading" }))) : (React.createElement(React.Fragment, null));
96
96
  const callDescription = locale.strings.call.configurationPageCallDetails && (React.createElement(Stack.Item, { className: mobileView ? callDetailsStyleMobile(theme) : callDetailsStyleDesktop(theme) }, locale.strings.call.configurationPageCallDetails));
97
97
  const mobileWithPreview = mobileView && role !== 'Consumer';
98
98
  /* @conditional-compile-remove(call-readiness) */
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurationPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/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nC,EAAE;IACvB,iDAAiD;IACjD,OAAO,UAAU,IAAI,UAAU,KAAK,aAAa,CAAC,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,uBAAuB,CAAC;IAEvG,OAAO,uBAAuB,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,8BAA8B,GAAG,CACrC,2BAAgD,EAChD,UAAwD,EACnC,EAAE;IACvB,iDAAiD;IACjD,OAAO,UAAU,IAAI,UAAU,KAAK,aAAa,CAAC,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,2BAA2B,CAAC;IAE3G,OAAO,2BAA2B,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,KAA2E,EAAe,EAAE;IACxG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,yCAAK,CAAC;IACf,CAAC;IACD,OAAO,oBAAC,KAAK,IAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,GAAI,CAAC;AACnG,CAAC,CAAC;AAEF,MAAM,oCAAoC,GAAG,CAAC,eAAiC,EAAuB,EAAE;IACtG,sDAAsD;IACtD,OAAO,eAAe,IAAI,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,MAAK,QAAQ,CAAC;IAE1F,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useState } from 'react';\nimport { useAdaptedSelector } from '../hooks/useAdaptedSelector';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { LocalDeviceSettings } from '../components/LocalDeviceSettings';\nimport { StartCallButton } from '../components/StartCallButton';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { useSelector } from '../hooks/useSelector';\nimport { ActiveErrorMessage, DevicesButton, ErrorBar, useTheme } from '@internal/react-components';\nimport { getCallingSelector } from '@internal/calling-component-bindings';\nimport { Image, Panel, PanelType, Stack } from '@fluentui/react';\nimport {\n callDetailsContainerStyles,\n configurationCenteredContent,\n configurationSectionStyle,\n deviceConfigurationStackTokens,\n fillWidth,\n logoStyles,\n panelFocusProps,\n panelStyles,\n startCallButtonStyleDesktop\n} from '../styles/CallConfiguration.styles';\nimport { LocalPreview } from '../components/LocalPreview';\nimport {\n callDetailsStyleDesktop,\n callDetailsStyleMobile,\n configurationStackTokensDesktop,\n configurationStackTokensMobile,\n configurationContainerStyle,\n selectionContainerStyle,\n startCallButtonContainerStyleDesktop,\n startCallButtonContainerStyleMobile,\n startCallButtonStyleMobile,\n titleContainerStyleDesktop,\n titleContainerStyleMobile\n} from '../styles/CallConfiguration.styles';\nimport { useLocale } from '../../localization';\nimport { bannerNotificationStyles } from '../styles/CallPage.styles';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n/* @conditional-compile-remove(call-readiness) */\nimport { DeviceCheckOptions } from '../CallComposite';\nimport { ConfigurationPageErrorBar } from '../components/ConfigurationPageErrorBar';\n/* @conditional-compile-remove(call-readiness) */\nimport { getDevicePermissionState } from '../utils';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallReadinessModal, CallReadinessModalFallBack } from '../components/CallReadinessModal';\n\nimport { VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM, useVideoEffectsPane } from '../components/SidePane/useVideoEffectsPane';\nimport { SidePane } from '../components/SidePane/SidePane';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n\nimport { useIsParticularSidePaneOpen } from '../components/SidePane/SidePaneProvider';\n\nimport { localVideoSelector } from '../../CallComposite/selectors/localVideoStreamSelector';\n\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport { SvgWithWordWrapping } from '../components/SvgWithWordWrapping';\nimport { EnvironmentInfo } from '@azure/communication-calling';\n\n/**\n * @private\n */\nexport interface ConfigurationPageProps {\n mobileView: boolean;\n startCallHandler(): void;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n modalLayerHostId: string;\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick?: () => void;\n\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n logo?: {\n url: string;\n alt?: string;\n shape?: 'unset' | 'circle';\n };\n backgroundImage?: {\n url: string;\n };\n}\n\n/**\n * @private\n */\nexport const ConfigurationPage = (props: ConfigurationPageProps): JSX.Element => {\n const {\n startCallHandler,\n mobileView,\n modalLayerHostId,\n /* @conditional-compile-remove(call-readiness) */ deviceChecks,\n /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick\n } = props;\n\n const theme = useTheme();\n\n const options = useAdaptedSelector(getCallingSelector(DevicesButton));\n const localDeviceSettingsHandlers = useHandlers(LocalDeviceSettings);\n const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector(devicePermissionSelector);\n /* @conditional-compile-remove(call-readiness) */\n // use permission API to get video and audio permission state\n const [videoState, setVideoState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n const [audioState, setAudioState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n getDevicePermissionState(setVideoState, setAudioState);\n\n const errorBarProps = usePropsFor(ErrorBar);\n const adapter = useAdapter();\n const deviceState = adapter.getState().devices;\n /* @conditional-compile-remove(unsupported-browser) */\n const environmentInfo = adapter.getState().environmentInfo;\n\n let disableStartCallButton = !microphonePermissionGranted || deviceState.microphones?.length === 0;\n const role = adapter.getState().call?.role;\n\n const isCameraOn = useSelector(localVideoSelector).isAvailable;\n\n let filteredLatestErrors: ActiveErrorMessage[] = props.latestErrors;\n\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (role !== 'Consumer') {\n filteredLatestErrors = filteredLatestErrors.filter(\n (e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari'\n );\n }\n\n if ((useIsParticularSidePaneOpen('videoeffects') || !isCameraOn) && errorBarProps) {\n filteredLatestErrors = filteredLatestErrors.filter((e) => e.type !== 'unableToStartVideoEffect');\n }\n\n if (role === 'Consumer') {\n // If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button\n // because microphone device permission is not needed for the user's role\n disableStartCallButton = false;\n }\n\n /* @conditional-compile-remove(call-readiness) */\n // Overrides role permissions if CallCompositeOptions deviceChecks are set\n if (deviceChecks) {\n if (\n ['doNotPrompt', 'optional'].includes(deviceChecks.camera) &&\n ['doNotPrompt', 'optional'].includes(deviceChecks.microphone)\n ) {\n disableStartCallButton = false;\n } else if (deviceChecks.camera === 'required') {\n disableStartCallButton = !cameraPermissionGranted || deviceState.cameras?.length === 0;\n }\n }\n\n const locale = useLocale();\n const title =\n locale.strings.call.configurationPageTitle.length > 0 ? (\n <Stack.Item className={mobileView ? titleContainerStyleMobile(theme) : titleContainerStyleDesktop(theme)}>\n <SvgWithWordWrapping\n width={mobileView ? 325 : 445}\n lineHeightPx={16 * 1.5}\n bufferHeightPx={16}\n text={locale.strings.call.configurationPageTitle}\n />\n </Stack.Item>\n ) : (\n <></>\n );\n\n const callDescription = locale.strings.call.configurationPageCallDetails && (\n <Stack.Item className={mobileView ? callDetailsStyleMobile(theme) : callDetailsStyleDesktop(theme)}>\n {locale.strings.call.configurationPageCallDetails}\n </Stack.Item>\n );\n\n const mobileWithPreview = mobileView && role !== 'Consumer';\n\n /* @conditional-compile-remove(call-readiness) */\n const permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n } = {\n // fall back to using cameraPermissionGranted and microphonePermissionGranted if permission API is not supported\n camera:\n videoState && videoState !== 'unsupported'\n ? cameraPermissionGranted !== false\n ? videoState\n : 'denied'\n : cameraPermissionGranted !== false\n ? cameraPermissionGranted\n ? 'granted'\n : 'prompt'\n : 'denied',\n microphone:\n audioState && audioState !== 'unsupported'\n ? microphonePermissionGranted !== false\n ? audioState\n : 'denied'\n : microphonePermissionGranted !== false\n ? microphonePermissionGranted\n ? 'granted'\n : 'prompt'\n : 'denied'\n };\n /* @conditional-compile-remove(call-readiness) */\n const networkErrors = errorBarProps.activeErrorMessages.filter((message) => message.type === 'callNetworkQualityLow');\n\n /* @conditional-compile-remove(call-readiness) */\n const [isPermissionsModalDismissed, setIsPermissionsModalDismissed] = useState(true);\n\n // When permission API is not available, we want to show screen saying checking for access (disappears on its own)\n // then based on permission setting, we show permission denied or nothing\n /* @conditional-compile-remove(call-readiness) */\n const [minimumFallbackTimerElapsed, setMinimumFallbackTimerElapsed] = useState(false);\n /* @conditional-compile-remove(call-readiness) */\n setTimeout(() => {\n setMinimumFallbackTimerElapsed(true);\n }, 2000);\n /* @conditional-compile-remove(call-readiness) */\n const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;\n\n const { toggleVideoEffectsPane, closeVideoEffectsPane, isVideoEffectsPaneOpen } = useVideoEffectsPane(\n props.updateSidePaneRenderer,\n mobileView,\n props.latestErrors,\n props.onDismissError\n );\n\n const startCall = useCallback(async () => {\n closeVideoEffectsPane();\n startCallHandler();\n }, [startCallHandler, closeVideoEffectsPane]);\n\n const panelLayerProps = useMemo(\n () => ({\n hostId: modalLayerHostId\n }),\n [modalLayerHostId]\n );\n\n const filteredErrorBarProps = useMemo(\n () => ({\n ...errorBarProps,\n activeErrorMessages: filteredLatestErrors\n }),\n [errorBarProps, filteredLatestErrors]\n );\n\n const containerStyles = useMemo(\n () => configurationContainerStyle(!mobileView, props.backgroundImage?.url),\n [mobileView, props.backgroundImage?.url]\n );\n\n return (\n <Stack styles={containerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <ConfigurationPageErrorBar\n /* @conditional-compile-remove(call-readiness) */\n // show trouble shooting error bar when encountering network error/ permission error\n showTroubleShootingErrorBar={\n !cameraPermissionGranted || !microphonePermissionGranted || networkErrors.length > 0\n }\n /* @conditional-compile-remove(call-readiness) */\n permissionsState={permissionsState}\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick={onNetworkingTroubleShootingClick}\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n errorBarProps={filteredErrorBarProps}\n onDismissError={props.onDismissError}\n />\n </Stack>\n {\n /* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is availible (not unsupported) and videoState, audioState is assigned values\n videoState && videoState !== 'unsupported' && audioState && audioState !== 'unsupported' && (\n <CallReadinessModal\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo={environmentInfo}\n permissionsState={permissionsState}\n isPermissionsModalDismissed={isPermissionsModalDismissed}\n setIsPermissionsModalDismissed={setIsPermissionsModalDismissed}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n doNotPromptCamera={deviceChecks?.camera === 'doNotPrompt'}\n />\n )\n }\n\n {\n /* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is not availible (unsupported) and videoState, audioState is assigned values\n videoState && audioState && (videoState === 'unsupported' || audioState === 'unsupported') && (\n <CallReadinessModalFallBack\n /* @conditional-compile-remove(call-readiness) */\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n checkPermissionModalShowing={forceShowingCheckPermissions}\n permissionsState={permissionsState}\n isPermissionsModalDismissed={isPermissionsModalDismissed}\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo={environmentInfo}\n setIsPermissionsModalDismissed={setIsPermissionsModalDismissed}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n />\n )\n }\n\n <Stack verticalFill grow horizontal className={fillWidth}>\n <Stack\n className={configurationCenteredContent(mobileWithPreview, !!props.logo)}\n verticalAlign=\"center\"\n verticalFill={mobileWithPreview}\n tokens={mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop}\n >\n <Stack.Item styles={callDetailsContainerStyles}>\n <Logo logo={props.logo} />\n {title}\n {callDescription}\n </Stack.Item>\n <Stack\n horizontal={!mobileWithPreview}\n horizontalAlign={mobileWithPreview ? 'stretch' : 'center'}\n verticalFill={mobileWithPreview}\n tokens={deviceConfigurationStackTokens}\n >\n {localPreviewTrampoline(mobileWithPreview, !!(role === 'Consumer'))}\n <Stack styles={mobileView ? undefined : configurationSectionStyle}>\n {!mobileWithPreview && (\n <Stack\n className={\n mobileView\n ? undefined\n : selectionContainerStyle(\n theme,\n isSafariBrowserEnvironmentTrampoline(\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo\n )\n )\n }\n >\n <LocalDeviceSettings\n {...options}\n {...localDeviceSettingsHandlers}\n cameraPermissionGranted={cameraPermissionGrantedTrampoline(\n cameraPermissionGranted,\n /* @conditional-compile-remove(call-readiness) */ videoState\n )}\n microphonePermissionGranted={micPermissionGrantedTrampoline(\n microphonePermissionGranted,\n /* @conditional-compile-remove(call-readiness) */ audioState\n )}\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission={() => {\n setIsPermissionsModalDismissed(true);\n }}\n onClickVideoEffects={toggleVideoEffectsPane}\n />\n </Stack>\n )}\n <Stack\n styles={mobileWithPreview ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop}\n horizontalAlign={mobileWithPreview ? 'stretch' : 'end'}\n >\n <StartCallButton\n className={mobileWithPreview ? startCallButtonStyleMobile : startCallButtonStyleDesktop}\n onClick={startCall}\n disabled={disableStartCallButton}\n hideIcon={true}\n />\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n <Panel\n isOpen={isVideoEffectsPaneOpen}\n hasCloseButton={false}\n isBlocking={false}\n isHiddenOnDismiss={false}\n styles={panelStyles}\n focusTrapZoneProps={panelFocusProps}\n layerProps={panelLayerProps}\n type={PanelType.custom}\n customWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}\n >\n <SidePane\n mobileView={props.mobileView}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n maxWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}\n minWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}\n />\n </Panel>\n </Stack>\n </Stack>\n );\n};\n\nconst localPreviewTrampoline = (mobileView: boolean, doNotShow?: boolean): JSX.Element | undefined => {\n if (doNotShow) {\n return undefined;\n }\n return <LocalPreview mobileView={mobileView} showDevicesButton={mobileView} />;\n};\n\nconst cameraPermissionGrantedTrampoline = (\n cameraPermissionGranted: boolean | undefined,\n videoState?: PermissionState | 'unsupported' | undefined\n): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return videoState && videoState !== 'unsupported' ? videoState === 'granted' : cameraPermissionGranted;\n\n return cameraPermissionGranted;\n};\n\nconst micPermissionGrantedTrampoline = (\n microphonePermissionGranted: boolean | undefined,\n audioState?: PermissionState | 'unsupported' | undefined\n): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return audioState && audioState !== 'unsupported' ? audioState === 'granted' : microphonePermissionGranted;\n\n return microphonePermissionGranted;\n};\n\nconst Logo = (props: { logo?: { url: string; alt?: string; shape?: 'unset' | 'circle' } }): JSX.Element => {\n if (!props.logo) {\n return <></>;\n }\n return <Image styles={logoStyles(props.logo.shape)} src={props.logo.url} alt={props.logo.alt} />;\n};\n\nconst isSafariBrowserEnvironmentTrampoline = (environmentInfo?: EnvironmentInfo): boolean | undefined => {\n /* @conditional-compile-remove(unsupported-browser) */\n return environmentInfo && environmentInfo?.environment.browser.toLowerCase() === 'safari';\n\n return false;\n};\n"]}
1
+ {"version":3,"file":"ConfigurationPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/ConfigurationPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,iDAAiD;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAsB,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,4CAAmC;AACnG,OAAO,EAAE,kBAAkB,EAAE,sDAA6C;AAC1E,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,yBAAyB,EACzB,8BAA8B,EAC9B,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,2BAA2B,EAC5B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,+BAA+B,EAC/B,8BAA8B,EAC9B,2BAA2B,EAC3B,uBAAuB,EACvB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soft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useState } from 'react';\nimport { useAdaptedSelector } from '../hooks/useAdaptedSelector';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { LocalDeviceSettings } from '../components/LocalDeviceSettings';\nimport { StartCallButton } from '../components/StartCallButton';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { useSelector } from '../hooks/useSelector';\nimport { ActiveErrorMessage, DevicesButton, ErrorBar, useTheme } from '@internal/react-components';\nimport { getCallingSelector } from '@internal/calling-component-bindings';\nimport { Image, Panel, PanelType, Stack } from '@fluentui/react';\nimport {\n callDetailsContainerStyles,\n configurationCenteredContent,\n configurationSectionStyle,\n deviceConfigurationStackTokens,\n fillWidth,\n logoStyles,\n panelFocusProps,\n panelStyles,\n startCallButtonStyleDesktop\n} from '../styles/CallConfiguration.styles';\nimport { LocalPreview } from '../components/LocalPreview';\nimport {\n callDetailsStyleDesktop,\n callDetailsStyleMobile,\n configurationStackTokensDesktop,\n configurationStackTokensMobile,\n configurationContainerStyle,\n selectionContainerStyle,\n startCallButtonContainerStyleDesktop,\n startCallButtonContainerStyleMobile,\n startCallButtonStyleMobile,\n titleContainerStyleDesktop,\n titleContainerStyleMobile\n} from '../styles/CallConfiguration.styles';\nimport { useLocale } from '../../localization';\nimport { bannerNotificationStyles } from '../styles/CallPage.styles';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n/* @conditional-compile-remove(call-readiness) */\nimport { DeviceCheckOptions } from '../CallComposite';\nimport { ConfigurationPageErrorBar } from '../components/ConfigurationPageErrorBar';\n/* @conditional-compile-remove(call-readiness) */\nimport { getDevicePermissionState } from '../utils';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallReadinessModal, CallReadinessModalFallBack } from '../components/CallReadinessModal';\n\nimport { VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM, useVideoEffectsPane } from '../components/SidePane/useVideoEffectsPane';\nimport { SidePane } from '../components/SidePane/SidePane';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n\nimport { useIsParticularSidePaneOpen } from '../components/SidePane/SidePaneProvider';\n\nimport { localVideoSelector } from '../../CallComposite/selectors/localVideoStreamSelector';\n\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport { SvgWithWordWrapping } from '../components/SvgWithWordWrapping';\nimport { EnvironmentInfo } from '@azure/communication-calling';\n\n/**\n * @private\n */\nexport interface ConfigurationPageProps {\n mobileView: boolean;\n startCallHandler(): void;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n modalLayerHostId: string;\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick?: () => void;\n\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n logo?: {\n url: string;\n alt?: string;\n shape?: 'unset' | 'circle';\n };\n backgroundImage?: {\n url: string;\n };\n}\n\n/**\n * @private\n */\nexport const ConfigurationPage = (props: ConfigurationPageProps): JSX.Element => {\n const {\n startCallHandler,\n mobileView,\n modalLayerHostId,\n /* @conditional-compile-remove(call-readiness) */ deviceChecks,\n /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick\n } = props;\n\n const theme = useTheme();\n\n const options = useAdaptedSelector(getCallingSelector(DevicesButton));\n const localDeviceSettingsHandlers = useHandlers(LocalDeviceSettings);\n const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector(devicePermissionSelector);\n /* @conditional-compile-remove(call-readiness) */\n // use permission API to get video and audio permission state\n const [videoState, setVideoState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n const [audioState, setAudioState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n getDevicePermissionState(setVideoState, setAudioState);\n\n const errorBarProps = usePropsFor(ErrorBar);\n const adapter = useAdapter();\n const deviceState = adapter.getState().devices;\n /* @conditional-compile-remove(unsupported-browser) */\n const environmentInfo = adapter.getState().environmentInfo;\n\n let disableStartCallButton = !microphonePermissionGranted || deviceState.microphones?.length === 0;\n const role = adapter.getState().call?.role;\n\n const isCameraOn = useSelector(localVideoSelector).isAvailable;\n\n let filteredLatestErrors: ActiveErrorMessage[] = props.latestErrors;\n\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (role !== 'Consumer') {\n filteredLatestErrors = filteredLatestErrors.filter(\n (e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari'\n );\n }\n\n if ((useIsParticularSidePaneOpen('videoeffects') || !isCameraOn) && errorBarProps) {\n filteredLatestErrors = filteredLatestErrors.filter((e) => e.type !== 'unableToStartVideoEffect');\n }\n\n if (role === 'Consumer') {\n // If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button\n // because microphone device permission is not needed for the user's role\n disableStartCallButton = false;\n }\n\n /* @conditional-compile-remove(call-readiness) */\n // Overrides role permissions if CallCompositeOptions deviceChecks are set\n if (deviceChecks) {\n if (\n ['doNotPrompt', 'optional'].includes(deviceChecks.camera) &&\n ['doNotPrompt', 'optional'].includes(deviceChecks.microphone)\n ) {\n disableStartCallButton = false;\n } else if (deviceChecks.camera === 'required') {\n disableStartCallButton = !cameraPermissionGranted || deviceState.cameras?.length === 0;\n }\n }\n\n const locale = useLocale();\n const title =\n locale.strings.call.configurationPageTitle.length > 0 ? (\n <Stack.Item className={mobileView ? titleContainerStyleMobile(theme) : titleContainerStyleDesktop(theme)}>\n <SvgWithWordWrapping\n width={mobileView ? 325 : 445}\n lineHeightPx={16 * 1.5}\n bufferHeightPx={16}\n text={locale.strings.call.configurationPageTitle}\n role=\"heading\"\n />\n </Stack.Item>\n ) : (\n <></>\n );\n\n const callDescription = locale.strings.call.configurationPageCallDetails && (\n <Stack.Item className={mobileView ? callDetailsStyleMobile(theme) : callDetailsStyleDesktop(theme)}>\n {locale.strings.call.configurationPageCallDetails}\n </Stack.Item>\n );\n\n const mobileWithPreview = mobileView && role !== 'Consumer';\n\n /* @conditional-compile-remove(call-readiness) */\n const permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n } = {\n // fall back to using cameraPermissionGranted and microphonePermissionGranted if permission API is not supported\n camera:\n videoState && videoState !== 'unsupported'\n ? cameraPermissionGranted !== false\n ? videoState\n : 'denied'\n : cameraPermissionGranted !== false\n ? cameraPermissionGranted\n ? 'granted'\n : 'prompt'\n : 'denied',\n microphone:\n audioState && audioState !== 'unsupported'\n ? microphonePermissionGranted !== false\n ? audioState\n : 'denied'\n : microphonePermissionGranted !== false\n ? microphonePermissionGranted\n ? 'granted'\n : 'prompt'\n : 'denied'\n };\n /* @conditional-compile-remove(call-readiness) */\n const networkErrors = errorBarProps.activeErrorMessages.filter((message) => message.type === 'callNetworkQualityLow');\n\n /* @conditional-compile-remove(call-readiness) */\n const [isPermissionsModalDismissed, setIsPermissionsModalDismissed] = useState(true);\n\n // When permission API is not available, we want to show screen saying checking for access (disappears on its own)\n // then based on permission setting, we show permission denied or nothing\n /* @conditional-compile-remove(call-readiness) */\n const [minimumFallbackTimerElapsed, setMinimumFallbackTimerElapsed] = useState(false);\n /* @conditional-compile-remove(call-readiness) */\n setTimeout(() => {\n setMinimumFallbackTimerElapsed(true);\n }, 2000);\n /* @conditional-compile-remove(call-readiness) */\n const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;\n\n const { toggleVideoEffectsPane, closeVideoEffectsPane, isVideoEffectsPaneOpen } = useVideoEffectsPane(\n props.updateSidePaneRenderer,\n mobileView,\n props.latestErrors,\n props.onDismissError\n );\n\n const startCall = useCallback(async () => {\n closeVideoEffectsPane();\n startCallHandler();\n }, [startCallHandler, closeVideoEffectsPane]);\n\n const panelLayerProps = useMemo(\n () => ({\n hostId: modalLayerHostId\n }),\n [modalLayerHostId]\n );\n\n const filteredErrorBarProps = useMemo(\n () => ({\n ...errorBarProps,\n activeErrorMessages: filteredLatestErrors\n }),\n [errorBarProps, filteredLatestErrors]\n );\n\n const containerStyles = useMemo(\n () => configurationContainerStyle(!mobileView, props.backgroundImage?.url),\n [mobileView, props.backgroundImage?.url]\n );\n\n return (\n <Stack styles={containerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <ConfigurationPageErrorBar\n /* @conditional-compile-remove(call-readiness) */\n // show trouble shooting error bar when encountering network error/ permission error\n showTroubleShootingErrorBar={\n !cameraPermissionGranted || !microphonePermissionGranted || networkErrors.length > 0\n }\n /* @conditional-compile-remove(call-readiness) */\n permissionsState={permissionsState}\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick={onNetworkingTroubleShootingClick}\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n errorBarProps={filteredErrorBarProps}\n onDismissError={props.onDismissError}\n />\n </Stack>\n {\n /* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is availible (not unsupported) and videoState, audioState is assigned values\n videoState && videoState !== 'unsupported' && audioState && audioState !== 'unsupported' && (\n <CallReadinessModal\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo={environmentInfo}\n permissionsState={permissionsState}\n isPermissionsModalDismissed={isPermissionsModalDismissed}\n setIsPermissionsModalDismissed={setIsPermissionsModalDismissed}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n doNotPromptCamera={deviceChecks?.camera === 'doNotPrompt'}\n />\n )\n }\n\n {\n /* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is not availible (unsupported) and videoState, audioState is assigned values\n videoState && audioState && (videoState === 'unsupported' || audioState === 'unsupported') && (\n <CallReadinessModalFallBack\n /* @conditional-compile-remove(call-readiness) */\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n checkPermissionModalShowing={forceShowingCheckPermissions}\n permissionsState={permissionsState}\n isPermissionsModalDismissed={isPermissionsModalDismissed}\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo={environmentInfo}\n setIsPermissionsModalDismissed={setIsPermissionsModalDismissed}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n />\n )\n }\n\n <Stack verticalFill grow horizontal className={fillWidth}>\n <Stack\n className={configurationCenteredContent(mobileWithPreview, !!props.logo)}\n verticalAlign=\"center\"\n verticalFill={mobileWithPreview}\n tokens={mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop}\n >\n <Stack.Item styles={callDetailsContainerStyles}>\n <Logo logo={props.logo} />\n {title}\n {callDescription}\n </Stack.Item>\n <Stack\n horizontal={!mobileWithPreview}\n horizontalAlign={mobileWithPreview ? 'stretch' : 'center'}\n verticalFill={mobileWithPreview}\n tokens={deviceConfigurationStackTokens}\n >\n {localPreviewTrampoline(mobileWithPreview, !!(role === 'Consumer'))}\n <Stack styles={mobileView ? undefined : configurationSectionStyle}>\n {!mobileWithPreview && (\n <Stack\n className={\n mobileView\n ? undefined\n : selectionContainerStyle(\n theme,\n isSafariBrowserEnvironmentTrampoline(\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo\n )\n )\n }\n >\n <LocalDeviceSettings\n {...options}\n {...localDeviceSettingsHandlers}\n cameraPermissionGranted={cameraPermissionGrantedTrampoline(\n cameraPermissionGranted,\n /* @conditional-compile-remove(call-readiness) */ videoState\n )}\n microphonePermissionGranted={micPermissionGrantedTrampoline(\n microphonePermissionGranted,\n /* @conditional-compile-remove(call-readiness) */ audioState\n )}\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission={() => {\n setIsPermissionsModalDismissed(true);\n }}\n onClickVideoEffects={toggleVideoEffectsPane}\n />\n </Stack>\n )}\n <Stack\n styles={mobileWithPreview ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop}\n horizontalAlign={mobileWithPreview ? 'stretch' : 'end'}\n >\n <StartCallButton\n className={mobileWithPreview ? startCallButtonStyleMobile : startCallButtonStyleDesktop}\n onClick={startCall}\n disabled={disableStartCallButton}\n hideIcon={true}\n />\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n <Panel\n isOpen={isVideoEffectsPaneOpen}\n hasCloseButton={false}\n isBlocking={false}\n isHiddenOnDismiss={false}\n styles={panelStyles}\n focusTrapZoneProps={panelFocusProps}\n layerProps={panelLayerProps}\n type={PanelType.custom}\n customWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}\n >\n <SidePane\n mobileView={props.mobileView}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n maxWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}\n minWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}\n />\n </Panel>\n </Stack>\n </Stack>\n );\n};\n\nconst localPreviewTrampoline = (mobileView: boolean, doNotShow?: boolean): JSX.Element | undefined => {\n if (doNotShow) {\n return undefined;\n }\n return <LocalPreview mobileView={mobileView} showDevicesButton={mobileView} />;\n};\n\nconst cameraPermissionGrantedTrampoline = (\n cameraPermissionGranted: boolean | undefined,\n videoState?: PermissionState | 'unsupported' | undefined\n): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return videoState && videoState !== 'unsupported' ? videoState === 'granted' : cameraPermissionGranted;\n\n return cameraPermissionGranted;\n};\n\nconst micPermissionGrantedTrampoline = (\n microphonePermissionGranted: boolean | undefined,\n audioState?: PermissionState | 'unsupported' | undefined\n): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return audioState && audioState !== 'unsupported' ? audioState === 'granted' : microphonePermissionGranted;\n\n return microphonePermissionGranted;\n};\n\nconst Logo = (props: { logo?: { url: string; alt?: string; shape?: 'unset' | 'circle' } }): JSX.Element => {\n if (!props.logo) {\n return <></>;\n }\n return <Image styles={logoStyles(props.logo.shape)} src={props.logo.url} alt={props.logo.alt} />;\n};\n\nconst isSafariBrowserEnvironmentTrampoline = (environmentInfo?: EnvironmentInfo): boolean | undefined => {\n /* @conditional-compile-remove(unsupported-browser) */\n return environmentInfo && environmentInfo?.environment.browser.toLowerCase() === 'safari';\n\n return false;\n};\n"]}
@@ -71,11 +71,18 @@ export interface CallWithChatClientState {
71
71
  videoBackgroundImages?: VideoBackgroundImage[];
72
72
  /** Dependency to be injected for video background effects */
73
73
  onResolveVideoEffectDependency?: () => Promise<VideoBackgroundEffectsDependency>;
74
- /** Dependency to be injected for deep noise suppression effect. */
74
+ /**
75
+ * Dependency to be injected for deep noise suppression effect.
76
+ * @beta
77
+ */
75
78
  onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;
76
- /** State to track whether the noise suppression should be on by default. */
79
+ /** State to track whether the noise suppression should be on by default.
80
+ * @beta
81
+ */
77
82
  deepNoiseSuppressionOnByDefault?: boolean;
78
- /** State to track whether to hide the noise suppression button. */
83
+ /** State to track whether to hide the noise suppression button.
84
+ * @beta
85
+ */
79
86
  hideNoiseSuppressionButton?: boolean;
80
87
  /** State to track the selected video background effect */
81
88
  selectedVideoBackgroundEffect?: VideoBackgroundEffect;
@@ -1 +1 @@
1
- {"version":3,"file":"CallWithChatAdapterState.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAqHlC;;GAEG;AACH,MAAM,UAAU,yCAAyC,CAAC,WAAwB;IAChF,MAAM,gBAAgB,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;IAEhD,OAAO;QACL,IAAI,EAAE,g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CAAC,IAAI,EAC3B,WAAW,EAAE,gBAAgB,CAAC,WAAW,EACzC,OAAO,EAAE,gBAAgB,CAAC,OAAO,EACjC,IAAI,EAAE,gBAAgB,CAAC,IAAI,EAC3B,+BAA+B,EAAE,gBAAgB,CAAC,+BAA+B,EACjF,WAAW,EAAE,gBAAgB,CAAC,WAAW,EACzC,cAAc,EAAE,gBAAgB,CAAC,cAAc,EAC/C,gBAAgB,EAAE,gBAAgB,CAAC,YAAY;QAC/C,iDAAiD;QACjD,uBAAuB,EAAE,gBAAgB,CAAC,mBAAmB,EAE7D,qBAAqB,EAAE,gBAAgB,CAAC,qBAAqB,EAE7D,8BAA8B,EAAE,gBAAgB,CAAC,8BAA8B;QAC/E,sCAAsC;QACtC,uCAAuC,EAAE,gBAAgB,CAAC,uCAAuC,EAEjG,6BAA6B,EAAE,gBAAgB,CAAC,6BAA6B,IAC7E;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { CallState, DeviceManagerState } from '@internal/calling-stateful-client';\nimport { ChatThreadClientState } from '@internal/chat-stateful-client';\nimport { CallAdapter, CallAdapterState, CallCompositePage } from '../../CallComposite';\n\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\n\nimport { VideoBackgroundEffectsDependency } from '@internal/calling-component-bindings';\nimport { ChatAdapterState } from '../../ChatComposite';\nimport { AdapterErrors } from '../../common/adapters';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { AdapterNotifications } from '../../common/adapters';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { ReactionResources } from '@internal/react-components';\n/* @conditional-compile-remove(DNS) */\nimport { DeepNoiseSuppressionEffectDependency } from '@internal/calling-component-bindings';\n\n/**\n * UI state pertaining to the {@link CallWithChatComposite}.\n *\n * @public\n */\nexport interface CallWithChatAdapterUiState {\n /**\n * Microphone state before a call has joined.\n *\n * @public\n */\n isLocalPreviewMicrophoneEnabled: boolean;\n /**\n * Current page of the Composite.\n *\n * @public\n */\n page: CallCompositePage;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * State to track whether the end user has opted in to using a\n * out of date version of a supported browser. Allows the user\n * to start a call in this state.\n *\n * @beta\n */\n unsupportedBrowserVersionsAllowed?: boolean;\n}\n\n/**\n * State from the backend services that drives {@link CallWithChatComposite}.\n *\n * @public\n */\nexport interface CallWithChatClientState {\n /** ID of the call participant using this CallWithChatAdapter. */\n userId: CommunicationIdentifierKind;\n /** Display name of the participant using this CallWithChatAdapter. */\n displayName: string | undefined;\n /** State of the current call. */\n call?: CallState;\n /** State of the current chat. */\n chat?: ChatThreadClientState;\n /** Latest call error encountered for each operation performed via the adapter. */\n latestCallErrors: AdapterErrors;\n /* @conditional-compile-remove(breakout-rooms) */\n /** Latest call notifications encountered in the call client state via the adapter. */\n latestCallNotifications: AdapterNotifications;\n /** Latest chat error encountered for each operation performed via the adapter. */\n latestChatErrors: AdapterErrors;\n /** State of available and currently selected devices */\n devices: DeviceManagerState;\n /** State of whether the active call is a Teams interop call */\n isTeamsCall: boolean;\n /** State of whether the active call is a Teams interop meeting */\n isTeamsMeeting: boolean;\n /* @conditional-compile-remove(PSTN-calls) */\n /** alternateCallerId for PSTN call */\n alternateCallerId?: string | undefined;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Environment information for system adapter is made on */\n environmentInfo?: EnvironmentInfo;\n\n /** Default set of background images for background replacement effect */\n videoBackgroundImages?: VideoBackgroundImage[];\n\n /** Dependency to be injected for video background effects */\n onResolveVideoEffectDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n /* @conditional-compile-remove(DNS) */\n /** Dependency to be injected for deep noise suppression effect. */\n onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;\n /* @conditional-compile-remove(DNS) */\n /** State to track whether the noise suppression should be on by default. */\n deepNoiseSuppressionOnByDefault?: boolean;\n /* @conditional-compile-remove(DNS) */\n /** State to track whether to hide the noise suppression button. */\n hideNoiseSuppressionButton?: boolean;\n\n /** State to track the selected video background effect */\n selectedVideoBackgroundEffect?: VideoBackgroundEffect;\n /* @conditional-compile-remove(hide-attendee-name) */\n /** Hide attendee names in teams meeting */\n hideAttendeeNames?: boolean;\n /**\n * Reaction resources to render in meetings\n * */\n reactions?: ReactionResources;\n}\n\n/**\n * CallWithChat State is a combination of Stateful Chat and Stateful Calling clients with some\n * state specific to the CallWithChat Composite only.\n *\n * @public\n */\nexport interface CallWithChatAdapterState extends CallWithChatAdapterUiState, CallWithChatClientState {}\n\n/**\n * @private\n */\nexport function callWithChatAdapterStateFromBackingStates(callAdapter: CallAdapter): CallWithChatAdapterState {\n const callAdapterState = callAdapter.getState();\n\n return {\n call: callAdapterState.call,\n chat: undefined,\n userId: callAdapterState.userId,\n page: callAdapterState.page,\n displayName: callAdapterState.displayName,\n devices: callAdapterState.devices,\n isLocalPreviewMicrophoneEnabled: callAdapterState.isLocalPreviewMicrophoneEnabled,\n isTeamsCall: callAdapterState.isTeamsCall,\n isTeamsMeeting: callAdapterState.isTeamsMeeting,\n latestCallErrors: callAdapterState.latestErrors,\n /* @conditional-compile-remove(breakout-rooms) */\n latestCallNotifications: callAdapterState.latestNotifications,\n latestChatErrors: {},\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId: callAdapterState.alternateCallerId,\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo: callAdapterState.environmentInfo,\n videoBackgroundImages: callAdapterState.videoBackgroundImages,\n onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency,\n /* @conditional-compile-remove(DNS) */\n onResolveDeepNoiseSuppressionDependency: callAdapterState.onResolveDeepNoiseSuppressionDependency,\n selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect,\n /* @conditional-compile-remove(hide-attendee-name) */\n /** Hide attendee names in teams meeting */\n hideAttendeeNames: callAdapterState.hideAttendeeNames,\n reactions: callAdapterState.reactions\n };\n}\n\n/**\n * @private\n */\nexport function mergeChatAdapterStateIntoCallWithChatAdapterState(\n existingCallWithChatAdapterState: CallWithChatAdapterState,\n chatAdapterState: ChatAdapterState\n): CallWithChatAdapterState {\n return {\n ...existingCallWithChatAdapterState,\n chat: chatAdapterState.thread,\n latestChatErrors: chatAdapterState.latestErrors\n };\n}\n\n/**\n * @private\n */\nexport function mergeCallAdapterStateIntoCallWithChatAdapterState(\n existingCallWithChatAdapterState: CallWithChatAdapterState,\n callAdapterState: CallAdapterState\n): CallWithChatAdapterState {\n return {\n ...existingCallWithChatAdapterState,\n userId: callAdapterState.userId,\n page: callAdapterState.page,\n displayName: callAdapterState.displayName,\n devices: callAdapterState.devices,\n call: callAdapterState.call,\n isLocalPreviewMicrophoneEnabled: callAdapterState.isLocalPreviewMicrophoneEnabled,\n isTeamsCall: callAdapterState.isTeamsCall,\n isTeamsMeeting: callAdapterState.isTeamsMeeting,\n latestCallErrors: callAdapterState.latestErrors,\n /* @conditional-compile-remove(breakout-rooms) */\n latestCallNotifications: callAdapterState.latestNotifications,\n\n videoBackgroundImages: callAdapterState.videoBackgroundImages,\n\n onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency,\n /* @conditional-compile-remove(DNS) */\n onResolveDeepNoiseSuppressionDependency: callAdapterState.onResolveDeepNoiseSuppressionDependency,\n\n selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect\n };\n}\n"]}
1
+ {"version":3,"file":"CallWithChatAdapterState.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AA4HlC;;GAEG;AACH,MAAM,UAAU,yCAAyC,CAAC,WAAwB;IAChF,MAAM,gBAAgB,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;IAEhD,OAAO;QACL,IAAI,EAAE,gBAAgB,CAAC,IAAI;QAC3B,IAAI,E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AAgB,CAAC,WAAW,EACzC,OAAO,EAAE,gBAAgB,CAAC,OAAO,EACjC,IAAI,EAAE,gBAAgB,CAAC,IAAI,EAC3B,+BAA+B,EAAE,gBAAgB,CAAC,+BAA+B,EACjF,WAAW,EAAE,gBAAgB,CAAC,WAAW,EACzC,cAAc,EAAE,gBAAgB,CAAC,cAAc,EAC/C,gBAAgB,EAAE,gBAAgB,CAAC,YAAY;QAC/C,iDAAiD;QACjD,uBAAuB,EAAE,gBAAgB,CAAC,mBAAmB,EAE7D,qBAAqB,EAAE,gBAAgB,CAAC,qBAAqB,EAE7D,8BAA8B,EAAE,gBAAgB,CAAC,8BAA8B;QAC/E,sCAAsC;QACtC,uCAAuC,EAAE,gBAAgB,CAAC,uCAAuC,EAEjG,6BAA6B,EAAE,gBAAgB,CAAC,6BAA6B,IAC7E;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { CallState, DeviceManagerState } from '@internal/calling-stateful-client';\nimport { ChatThreadClientState } from '@internal/chat-stateful-client';\nimport { CallAdapter, CallAdapterState, CallCompositePage } from '../../CallComposite';\n\nimport { VideoBackgroundImage, VideoBackgroundEffect } from '../../CallComposite';\n\nimport { VideoBackgroundEffectsDependency } from '@internal/calling-component-bindings';\nimport { ChatAdapterState } from '../../ChatComposite';\nimport { AdapterErrors } from '../../common/adapters';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { AdapterNotifications } from '../../common/adapters';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { ReactionResources } from '@internal/react-components';\n/* @conditional-compile-remove(DNS) */\nimport { DeepNoiseSuppressionEffectDependency } from '@internal/calling-component-bindings';\n\n/**\n * UI state pertaining to the {@link CallWithChatComposite}.\n *\n * @public\n */\nexport interface CallWithChatAdapterUiState {\n /**\n * Microphone state before a call has joined.\n *\n * @public\n */\n isLocalPreviewMicrophoneEnabled: boolean;\n /**\n * Current page of the Composite.\n *\n * @public\n */\n page: CallCompositePage;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * State to track whether the end user has opted in to using a\n * out of date version of a supported browser. Allows the user\n * to start a call in this state.\n *\n * @beta\n */\n unsupportedBrowserVersionsAllowed?: boolean;\n}\n\n/**\n * State from the backend services that drives {@link CallWithChatComposite}.\n *\n * @public\n */\nexport interface CallWithChatClientState {\n /** ID of the call participant using this CallWithChatAdapter. */\n userId: CommunicationIdentifierKind;\n /** Display name of the participant using this CallWithChatAdapter. */\n displayName: string | undefined;\n /** State of the current call. */\n call?: CallState;\n /** State of the current chat. */\n chat?: ChatThreadClientState;\n /** Latest call error encountered for each operation performed via the adapter. */\n latestCallErrors: AdapterErrors;\n /* @conditional-compile-remove(breakout-rooms) */\n /** Latest call notifications encountered in the call client state via the adapter. */\n latestCallNotifications: AdapterNotifications;\n /** Latest chat error encountered for each operation performed via the adapter. */\n latestChatErrors: AdapterErrors;\n /** State of available and currently selected devices */\n devices: DeviceManagerState;\n /** State of whether the active call is a Teams interop call */\n isTeamsCall: boolean;\n /** State of whether the active call is a Teams interop meeting */\n isTeamsMeeting: boolean;\n /* @conditional-compile-remove(PSTN-calls) */\n /** alternateCallerId for PSTN call */\n alternateCallerId?: string | undefined;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Environment information for system adapter is made on */\n environmentInfo?: EnvironmentInfo;\n\n /** Default set of background images for background replacement effect */\n videoBackgroundImages?: VideoBackgroundImage[];\n\n /** Dependency to be injected for video background effects */\n onResolveVideoEffectDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n /* @conditional-compile-remove(DNS) */\n /**\n * Dependency to be injected for deep noise suppression effect.\n * @beta\n */\n onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;\n /* @conditional-compile-remove(DNS) */\n /** State to track whether the noise suppression should be on by default.\n * @beta\n */\n deepNoiseSuppressionOnByDefault?: boolean;\n /* @conditional-compile-remove(DNS) */\n /** State to track whether to hide the noise suppression button.\n * @beta\n */\n hideNoiseSuppressionButton?: boolean;\n\n /** State to track the selected video background effect */\n selectedVideoBackgroundEffect?: VideoBackgroundEffect;\n /* @conditional-compile-remove(hide-attendee-name) */\n /** Hide attendee names in teams meeting */\n hideAttendeeNames?: boolean;\n /**\n * Reaction resources to render in meetings\n * */\n reactions?: ReactionResources;\n}\n\n/**\n * CallWithChat State is a combination of Stateful Chat and Stateful Calling clients with some\n * state specific to the CallWithChat Composite only.\n *\n * @public\n */\nexport interface CallWithChatAdapterState extends CallWithChatAdapterUiState, CallWithChatClientState {}\n\n/**\n * @private\n */\nexport function callWithChatAdapterStateFromBackingStates(callAdapter: CallAdapter): CallWithChatAdapterState {\n const callAdapterState = callAdapter.getState();\n\n return {\n call: callAdapterState.call,\n chat: undefined,\n userId: callAdapterState.userId,\n page: callAdapterState.page,\n displayName: callAdapterState.displayName,\n devices: callAdapterState.devices,\n isLocalPreviewMicrophoneEnabled: callAdapterState.isLocalPreviewMicrophoneEnabled,\n isTeamsCall: callAdapterState.isTeamsCall,\n isTeamsMeeting: callAdapterState.isTeamsMeeting,\n latestCallErrors: callAdapterState.latestErrors,\n /* @conditional-compile-remove(breakout-rooms) */\n latestCallNotifications: callAdapterState.latestNotifications,\n latestChatErrors: {},\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId: callAdapterState.alternateCallerId,\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo: callAdapterState.environmentInfo,\n videoBackgroundImages: callAdapterState.videoBackgroundImages,\n onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency,\n /* @conditional-compile-remove(DNS) */\n onResolveDeepNoiseSuppressionDependency: callAdapterState.onResolveDeepNoiseSuppressionDependency,\n selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect,\n /* @conditional-compile-remove(hide-attendee-name) */\n /** Hide attendee names in teams meeting */\n hideAttendeeNames: callAdapterState.hideAttendeeNames,\n reactions: callAdapterState.reactions\n };\n}\n\n/**\n * @private\n */\nexport function mergeChatAdapterStateIntoCallWithChatAdapterState(\n existingCallWithChatAdapterState: CallWithChatAdapterState,\n chatAdapterState: ChatAdapterState\n): CallWithChatAdapterState {\n return {\n ...existingCallWithChatAdapterState,\n chat: chatAdapterState.thread,\n latestChatErrors: chatAdapterState.latestErrors\n };\n}\n\n/**\n * @private\n */\nexport function mergeCallAdapterStateIntoCallWithChatAdapterState(\n existingCallWithChatAdapterState: CallWithChatAdapterState,\n callAdapterState: CallAdapterState\n): CallWithChatAdapterState {\n return {\n ...existingCallWithChatAdapterState,\n userId: callAdapterState.userId,\n page: callAdapterState.page,\n displayName: callAdapterState.displayName,\n devices: callAdapterState.devices,\n call: callAdapterState.call,\n isLocalPreviewMicrophoneEnabled: callAdapterState.isLocalPreviewMicrophoneEnabled,\n isTeamsCall: callAdapterState.isTeamsCall,\n isTeamsMeeting: callAdapterState.isTeamsMeeting,\n latestCallErrors: callAdapterState.latestErrors,\n /* @conditional-compile-remove(breakout-rooms) */\n latestCallNotifications: callAdapterState.latestNotifications,\n\n videoBackgroundImages: callAdapterState.videoBackgroundImages,\n\n onResolveVideoEffectDependency: callAdapterState.onResolveVideoEffectDependency,\n /* @conditional-compile-remove(DNS) */\n onResolveDeepNoiseSuppressionDependency: callAdapterState.onResolveDeepNoiseSuppressionDependency,\n\n selectedVideoBackgroundEffect: callAdapterState.selectedVideoBackgroundEffect\n };\n}\n"]}
@@ -19,7 +19,7 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
19
19
  import { _createStatefulChatClientInner } from "../../../../../chat-stateful-client/src";
20
20
  import { createDefaultChatHandlers } from "../../../../../chat-component-bindings/src";
21
21
  import { toFlatCommunicationIdentifier } from "../../../../../acs-ui-common/src";
22
- import EventEmitter from 'events';
22
+ import { EventEmitter } from 'events';
23
23
  import { useEffect, useRef, useState } from 'react';
24
24
  import { _isValidIdentifier } from "../../../../../acs-ui-common/src";
25
25
  import { TEAMS_LIMITATION_LEARN_MORE, UNSUPPORTED_CHAT_THREAD_TYPE } from '../../common/constants';