///
import { AddPhoneNumberOptions } from '@azure/communication-calling';
import { AudioDeviceInfo } from '@azure/communication-calling';
import { AudioEffectsStartConfig } from '@azure/communication-calling';
import { BackgroundBlurConfig } from '@azure/communication-calling';
import { BackgroundBlurEffect } from '@azure/communication-calling';
import { BackgroundReplacementConfig } from '@azure/communication-calling';
import { BackgroundReplacementEffect } from '@azure/communication-calling';
import { BreakoutRoom } from '@azure/communication-calling';
import { BreakoutRoomsSettings } from '@azure/communication-calling';
import { BreakoutRoomsUpdatedListener } from '@azure/communication-calling';
import { Call } from '@azure/communication-calling';
import { CallAgent } from '@azure/communication-calling';
import { CallClient } from '@azure/communication-calling';
import { CallClientOptions } from '@azure/communication-calling';
import { CallDirection } from '@azure/communication-calling';
import { CallEndReason } from '@azure/communication-calling';
import { CallerInfo } from '@azure/communication-calling';
import { CallKind } from '@azure/communication-calling';
import { CallState as CallState_2 } from '@azure/communication-calling';
import { CallSurvey } from '@azure/communication-calling';
import { CallSurveyResponse } from '@azure/communication-calling';
import { CapabilitiesChangeInfo } from '@azure/communication-calling';
import { CaptionsKind } from '@azure/communication-calling';
import { CaptionsResultType } from '@azure/communication-calling';
import { ChatClient } from '@azure/communication-chat';
import { ChatClientOptions } from '@azure/communication-chat';
import { ChatMessage as ChatMessage_2 } from '@azure/communication-chat';
import { ChatMessageReadReceipt } from '@azure/communication-chat';
import { ChatParticipant } from '@azure/communication-chat';
import { ChatThreadClient } from '@azure/communication-chat';
import { CommunicationIdentifier } from '@azure/communication-common';
import { CommunicationIdentifierKind } from '@azure/communication-common';
import { CommunicationTokenCredential } from '@azure/communication-common';
import { CommunicationUserIdentifier } from '@azure/communication-common';
import type { CommunicationUserKind } from '@azure/communication-common';
import { CreateViewOptions } from '@azure/communication-calling';
import { DeviceAccess } from '@azure/communication-calling';
import { DeviceManager } from '@azure/communication-calling';
import { DominantSpeakersInfo } from '@azure/communication-calling';
import { DtmfTone as DtmfTone_2 } from '@azure/communication-calling';
import { EnvironmentInfo } from '@azure/communication-calling';
import { GroupCallLocator } from '@azure/communication-calling';
import { IButtonProps } from '@fluentui/react';
import { IButtonStyles } from '@fluentui/react';
import { IContextualMenuItem } from '@fluentui/react';
import { IContextualMenuItemStyles } from '@fluentui/react';
import { IContextualMenuProps } from '@fluentui/react';
import { IContextualMenuStyles } from '@fluentui/react';
import { IIconProps } from '@fluentui/react';
import { IIconStyles } from '@fluentui/react';
import { IMessageBarProps } from '@fluentui/react';
import { IncomingCall } from '@azure/communication-calling';
import { IncomingCallKind } from '@azure/communication-calling';
import { IPersonaStyleProps } from '@fluentui/react';
import { IPersonaStyles } from '@fluentui/react';
import { IRawStyle } from '@fluentui/react';
import { IRenderFunction } from '@fluentui/react';
import { IStackStyles } from '@fluentui/react';
import { IStyle } from '@fluentui/react';
import { IStyleFunctionOrObject } from '@fluentui/react';
import { ITextFieldStyles } from '@fluentui/react';
import { LatestMediaDiagnostics } from '@azure/communication-calling';
import { LatestNetworkDiagnostics } from '@azure/communication-calling';
import { LocalVideoStream } from '@azure/communication-calling';
import type { MediaDiagnosticChangedEventArgs } from '@azure/communication-calling';
import { MediaStreamType } from '@azure/communication-calling';
import { MicrosoftTeamsAppIdentifier } from '@azure/communication-common';
import { MicrosoftTeamsUserIdentifier } from '@azure/communication-common';
import type { NetworkDiagnosticChangedEventArgs } from '@azure/communication-calling';
import { PartialTheme } from '@fluentui/react';
import { ParticipantCapabilities } from '@azure/communication-calling';
import { ParticipantInfo } from '@azure/communication-calling';
import { ParticipantRole } from '@azure/communication-calling';
import { PermissionConstraints } from '@azure/communication-calling';
import { PersonaInitialsColor } from '@fluentui/react';
import { PersonaPresence } from '@fluentui/react';
import { PersonaSize } from '@fluentui/react';
import { PhoneNumberIdentifier } from '@azure/communication-common';
import { PropertyChangedEvent } from '@azure/communication-calling';
import { default as React_2 } from 'react';
import { Reaction as Reaction_2 } from '@azure/communication-calling';
import { ReactionMessage } from '@azure/communication-calling';
import { RealTimeTextInfo as RealTimeTextInfo_2 } from '@azure/communication-calling';
import { RealTimeTextResultType } from '@azure/communication-calling';
import type { RemoteParticipant } from '@azure/communication-calling';
import { RemoteParticipantState as RemoteParticipantState_2 } from '@azure/communication-calling';
import { RoomCallLocator } from '@azure/communication-calling';
import { ScalingMode } from '@azure/communication-calling';
import { SendMessageOptions } from '@azure/communication-chat';
import { SpotlightedParticipant } from '@azure/communication-calling';
import { StartCallOptions } from '@azure/communication-calling';
import { StartCaptionsOptions } from '@azure/communication-calling';
import { TeamsCall } from '@azure/communication-calling';
import { TeamsCallAgent } from '@azure/communication-calling';
import { TeamsCallInfo } from '@azure/communication-calling';
import { TeamsIncomingCall } from '@azure/communication-calling';
import { TeamsMeetingIdLocator } from '@azure/communication-calling';
import { TeamsMeetingLinkLocator } from '@azure/communication-calling';
import { Theme } from '@fluentui/react';
import { TransferEventArgs } from '@azure/communication-calling';
import { TypingIndicatorReceivedEvent } from '@azure/communication-chat';
import { UnknownIdentifier } from '@azure/communication-common';
import { VideoDeviceInfo } from '@azure/communication-calling';
import { VideoEffectName } from '@azure/communication-calling';
import { VideoStreamRenderer } from '@azure/communication-calling';
import { VideoStreamRendererView } from '@azure/communication-calling';
/**
* Transfer feature state
*
* @public
*/
export declare interface AcceptedTransfer {
/**
* Stores call id of accepted transfer
*/
callId: string;
/**
* Stores timestamp when transfer was accepted
*/
timestamp: Date;
}
/**
* Active error messages to be shown via {@link ErrorBar}.
*
* @public
*/
export declare interface ActiveErrorMessage {
/**
* Type of error that is active.
*/
type: ErrorType;
/**
* The latest timestamp when this error was observed.
*
* When available, this is used to track errors that have already been seen and dismissed
* by the user.
*/
timestamp?: Date;
}
/**
* Active notifications to be shown via {@link NotificationStack}.
*
* @public
*/
export declare interface ActiveNotification {
/**
* Type of error that is active.
*/
type: NotificationType;
/**
* Callback called when the primary button inside notification bar is clicked.
*/
onClickPrimaryButton?: () => void;
/**
* Callback called when the primary button inside notification bar is clicked.
*/
onClickSecondaryButton?: () => void;
/**
* Callback called when the notification is dismissed.
*/
onDismiss?: () => void;
/**
* If set, notification will automatically dismiss after 5 seconds
*/
autoDismiss?: boolean;
/**
* The latest timestamp when this notification was observed.
*
* When available, this is used to track notifications that have already been seen and dismissed
* by the user.
*/
timestamp?: Date;
/**
* Aria-live property for the notification.
* @defaultValue polite
*/
ariaLive?: 'assertive' | 'off' | 'polite';
}
/**
* Error reported via error events and stored in adapter state.
*
* @public
*/
export declare interface AdapterError extends Error {
/**
* The operation that failed.
*/
target: string;
/**
* Error thrown by the failed operation.
*/
innerError: Error;
/**
* Timestamp added to the error in the adapter implementation.
*/
timestamp: Date;
}
/**
* Adapters stores the latest error for each operation in the state.
*
* `target` is an adapter defined string for each unique operation performed by the adapter.
*
* @public
*/
export declare type AdapterErrors = {
[target: string]: AdapterError;
};
/**
* Notification from call client state stored in adapter state.
*
* @public
*/
export declare interface AdapterNotification {
/**
* Target of notification. There should only one notification per target.
*/
target: string;
/**
* Timestamp added to the notification in the adapter implementation.
*/
timestamp: Date;
}
/**
* Adapters stores the latest notification for each target.
*
* @public
*/
export declare type AdapterNotifications = {
[target: string]: AdapterNotification;
};
/**
* Functionality for interfacing with Composite adapter state.
*
* @public
*/
export declare interface AdapterState {
/** Subscribes the handler to stateChanged events. */
onStateChange(handler: (state: TState) => void): void;
/** Unsubscribes the handler to stateChanged events. */
offStateChange(handler: (state: TState) => void): void;
/** Get the current State */
getState(): TState;
}
/**
* Compare if 2 react components are exact equal, result type will be true/false
*
* @public
*/
export declare type AreEqual JSX.Element | undefined, B extends (props: any) => JSX.Element | undefined> = true extends AreTypeEqual & AreParamEqual ? true : false;
/**
* Compare if props of 2 react components are equal, result type will be true/false
*
* @public
*/
export declare type AreParamEqual JSX.Element | undefined, B extends (props: any) => JSX.Element | undefined> = AreTypeEqual[0]>, Required[0]>>;
/**
* Compare if two types are equal, result type will be true/false
*
* @public
*/
export declare type AreTypeEqual = A extends B ? (B extends A ? true : false) : false;
/**
* Data model that represents a chat message attachment
* where it contains an ID to uniquely identify the attachment,
* a name that represents the name of file, and
* a URL to download the attachment.
*
* @public
*/
export declare interface AttachmentMetadata {
/**
* Unique ID of the attachment.
*/
id: string;
/**
* Attachment name to be displayed.
*/
name: string;
/**
* Download URL for the attachment.
*/
url: string;
}
/**
* Custom data attributes for displaying avatar for a user.
*
* @public
*/
export declare type AvatarPersonaData = {
/**
* Primary text to display, usually the name of the person.
*/
text?: string;
/**
* Image URL to use, should be a square aspect ratio and big enough to fit in the image area.
*/
imageUrl?: string;
/**
* The user's initials to display in the image area when there is no image.
* @defaultvalue Derived from `text`
*/
imageInitials?: string;
/**
* The background color when the user's initials are displayed.
* @defaultvalue Derived from `text`
*/
initialsColor?: PersonaInitialsColor | string;
/**
* The text color when the user's initials are displayed
* @defaultvalue `white`
*/
initialsTextColor?: string;
/**
* If true, show the special coin for unknown persona.
* It has '?' in place of initials, with static font and background colors
*/
showUnknownPersonaCoin?: boolean;
};
/**
* Callback function used to provide custom data to build an avatar for a user.
*
* @public
*/
export declare type AvatarPersonaDataCallback = (userId: string) => Promise;
/**
* Arguments for creating the Azure Communication Services implementation of {@link CallAdapter}.
*
* Note: `displayName` can be a maximum of 256 characters.
*
* @public
*/
export declare type AzureCommunicationCallAdapterArgs = {
userId: CommunicationUserIdentifier;
displayName: string;
credential: CommunicationTokenCredential;
locator: CallAdapterLocator;
/**
* Optional parameters for the {@link AzureCommunicationCallAdapter} created
*/
options?: AzureCommunicationCallAdapterOptions;
};
/**
* Optional parameters to create {@link AzureCommunicationCallAdapter}
*
* @public
*/
export declare type AzureCommunicationCallAdapterOptions = CommonCallAdapterOptions;
/**
* Arguments for {@link createAzureCommunicationCallWithChatAdapter}
*
* @public
*/
export declare type AzureCommunicationCallWithChatAdapterArgs = {
endpoint: string;
userId: CommunicationUserIdentifier;
displayName: string;
credential: CommunicationTokenCredential;
locator: CallAndChatLocator | TeamsMeetingLinkLocator | TeamsMeetingIdLocator;
alternateCallerId?: string;
callAdapterOptions?: AzureCommunicationCallAdapterOptions;
};
/**
* Arguments for {@link createAzureCommunicationCallWithChatAdapterFromClient}
*
* @public
*/
export declare type AzureCommunicationCallWithChatAdapterFromClientArgs = {
callLocator: CallAdapterLocator | TeamsMeetingLinkLocator;
callAgent: CallAgent;
callClient: StatefulCallClient;
chatClient: StatefulChatClient;
chatThreadClient: ChatThreadClient;
callAdapterOptions?: AzureCommunicationCallAdapterOptions;
};
/**
* Arguments for creating the Azure Communication Services implementation of {@link ChatAdapter}.
*
* @public
*/
export declare type AzureCommunicationChatAdapterArgs = {
endpoint: string;
userId: CommunicationUserIdentifier;
displayName: string;
credential: CommunicationTokenCredential;
threadId: string;
chatAdapterOptions?: ChatAdapterOptions;
};
/**
* Arguments for creating the Azure Communication Services implementation of {@link CallAdapter}.
*
* These arguments are used to create an outbound call scenarios.
*
* Note: `displayName` can be a maximum of 256 characters.
*
* @public
*/
export declare type AzureCommunicationOutboundCallAdapterArgs = {
userId: CommunicationUserIdentifier;
displayName: string;
credential: CommunicationTokenCredential;
targetCallees: StartCallIdentifier[];
/**
* A phone number in E.164 format procured using Azure Communication Services that will be used to represent callers identity.
* E.164 numbers are formatted as [+] [country code] [phone number including area code]. For example, +14255550123 for a US phone number.
*/
alternateCallerId?: string;
/**
* Optional parameters for the {@link AzureCommunicationCallAdapter} created
*/
options?: AzureCommunicationCallAdapterOptions;
};
/**
* Properties common to all composites exported from this library.
*
* @public
*/
export declare interface BaseCompositeProps> {
/**
* Fluent theme for the composite.
*
* @defaultValue light theme
*/
fluentTheme?: PartialTheme | Theme;
/**
* Custom Icon override for the composite.
* A JSX element can be provided to override the default icon.
*/
icons?: TIcons;
/**
* Locale for the composite.
*
* @defaultValue English (US)
*/
locale?: CompositeLocale;
/**
* Whether composite is displayed right-to-left.
*
* @defaultValue false
*/
rtl?: boolean;
/**
* A callback function that can be used to provide custom data to Avatars rendered
* in Composite.
*
* This will not affect the displayName shown in the composite.
* The displayName throughout the composite will be what is provided to the adapter when the adapter is created.
* will be what is provided to the adapter when the adapter is created.
*/
onFetchAvatarPersonaData?: AvatarPersonaDataCallback;
/**
* A callback function that can be used to provide custom menu items for a participant in
* participant list.
*/
onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;
}
/**
* Basic fluent styles props for all components exported from this libray.
*
* @public
*/
export declare interface BaseCustomStyles {
/** Styles for the root container. */
root?: IStyle;
}
/**
* Breakout rooms state
*
* @public
*/
export declare interface BreakoutRoomsState {
/** Breakout room assigned to local user in call */
assignedBreakoutRoom?: BreakoutRoom;
/** Breakout room settings of call. This is defined when call is a breakout room. */
breakoutRoomSettings?: BreakoutRoomsSettings;
/** Display name of breakout room. This is defined when call is a breakout room. */
breakoutRoomDisplayName?: string;
}
/**
* An Adapter interface specific for Azure Communication identity which extends {@link CommonCallAdapter}.
*
* @public
*/
export declare interface CallAdapter extends CommonCallAdapter {
/**
* Join the call with microphone initially on/off.
* @deprecated Use joinCall(options?:JoinCallOptions) instead.
* @param microphoneOn - Whether microphone is initially enabled
*
* @public
*/
joinCall(microphoneOn?: boolean): Call | undefined;
/**
* Join the call with options bag to set microphone/camera initial state when joining call
* true = turn on the device when joining call
* false = turn off the device when joining call
* 'keep'/undefined = retain devices' precall state
*
* @param options - param to set microphone/camera initially on/off/use precall state.
*
* @public
*/
joinCall(options?: JoinCallOptions): Call | undefined;
/**
* Start the call.
*
* @param participants - An array of participant ids to join
*
* @public
*/
startCall(participants: string[], options?: StartCallOptions): Call | undefined;
/**
* Start the call.
* @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called
* @public
*/
startCall(participants: StartCallIdentifier[], options?: StartCallOptions): Call | undefined;
}
/**
* Payload for {@link CallEndedListener} containing details on the ended call.
*
* @public
*/
export declare type CallAdapterCallEndedEvent = {
callId: string;
code?: number;
subCode?: number;
};
/**
* Functionality for managing the current call or start a new call
* @deprecated CallAdapter interface will be flatten, consider using CallAdapter directly
* @public
*/
export declare interface CallAdapterCallManagement extends CallAdapterCallOperations {
/**
* Join the call with microphone initially on/off.
* @deprecated Use joinCall(options?:JoinCallOptions) instead.
* @param microphoneOn - Whether microphone is initially enabled
*
* @public
*/
joinCall(microphoneOn?: boolean): Call | undefined;
/**
* Join the call with options bag to set microphone/camera initial state when joining call
* true = turn on the device when joining call
* false = turn off the device when joining call
* 'keep'/undefined = retain devices' precall state
*
* @param options - param to set microphone/camera initially on/off/use precall state.
*
* @public
*/
joinCall(options?: JoinCallOptions): Call | undefined;
/**
* Start the call.
*
* @param participants - An array of participant ids to join
*
* @public
*/
startCall(participants: string[], options?: StartCallOptions): Call | undefined;
/**
* Start the call.
* @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called
* @public
*/
startCall(participants: StartCallIdentifier[], options?: StartCallOptions): Call | undefined;
}
/**
* Functionality for managing the current call.
*
* @public
*/
export declare interface CallAdapterCallOperations {
/**
* Leave the call
*
* @param forEveryone - Whether to remove all participants when leaving
*
* @public
*/
leaveCall(forEveryone?: boolean): Promise;
/**
* Start the camera
* This method will start rendering a local camera view when the call is not active
*
* @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }
*
* @public
*/
startCamera(options?: VideoStreamOptions): Promise;
/**
* Stop the camera
* This method will stop rendering a local camera view when the call is not active
*
* @public
*/
stopCamera(): Promise;
/**
* Mute the current user during the call or disable microphone locally
*
* @public
*/
mute(): Promise;
/**
* Unmute the current user during the call or enable microphone locally
*
* @public
*/
unmute(): Promise;
/**
* Start sharing the screen during a call.
*
* @public
*/
startScreenShare(): Promise;
/**
* Raise hand for current user
*
* @public
*/
raiseHand(): Promise;
/**
* lower hand for current user
*
* @public
*/
lowerHand(): Promise;
/**
* Send reaction emoji
*
* @public
*/
onReactionClick(reaction: Reaction_2): Promise;
/**
* Stop sharing the screen
*
* @public
*/
stopScreenShare(): Promise;
/**
* Remove a participant from the call.
*
* @param userId - Id of the participant to be removed
*
* @public
*/
removeParticipant(userId: string): Promise;
/**
* Remove a participant from the call.
* @param participant - {@link @azure/communication-common#CommunicationIdentifier} of the participant to be removed
* @public
*/
removeParticipant(participant: CommunicationIdentifier): Promise;
/**
* Create the html view for a stream.
*
* @remarks
* This method is implemented for composite
*
* @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view
* @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }
*
* @public
*/
createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise;
/**
* Dispose the html view for a stream.
*
* @remarks
* This method is implemented for composite
*
* @deprecated Use {@link disposeRemoteVideoStreamView}, {@link disposeLocalVideoStreamView} and {@link disposeRemoteVideoStreamView} instead.
*
* @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view
* @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }
*
* @public
*/
disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise;
/**
* Create the html view for a stream.
*
* @remarks
* This method is implemented for composite
*
* @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }
*
* @public
*/
createTogetherModeStreamView(options?: TogetherModeStreamOptions): Promise;
/**
* Start Together mode.
*
* @public
*/
startTogetherMode(): Promise;
/**
* Recalculate the seating positions for together mode.
*
* @remarks
* This method is implemented for composite
*
* @param width - Width of the container
* @param height - Height of the container
*
* @public
*/
setTogetherModeSceneSize(width: number, height: number): void;
/**
* Dispose the html view for a stream.
*
* @remarks
* This method is implemented for composite
*
*
* @public
*/
disposeTogetherModeStreamView(): Promise;
/**
* Dispose the html view for a screen share stream
*
* @remarks
* this method is implemented for composite
*
* @param remoteUserId - Id of the participant to dispose the screen share stream view for.
*
* @public
*/
disposeScreenShareStreamView(remoteUserId: string): Promise;
/**
* Dispose the html view for a remote video stream
*
* @param remoteUserId - Id of the participant to dispose
*
* @public
*/
disposeRemoteVideoStreamView(remoteUserId: string): Promise;
/**
* Dispose the html view for a local video stream
*
* @public
*/
disposeLocalVideoStreamView(): Promise;
/**
* Holds the call.
*
* @public
*/
holdCall(): Promise;
/**
* Resumes the call from a `LocalHold` state.
*
* @public
*/
resumeCall(): Promise;
/**
* Add a participant to the call.
*
* @public
*/
addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise;
addParticipant(participant: CommunicationUserIdentifier): Promise;
/**
* send dtmf tone to another participant in a 1:1 PSTN call
*
* @public
*/
sendDtmfTone(dtmfTone: DtmfTone_2): Promise;
/**
* Function to Start captions
* @param options - options for start captions
*/
startCaptions(options?: StartCaptionsAdapterOptions): Promise;
/**
* Function to set caption language
* @param language - language set for caption
*/
setCaptionLanguage(language: string): Promise;
/**
* Function to set spoken language
* @param language - spoken language
*/
setSpokenLanguage(language: string): Promise;
/**
* Funtion to stop captions
*/
stopCaptions(options?: StopCaptionsAdapterOptions): Promise;
/**
* Start the video background effect.
*
* @public
*/
startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise;
/**
* Stop the video background effect.
*
* @public
*/
stopVideoBackgroundEffects(): Promise;
/**
* Override the background picker images for background replacement effect.
*
* @param backgroundImages - Array of custom background images.
*
* @public
*/
updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;
/**
* Update the selected video background effect.
*
* @public
*/
updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void;
/**
* Start the noise suppression effect.
*
*/
startNoiseSuppressionEffect(): Promise;
/**
* Stop the noise suppression effect.
*
*/
stopNoiseSuppressionEffect(): Promise;
/**
* Send the end of call survey result
*
* @public
*/
submitSurvey(survey: CallSurvey): Promise;
/**
* Start spotlight for local and remote participants by their user ids.
* If no array of user ids is passed then action is performed on local participant.
*/
startSpotlight(userIds?: string[]): Promise;
/**
* Stop spotlight for local and remote participants by their user ids.
* If no array of user ids is passed then action is performed on local participant.
*/
stopSpotlight(userIds?: string[]): Promise;
/**
* Stop all spotlights
*/
stopAllSpotlight(): Promise;
/**
* Mute a participant
*
* @param userId - Id of the participant to mute
*/
muteParticipant(userId: string): Promise;
/**
* Mute All participants
*/
muteAllRemoteParticipants(): Promise;
/**
* Return to origin call of breakout room
*/
returnFromBreakoutRoom(): Promise;
/**
* Forbid Teams meeting attendees audio by their user ids.
*/
forbidAudio(userIds: string[]): Promise;
/**
* Permit Teams meeting attendees audio by their user ids.
*/
permitAudio(userIds: string[]): Promise;
/**
* Forbid Teams meeting audio.
*/
forbidOthersAudio(): Promise;
/**
* Permit Teams meeting audio.
*/
permitOthersAudio(): Promise;
/**
* Forbid Teams meeting attendees video by their user ids.
*/
forbidVideo(userIds: string[]): Promise;
/**
* Permit Teams meeting attendees audio by their user ids.
*/
permitVideo(userIds: string[]): Promise;
/**
* Forbid Teams meeting video.
*/
forbidOthersVideo(): Promise;
/**
* Permit Teams meeting video.
*/
permitOthersVideo(): Promise;
/**
* Send real time text
* @param text - real time text content
* @param finalized - Boolean to indicate if the real time text is final
*/
sendRealTimeText: (text: string, isFinalized: boolean) => Promise;
}
/**
* {@link CommonCallAdapter} state inferred from Azure Communication Services backend.
*
* @public
*/
export declare type CallAdapterClientState = {
userId: CommunicationIdentifierKind;
displayName?: string;
call?: CallState;
/**
* State to track who the original call went out to. will be undefined the call is not a outbound
* modality. This includes, groupCalls, Rooms calls, and Teams InteropMeetings.
*/
targetCallees?: CommunicationIdentifier[];
devices: DeviceManagerState;
endedCall?: CallState;
/**
* State to track whether the call is a teams call.
*/
isTeamsCall: boolean;
/**
* State to track whether the call is a teams meeting.
*/
isTeamsMeeting: boolean;
/**
* State to track whether the call is a rooms call.
*/
isRoomsCall: boolean;
/**
* Latest error encountered for each operation performed via the adapter.
*/
latestErrors: AdapterErrors;
/**
* Latest notifications from call client state.
*/
latestNotifications: AdapterNotifications;
/**
* Azure communications Phone number to make PSTN calls with.
*/
alternateCallerId?: string;
/**
* Environment information about system the adapter is made on
*/
environmentInfo?: EnvironmentInfo;
/**
* State to track whether the local participant's camera is on. To be used when creating a custom
* control bar with the CallComposite.
*/
cameraStatus?: 'On' | 'Off';
/**
* Default set of background images for background replacement effect.
*/
videoBackgroundImages?: VideoBackgroundImage[];
/**
* Dependency to be injected for video background effect.
*/
onResolveVideoEffectDependency?: () => Promise;
/**
* Dependency to be injected for deep noise suppression effect.
*/
onResolveDeepNoiseSuppressionDependency?: () => Promise;
/**
* State to track whether the noise suppression should be on by default.
* @default true
*/
deepNoiseSuppressionOnByDefault?: boolean;
/**
* State to track whether to hide the noise suppression button.
* @default false
*/
hideDeepNoiseSuppressionButton?: boolean;
/**
* State to track the selected video background effect.
*/
selectedVideoBackgroundEffect?: VideoBackgroundEffect;
/**
* Call from transfer request accepted by local user
*/
acceptedTransferCallState?: CallState;
/**
* Hide attendee names in teams meeting
*/
hideAttendeeNames?: boolean;
/**
* State to track the sounds to be used in the call.
*/
sounds?: CallingSounds;
/**
* State to track the reactions to be used.
* @public
*/
reactions?: ReactionResources;
};
/**
* Functionality for managing devices within a call.
*
* @public
*/
export declare interface CallAdapterDeviceManagement {
/**
* Ask for permissions of devices.
*
* @remarks
* Browser permission window will pop up if permissions are not granted yet
*
* @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }
*
* @public
*/
askDevicePermission(constrain: PermissionConstraints): Promise;
/**
* Query for available camera devices.
*
* @remarks
* This method should be called after askDevicePermission()
*
* @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }
*
* @public
*/
queryCameras(): Promise;
/**
* Query for available microphone devices.
*
* @remarks
* This method should be called after askDevicePermission()
*
* @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }
*
* @public
*/
queryMicrophones(): Promise;
/**
* Query for available speaker devices.
*
* @remarks
* This method should be called after askDevicePermission()
*
* @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }
*
* @public
*/
querySpeakers(): Promise;
/**
* Set the camera to use in the call.
*
* @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }
* @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }
*
* @public
*/
setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise;
/**
* Set the microphone to use in the call.
*
* @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }
*
* @public
*/
setMicrophone(sourceInfo: AudioDeviceInfo): Promise;
/**
* Set the speaker to use in the call.
*
* @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }
*
* @public
*/
setSpeaker(sourceInfo: AudioDeviceInfo): Promise;
}
/**
* Locator used by {@link createAzureCommunicationCallAdapter} to locate the call to join
*
* @public
*/
export declare type CallAdapterLocator = TeamsMeetingLinkLocator | GroupCallLocator | RoomCallLocator | TeamsMeetingIdLocator;
/**
* {@link CommonCallAdapter} state.
*
* @public
*/
export declare type CallAdapterState = CallAdapterUiState & CallAdapterClientState;
/**
* Call composite events that can be subscribed to.
*
* @public
*/
export declare interface CallAdapterSubscribers {
/**
* Subscribe function for 'participantsJoined' event.
*/
on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;
/**
* Subscribe function for 'participantsLeft' event.
*/
on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;
/**
* Subscribe function for 'isMutedChanged' event.
*
* @remarks
* The event will be triggered whenever current user or remote user mute state changed
*
*/
on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;
/**
* Subscribe function for 'callIdChanged' event.
*
* @remarks
* The event will be triggered when callId of current user changed.
*
*/
on(event: 'callIdChanged', listener: CallIdChangedListener): void;
/**
* Subscribe function for 'isLocalScreenSharingActiveChanged' event.
*/
on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;
/**
* Subscribe function for 'displayNameChanged' event.
*/
on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;
/**
* Subscribe function for 'isSpeakingChanged' event.
*/
on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;
/**
* Subscribe function for 'callEnded' event.
*/
on(event: 'callEnded', listener: CallEndedListener): void;
/**
* Subscribe function for 'diagnosticChanged' event.
*
* This event fires whenever there is a change in user facing diagnostics about the ongoing call.
*/
on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;
/**
* Subscribe function for 'selectedMicrophoneChanged' event.
*
* This event fires whenever the user selects a new microphone device.
*/
on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;
/**
* Subscribe function for 'selectedSpeakerChanged' event.
*
* This event fires whenever the user selects a new speaker device.
*/
on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;
/**
* Subscribe function for 'error' event.
*/
on(event: 'error', listener: (e: AdapterError) => void): void;
/**
* Subscribe function for 'captionsReceived' event.
*/
on(event: 'captionsReceived', listener: CaptionsReceivedListener): void;
/**
* Subscribe function for 'isCaptionsActiveChanged' event.
*/
on(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;
/**
* Subscribe function for 'isCaptionLanguageChanged' event.
*/
on(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;
/**
* Subscribe function for 'isSpokenLanguageChanged' event.
*/
on(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;
/**
* Subscribe function for 'realTimeTextReceived' event.
*/
on(event: 'realTimeTextReceived', listener: RealTimeTextReceivedListener): void;
/**
* Subscribe function for 'transferRequested' event.
*/
on(event: 'transferAccepted', listener: TransferAcceptedListener): void;
/**
* Subscribe function for 'capabilitiesChanged' event.
*/
on(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;
/**
* Subscribe function for 'roleChanged' event.
*/
on(event: 'roleChanged', listener: PropertyChangedEvent): void;
/**
* Subscribe function for 'spotlightChanged' event.
*/
on(event: 'spotlightChanged', listener: SpotlightChangedListener): void;
/**
* Subscribe function for 'mutedByOthers' event.
*/
on(event: 'mutedByOthers', listener: PropertyChangedEvent): void;
/**
* Subscribe function for 'breakoutRoomsUpdated' event.
*/
on(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;
/**
* Unsubscribe function for 'participantsJoined' event.
*/
off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;
/**
* Unsubscribe function for 'participantsLeft' event.
*/
off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;
/**
* Unsubscribe function for 'isMutedChanged' event.
*/
off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;
/**
* Unsubscribe function for 'callIdChanged' event.
*/
off(event: 'callIdChanged', listener: CallIdChangedListener): void;
/**
* Unsubscribe function for 'isLocalScreenSharingActiveChanged' event.
*/
off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;
/**
* Unsubscribe function for 'displayNameChanged' event.
*/
off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;
/**
* Unsubscribe function for 'isSpeakingChanged' event.
*/
off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;
/**
* Unsubscribe function for 'callEnded' event.
*/
off(event: 'callEnded', listener: CallEndedListener): void;
/**
* Unsubscribe function for 'diagnosticChanged' event.
*/
off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;
/**
* Unsubscribe function for 'selectedMicrophoneChanged' event.
*/
off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;
/**
* Unsubscribe function for 'selectedSpeakerChanged' event.
*/
off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;
/**
* Unsubscribe function for 'error' event.
*/
off(event: 'error', listener: (e: AdapterError) => void): void;
/**
* Unsubscribe function for 'captionsReceived' event.
*/
off(event: 'captionsReceived', listener: CaptionsReceivedListener): void;
/**
* Unsubscribe function for 'isCaptionsActiveChanged' event.
*/
off(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;
/**
* Unsubscribe function for 'isCaptionLanguageChanged' event.
*/
off(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;
/**
* Unsubscribe function for 'isSpokenLanguageChanged' event.
*/
off(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;
/**
* Unsubscribe function for 'realTimeTextReceived' event.
*/
off(event: 'realTimeTextReceived', listener: RealTimeTextReceivedListener): void;
/**
* Unsubscribe function for 'transferRequested' event.
*/
off(event: 'transferAccepted', listener: TransferAcceptedListener): void;
/**
* Unsubscribe function for 'capabilitiesChanged' event.
*/
off(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;
/**
* Unsubscribe function for 'roleChanged' event.
*/
off(event: 'roleChanged', listener: PropertyChangedEvent): void;
/**
* Unsubscribe function for 'spotlightChanged' event.
*/
off(event: 'spotlightChanged', listener: SpotlightChangedListener): void;
/**
* Unsubscribe function for 'mutedByOthers' event.
*/
off(event: 'mutedByOthers', listener: PropertyChangedEvent): void;
/**
* Unsubscribe function for 'breakoutRoomsUpdated' event.
*/
off(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;
}
/**
* {@link CommonCallAdapter} state for pure UI purposes.
*
* @public
*/
export declare type CallAdapterUiState = {
isLocalPreviewMicrophoneEnabled: boolean;
page: CallCompositePage;
};
/**
* A {@link React.Context} that stores a {@link @azure/communication-calling#CallAgent}.
*
* Calling components from this package must be wrapped with a {@link CallAgentProvider}.
*
* @public
*/
export declare const CallAgentProvider: (props: CallAgentProviderProps) => JSX.Element;
/**
* Arguments to initialize a {@link CallAgentProvider}.
*
* @public
*/
export declare interface CallAgentProviderProps {
children: React_2.ReactNode;
callAgent?: CallAgent | TeamsCallAgent;
}
/**
* State only version of {@link @azure/communication-calling#CallAgent} except calls is moved to be a child directly of
* {@link CallClientState} and not included here. The reason to have CallAgent's state proxied is to provide access to
* displayName. We don't flatten CallAgent.displayName and put it in CallClientState because it would be ambiguious that
* displayName is actually reliant on the creation/existence of CallAgent to be available.
*
* @public
*/
export declare interface CallAgentState {
/**
* Proxy of {@link @azure/communication-calling#CallAgent.displayName}.
*/
displayName?: string;
}
/**
* Arguments for use in {@link createAzureCommunicationCallWithChatAdapter} to join a Call with an associated Chat thread.
*
* @public
*/
export declare interface CallAndChatLocator {
/** Locator used by {@link createAzureCommunicationCallWithChatAdapter} to locate the call to join */
callLocator: GroupCallLocator;
/** Chat thread ID used by {@link createAzureCommunicationCallWithChatAdapter} to locate the chat thread to join */
chatThreadId: string;
}
/**
* A {@link React.Context} that stores a {@link StatefulCallClient}.
*
* Calling components from this package must be wrapped with a {@link CallClientProvider}.
*
* @public
*/
export declare const CallClientProvider: (props: CallClientProviderProps) => JSX.Element;
/**
* Arguments to initialize a {@link CallClientProvider}.
*
* @public
*/
export declare interface CallClientProviderProps {
children: React_2.ReactNode;
callClient: StatefulCallClient;
}
/**
* Container for all of the state data proxied by {@link StatefulCallClient}. The calls, callsEnded, incomingCalls, and
* incomingCallsEnded states will be automatically provided if a callAgent has been created. The deviceManager will be
* empty initially until populated see {@link DeviceManagerState}. The userId state is provided as a convenience for the
* developer and is completely controled and set by the developer.
*
* @public
*/
export declare interface CallClientState {
/**
* Proxy of {@link @azure/communication-calling#CallAgent.calls} as an object with CallState {@link CallState} fields.
* It is keyed by {@link @azure/communication-calling#Call.id}. Please note that
* {@link @azure/communication-calling#Call.id} could change. You should not cache the id itself but the entire
* {@link @azure/communication-calling#Call} and then use the id contained to look up data in this map.
*/
calls: {
[key: string]: CallState;
};
/**
* Calls that have ended are stored here so the callEndReason could be checked.
* It is an object with {@link @azure/communication-calling#Call.id} keys and {@link CallState} values.
*
* Only {@link MAX_CALL_HISTORY_LENGTH} Calls are kept in the history. Oldest calls are evicted if required.
*/
callsEnded: {
[key: string]: CallState;
};
/**
* Proxy of {@link @azure/communication-calling#IncomingCall} as an object with {@link IncomingCall} fields.
* It is keyed by {@link @azure/communication-calling#IncomingCall.id}.
*/
incomingCalls: {
[key: string]: IncomingCallState | TeamsIncomingCallState;
};
/**
* Incoming Calls that have ended are stored here so the callEndReason could be checked.
* It is an as an object with {@link @azure/communication-calling#Call.id} keys and {@link IncomingCall} values.
*
* Only {@link MAX_CALL_HISTORY_LENGTH} Calls are kept in the history. Oldest calls are evicted if required.
*/
incomingCallsEnded: {
[key: string]: IncomingCallState | TeamsIncomingCallState;
};
/**
* Proxy of {@link @azure/communication-calling#DeviceManager}. Please review {@link DeviceManagerState}.
*/
deviceManager: DeviceManagerState;
/**
* Proxy of {@link @azure/communication-calling#CallAgent}. Please review {@link CallAgentState}.
*/
callAgent?: CallAgentState;
/**
* Stores a userId. This is not used by the {@link StatefulCallClient} and is provided here as a convenience for the
* developer for easier access to userId. Must be passed in at initialization of the {@link StatefulCallClient}.
* Completely controlled by the developer.
*/
userId: CommunicationIdentifierKind;
/**
* Stores the latest error for each API method.
*
* See documentation of {@Link CallErrors} for details.
*/
latestErrors: CallErrors;
/**
* Stores the latest notifications.
*
* See documentation of {@Link CallNotifications} for details.
*/
latestNotifications: CallNotifications;
/**
* A phone number in E.164 format that will be used to represent callers identity.
* For example, using the alternateCallerId to add a participant using PSTN, this number will
* be used as the caller id in the PSTN call.
*/
alternateCallerId?: string;
/**
* state to track the environment that the stateful client was made in is supported
*/
environmentInfo?: EnvironmentInfo;
}
/**
* A customizable UI composite for calling experience.
*
* @remarks Call composite min width/height are as follow:
* - mobile: 17.5rem x 21rem (280px x 336px, with default rem at 16px)
* - desktop: 30rem x 22rem (480px x 352px, with default rem at 16px)
*
* @public
*/
export declare const CallComposite: (props: CallCompositeProps) => JSX.Element;
/**
* Icons that can be overridden for {@link CallComposite}.
*
* @public
*/
export declare type CallCompositeIcons = {
ControlBarPeopleButton?: JSX.Element;
ControlButtonCameraOff?: JSX.Element;
ControlButtonCameraOn?: JSX.Element;
ControlButtonEndCall?: JSX.Element;
ControlButtonMicOff?: JSX.Element;
ControlButtonMicOn?: JSX.Element;
ControlButtonOptions?: JSX.Element;
ControlButtonParticipants?: JSX.Element;
ControlButtonScreenShareStart?: JSX.Element;
ControlButtonScreenShareStop?: JSX.Element;
ControlButtonCameraProhibited?: JSX.Element;
ControlButtonCameraProhibitedSmall?: JSX.Element;
ControlButtonMicProhibited?: JSX.Element;
ControlButtonMicProhibitedSmall?: JSX.Element;
ControlButtonRaiseHand?: JSX.Element;
ControlButtonLowerHand?: JSX.Element;
ControlButtonExitSpotlight?: JSX.Element;
RaiseHandContextualMenuItem?: JSX.Element;
ReactionContextualMenuItem?: JSX.Element;
LowerHandContextualMenuItem?: JSX.Element;
ReactionButtonIcon?: JSX.Element;
ErrorBarCallCameraAccessDenied?: JSX.Element;
ErrorBarCallCameraAlreadyInUse?: JSX.Element;
ErrorBarCallLocalVideoFreeze?: JSX.Element;
ErrorBarCallMacOsCameraAccessDenied?: JSX.Element;
ErrorBarCallMacOsMicrophoneAccessDenied?: JSX.Element;
ErrorBarCallMicrophoneAccessDenied?: JSX.Element;
ErrorBarCallMicrophoneMutedBySystem?: JSX.Element;
ErrorBarCallMicrophoneUnmutedBySystem?: JSX.Element;
ErrorBarCallNetworkQualityLow?: JSX.Element;
ErrorBarCallNoMicrophoneFound?: JSX.Element;
ErrorBarCallNoSpeakerFound?: JSX.Element;
ErrorBarClear?: JSX.Element;
HorizontalGalleryLeftButton?: JSX.Element;
HorizontalGalleryRightButton?: JSX.Element;
LobbyScreenConnectingToCall?: JSX.Element;
LobbyScreenWaitingToBeAdmitted?: JSX.Element;
LocalDeviceSettingsCamera?: JSX.Element;
LocalDeviceSettingsMic?: JSX.Element;
LocalDeviceSettingsSpeaker?: JSX.Element;
LocalPreviewPlaceholder?: JSX.Element;
Muted?: JSX.Element;
NetworkReconnectIcon?: JSX.Element;
NoticePageAccessDeniedTeamsMeeting?: JSX.Element;
NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element;
NoticePageLeftCall?: JSX.Element;
NoticePageRemovedFromCall?: JSX.Element;
NoticePageCallRejected?: JSX.Element;
NoticePageNotInvitedToRoom?: JSX.Element;
NoticePageRoomNotFound?: JSX.Element;
NoticePageRoomNotValid?: JSX.Element;
NoticePageCallTimeout?: JSX.Element;
OptionsCamera?: JSX.Element;
OptionsMic?: JSX.Element;
OptionsSpeaker?: JSX.Element;
ParticipantItemMicOff?: JSX.Element;
ParticipantItemOptions?: JSX.Element;
ParticipantItemOptionsHovered?: JSX.Element;
ParticipantItemScreenShareStart?: JSX.Element;
VideoTileMicOff?: JSX.Element;
LocalCameraSwitch?: JSX.Element;
PeoplePaneAddPerson?: JSX.Element;
PeoplePaneOpenDialpad?: JSX.Element;
DialpadStartCall?: JSX.Element;
NoticePageInviteToRoomRemoved?: JSX.Element;
BlurVideoBackground?: JSX.Element;
RemoveVideoBackgroundEffect?: JSX.Element;
GalleryOptions?: JSX.Element;
SpeakerGalleryLayout?: JSX.Element;
FloatingLocalVideoGalleryLayout?: JSX.Element;
DefaultGalleryLayout?: JSX.Element;
FocusedContentGalleryLayout?: JSX.Element;
OverflowGalleryTop?: JSX.Element;
LargeGalleryLayout?: JSX.Element;
DefaultCustomButton?: JSX.Element;
DtmfDialpadButton?: JSX.Element;
PhoneNumberButton?: JSX.Element;
JoinByPhoneDialStepIcon?: JSX.Element;
JoinByPhoneConferenceIdIcon?: JSX.Element;
JoinByPhoneWaitToBeAdmittedIcon?: JSX.Element;
PeoplePaneMoreButton?: JSX.Element;
StopAllSpotlightMenuButton?: JSX.Element;
TogetherModeLayout?: JSX.Element;
};
/**
* Props for the OutboundCallComposite that you can use in your application.
*
* Contains two options bags:
* - adapterOptions: Options for the {@link AzureCommunicationCallAdapter}
* - callCompositeOptions: Options for the {@link CallComposite} {@link CallCompositeOptions}
*
* @public
*/
export declare interface CallCompositeLoaderProps extends Partial> {
/**
* UserId for the local user.
*/
userId: CommunicationUserIdentifier;
/**
* CommunicationTokenCredential for the local user.
*/
credential: CommunicationTokenCredential;
/**
* Display name for the local user.
*/
displayName: string;
/**
* locator for the call
*/
locator: CallAdapterLocator;
/**
* Options for the {@link AzureCommunicationCallAdapter}
* This is used to configure the call adapter.
*/
callAdapterOptions?: AzureCommunicationCallAdapterOptions;
/**
* Options for the {@link CallComposite} {@link CallCompositeOptions}
* This is used to configure the call composite.
*/
callCompositeOptions?: CallCompositeOptions;
/**
* Device form factor for the composite.
*/
formFactor?: 'mobile' | 'desktop';
}
/**
* Optional features of the {@link CallComposite}.
*
* @public
*/
export declare type CallCompositeOptions = {
captionsBanner?: {
height: 'full' | 'default';
};
/**
* Surface Azure Communication Services backend errors in the UI with {@link @azure/communication-react#ErrorBar}.
* Hide or show the error bar.
* @defaultValue true
*/
errorBar?: boolean;
/**
* Hide or Customize the control bar element.
* Can be customized by providing an object of type {@link @azure/communication-react#CallControlOptions}.
* @defaultValue true
*/
callControls?: boolean | CallControlOptions;
/**
* Remote participant video tile menu options
*/
remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;
/**
* Options for controlling the local video tile.
*
* @remarks if 'false' the local video tile will not be rendered.
*/
localVideoTile?: boolean | LocalVideoTileOptions;
/**
* Options for controlling video tile.
*/
videoTilesOptions?: VideoTilesOptions;
/**
* Options for controlling the notifications in the composite.
*/
notificationOptions?: NotificationOptions_2;
/**
* Whether to auto show the DTMF Dialer when the call starts in supported scenarios.
* - Teams Voice Application like Call queue or Auto Attendant
* - PSTN Calls
* @defaultValue false
*/
disableAutoShowDtmfDialer?: boolean | DtmfDialPadOptions;
/**
* Options for controlling the starting layout of the composite's video gallery
*/
galleryOptions?: {
/**
* Layout for the gallery when the call starts
*/
layout?: VideoGalleryLayout;
/**
* Controls the view of the local screenshare stream in the gallery
*/
localScreenShareView?: LocalScreenShareView;
};
/**
* Options for end of call survey
*/
surveyOptions?: {
/**
* Disable call survey at the end of a call.
* @defaultValue false
*/
disableSurvey?: boolean;
/**
* Optional callback to redirect users to custom screens when survey is done, note that default end call screen will be shown if this callback is not provided
* This callback can be used to redirect users to different screens depending on survey state, whether it is submitted, skipped or has a problem when submitting the survey
*/
onSurveyClosed?: (surveyState: 'sent' | 'skipped' | 'error', surveyError?: string) => void;
/**
* Optional callback to handle survey data including free form text response
* Note that free form text response survey option is only going to be enabled when this callback is provided
* User will need to handle all free form text response on their own
*/
onSurveySubmitted?: (callId: string, surveyId: string,
/**
* This is the survey results containing star survey data and API tag survey data.
* This part of the result will always be sent to the calling sdk
* This callback provides user with the ability to gain access to survey data
*/
submittedSurvey: CallSurvey,
/**
* This is the survey results containing free form text
* This part of the result will not be handled by composites
* User will need to collect and handle this information 100% on their own
* Free form text survey is not going to show in the UI if onSurveySubmitted is not populated
*/
improvementSuggestions: CallSurveyImprovementSuggestions) => Promise;
};
/**
* Options for setting additional customizations related to personalized branding.
*/
branding?: {
/**
* Logo displayed on the configuration page.
*/
logo?: {
/**
* URL for the logo image.
*
* @remarks
* Recommended size is 80x80 pixels.
*/
url: string;
/**
* Alt text for the logo image.
*/
alt?: string;
/**
* The logo can be displayed as a circle.
*
* @defaultValue 'unset'
*/
shape?: 'unset' | 'circle';
};
/**
* Background image displayed on the configuration page.
*/
backgroundImage?: {
/**
* URL for the background image.
*
* @remarks
* Background image should be larger than 576x567 pixels and smaller than 2048x2048 pixels pixels.
*/
url: string;
};
};
/**
* Options for settings related to spotlight.
*/
spotlight?: {
/**
* Flag to hide the menu buttons to start and stop spotlight for remote participants and the local participant.
* @defaultValue false
*/
hideSpotlightButtons?: boolean;
};
/**
* Options for settings related to joining a call.
*/
joinCallOptions?: {
/**
* options for checking microphone permissions when joining a call.
* block on access will block the user from joining the call if the microphone permission is not granted.
* skip will allow the user to join the call without granting the microphone permission.
* @defaultValue 'requireMicrophoneAvailable'
*/
microphoneCheck?: 'requireMicrophoneAvailable' | 'skip';
};
};
/**
* Major UI screens shown in the {@link CallComposite}.
*
* @public
*/
export declare type CallCompositePage = 'accessDeniedTeamsMeeting' | 'call' | 'configuration' | 'hold' | 'joinCallFailedDueToNoNetwork' | 'leftCall' | 'leaving' | 'lobby' | 'removedFromCall' | 'transferring' | 'badRequest' | 'returningFromBreakoutRoom';
/**
* Props for {@link CallComposite}.
*
* @public
*/
export declare interface CallCompositeProps extends BaseCompositeProps {
/**
* An adapter provides logic and data to the composite.
* Composite can also be controlled using the adapter.
*/
adapter: CommonCallAdapter;
/**
* Optimizes the composite form factor for either desktop or mobile.
* @remarks `mobile` is currently only optimized for Portrait mode on mobile devices and does not support landscape.
* @defaultValue 'desktop'
*/
formFactor?: 'desktop' | 'mobile';
/**
* URL to invite new participants to the current call. If this is supplied, a button appears in the Participants
* Button flyout menu.
*/
callInvitationUrl?: string;
/**
* Flags to enable/disable or customize UI elements of the {@link CallComposite}.
*/
options?: CallCompositeOptions;
}
/**
* Strings used by the {@link CallComposite} directly.
*
* This strings are in addition to those used by the components from the component library.
*
* @public
*/
export declare interface CallCompositeStrings {
/**
* Title of configuration page.
*/
configurationPageTitle: string;
/**
* Optional 1-2 lines on the call details used on the configuration page.
*/
configurationPageCallDetails?: string;
/**
* Text in button to start call in configuration page.
*/
startCallButtonLabel: string;
/**
* Text in button to rejoin an ended call.
*/
rejoinCallButtonLabel: string;
/**
* Placeholder text for local device settings dropdowns.
*/
defaultPlaceHolder: string;
/**
* Label for camera dropdown.
*/
cameraLabel: string;
/**
* Label for when there are no cameras present on configuration screen.
*/
noCamerasLabel: string;
/**
* Label for sound dropdown.
*/
soundLabel: string;
/**
* Label for when no microphones were found on the configuration screen
*/
noMicrophonesLabel: string;
/**
* Label for when no speakers were found on the configuration screen.
*/
noSpeakersLabel: string;
/**
* Error shown when camera access is blocked by the browser.
*/
cameraPermissionDenied: string;
/**
* Error shown when the camera is turned off.
*/
cameraTurnedOff: string;
/**
* Error shown when microphone access is blocked by the browser.
*/
microphonePermissionDenied: string;
/**
* Title text of the page shown to the user when joining a Teams meeting fails because meeting owner denied access.
*/
failedToJoinTeamsMeetingReasonAccessDeniedTitle: string;
/**
* More details text of the page shown to the user when joining a Teams meeting fails because meeting owner denied access.
*/
failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails?: string;
/**
* Title text of the page shown to the user when joining a call fails due to a network problem.
*/
failedToJoinCallDueToNoNetworkTitle: string;
/**
* More details text of the page shown to the user when joining a call fails due to a network problem.
*/
failedToJoinCallDueToNoNetworkMoreDetails?: string;
/**
* Text to display on a leaving page.
*/
leavingCallTitle?: string;
/**
* Title text of the page shown to the user when they leave a call in the call composite.
*/
leftCallTitle: string;
/**
* More details text of the page shown to the user when they leave a call in the call composite.
*/
leftCallMoreDetails?: string;
/**
* Title text of the page shown to the user when they are removed from a call in the call composite.
*/
removedFromCallTitle: string;
/**
* More details text of the page shown to the user when they are removed from a call in the call composite.
*/
removedFromCallMoreDetails?: string;
/**
* Text shown to the user on the lobby screen when connecting to a call.
*/
lobbyScreenConnectingToCallTitle: string;
/**
* Optional addition details shown to the user on the lobby screen when connection to a call.
*/
lobbyScreenConnectingToCallMoreDetails?: string;
/**
* Text shown to the user on the lobby screen when waiting to be admitted to a call.
*/
lobbyScreenWaitingToBeAdmittedTitle: string;
/**
* Optional additional details shown to the user on the lobby screen when waiting to be admitted to a call.
*/
lobbyScreenWaitingToBeAdmittedMoreDetails?: string;
/**
* Message shown to the user when they are speaking while muted.
*/
mutedMessage: string;
/**
* Text for link to MS privacy policy in Compliance Banner.
*/
privacyPolicy: string;
/**
* Text for link to learn more about a specific subject.
*/
learnMore: string;
/**
* Message to let user know the meeting is only being recorded (no transcription) in ComplianceBanner.
*/
complianceBannerNowOnlyRecording: string;
/**
* Message to let user know the meeting is only being transcripted (no recording) in ComplianceBanner.
*/
complianceBannerNowOnlyTranscription: string;
/**
* Message to let user know recording and transcription of the meeting are saved in ComplianceBanner.
*/
complianceBannerRecordingAndTranscriptionSaved: string;
/**
* Message to let user know recording and transcription of the meeting have started in ComplianceBanner.
*/
complianceBannerRecordingAndTranscriptionStarted: string;
/**
* Message to let user know recording and transcription of the meeting have stopped in ComplianceBanner.
*/
complianceBannerRecordingAndTranscriptionStopped: string;
/**
* Message to let user know recording of the meeting is being saved in ComplianceBanner.
*/
complianceBannerRecordingSaving: string;
/**
* Message to let user know recording of the meeting has started in ComplianceBanner.
*/
complianceBannerRecordingStarted: string;
/**
* Message to let user know recording of the meeting has stopped in ComplianceBanner.
*/
complianceBannerRecordingStopped: string;
/**
* Message to let user know they are giving consent to meeting being transcripted in ComplianceBanner.
*/
complianceBannerTranscriptionConsent: string;
/**
* Message to let user know transcription of the meeting is being saved in ComplianceBanner.
*/
complianceBannerTranscriptionSaving: string;
/**
* Message to let user know transcription of the meeting has started in ComplianceBanner.
*/
complianceBannerTranscriptionStarted: string;
/**
* Message to let user know the transcription of the meeting has stopped in ComplianceBanner.
*/
complianceBannerTranscriptionStopped: string;
/**
* Text for close button.
*/
close: string;
/**
* Title text of the page shown to the user when there is intermittent network failure during a call.
*/
networkReconnectTitle: string;
/**
* More details text of the page shown to the user when there is intermittent network failure during a call.
*/
networkReconnectMoreDetails: string;
/**
* Tooltip text used to inform a user that toggling microphone in lobby is not supported.
*/
microphoneToggleInLobbyNotAllowed: string;
/**
* Side pane People section Title.
*/
peoplePaneTitle: string;
/**
* Aria label of more button in people pane
*/
peoplePaneMoreButtonAriaLabel: string;
/**
* Aria label string for return to call back button
*/
returnToCallButtonAriaLabel?: string;
/**
* Aria Description string for return to call button
*/
returnToCallButtonAriaDescription?: string;
/**
* control bar People button label
*/
peopleButtonLabel: string;
/**
* control bar People button label when checked
*/
selectedPeopleButtonLabel: string;
/**
* control bar Chat button label.
*/
chatButtonLabel: string;
/**
* Label for SidePaneHeader dismiss button
*/
dismissSidePaneButtonLabel?: string;
/**
* Side pane People section subheader.
*/
peoplePaneSubTitle?: string;
/**
* Label for button to copy invite link
*/
copyInviteLinkButtonLabel?: string;
/**
* Label for button to copy invite link when it has been actioned
*/
copyInviteLinkButtonActionedLabel?: string;
/**
* Label for button to open dialpad
*/
openDialpadButtonLabel?: string;
/**
* Label for menu item to remove participant
*/
removeMenuLabel?: string;
/**
* Label for menu item to start spotlight on participant
*/
startSpotlightMenuLabel: string;
/**
* Label for menu item to add spotlight on participant
*/
addSpotlightMenuLabel: string;
/**
* Label for menu item to stop spotlight on participant
*/
stopSpotlightMenuLabel: string;
/**
* Label for menu item to stop spotlight on local user
*/
stopSpotlightOnSelfMenuLabel: string;
/**
* Label for menu item to stop spotlight on local user
*/
spotlightLimitReachedMenuTitle: string;
/**
* Label for menu item to stop all spotlight
*/
stopAllSpotlightMenuLabel: string;
/**
* Label for add people dropdown
*/
peoplePaneAddPeopleButtonLabel?: string;
/**
* Label for button to start a call
*/
dialpadStartCallButtonLabel?: string;
/**
* Title for dialpad Modal
*/
dialpadModalTitle?: string;
/**
* Aria Label for dialpad Modal
*/
dialpadModalAriaLabel?: string;
/**
* Aria Label for dialpad Modal close button
*/
dialpadCloseModalButtonAriaLabel?: string;
/**
* label for more button in the Calling composite
*/
moreButtonCallingLabel: string;
/**
* Label for the resume call button on the hold pane
*/
resumeCallButtonLabel?: string;
/**
* Label for the resume call button on the hold pane when call is resuming
*/
resumingCallButtonLabel?: string;
/**
* Aria label for the resume call button on the hold pane
*/
resumeCallButtonAriaLabel?: string;
/**
* Aria label for the resume call button on the hold pane when call is resuming
*/
resumingCallButtonAriaLabel?: string;
/**
* Label for the hold pane
*/
holdScreenLabel?: string;
/**
* Placeholder text for dtmf dialpad
*/
dtmfDialpadPlaceholderText?: string;
/**
* Label for the button to open dtmf dialpad
*/
openDtmfDialpadLabel?: string;
/**
* aria label for when the invite link has been actioned
*/
copyInviteLinkActionedAriaLabel: string;
/**
* Title text of the page shown to the user when the user attempts to join a room that cannot be found.
*/
roomNotFoundTitle: string;
/**
* More details text of the page shown to the user when the user attempts to join a room that cannot be found.
*/
roomNotFoundDetails?: string;
/**
* Title text of the page shown to the user when the user attempts to join a room that is not valid.
*/
roomNotValidTitle: string;
/**
* More details text of the page shown to the user when the user attempts to join a room that is not valid.
*/
roomNotValidDetails?: string;
/**
* Title text of the page shown to the user when the user's permission to join the room is removed.
*/
inviteToRoomRemovedTitle: string;
/**
* More details text of the page shown to the user when the user's permission to join the room is removed.
*/
inviteToRoomRemovedDetails?: string;
/**
* Video Effects pane title.
*/
videoEffectsPaneTitle: string;
/**
* Video Effects pane sub section title for choosing background.
*/
videoEffectsPaneBackgroundSelectionTitle: string;
/**
* Aria label for video effects pane
*/
videoEffectsPaneAriaLabel: string;
/**
* Label for the button to open effects
*/
configurationPageCameraIsLoadingLabel?: string;
/**
* Label for the button to open effects
*/
configurationPageVideoEffectsButtonLabel?: string;
/**
* Error message for video effect failure
*/
unableToStartVideoEffect?: string;
/**
* Label for the blur video background effect item
*/
blurBackgroundEffectButtonLabel?: string;
/**
* Tooltip text for the blur video background effect item
*/
blurBackgroundTooltip?: string;
/**
* Label for the remove video background effect item
*/
removeBackgroundEffectButtonLabel?: string;
/**
* Tooltip text for the blur video background effect item
*/
removeBackgroundTooltip?: string;
/**
* Text to show when warning the user the camera is off and inform the user to turn the camera on to see the selected video background effect.
*/
cameraOffBackgroundEffectWarningText?: string;
/**
* Title text of the page shown to the user when the user attempts to join a room they are not invited to.
*/
notInvitedToRoomTitle: string;
/**
* More details text of the page shown to the user when the user attempts to join a room they are not invited to.
*/
notInvitedToRoomDetails?: string;
/**
* Control bar People button ToolTipContent
*/
peopleButtonTooltipOpen: string;
/**
* Control bar People button ToolTipContent
*/
peopleButtonTooltipClose: string;
/**
* Label disaplayed on the lobby screen during a 1:1 outbound call.
*/
outboundCallingNoticeString?: string;
/**
* Notice to be announced by narrator when a participant joins a call
*/
participantJoinedNoticeString: string;
/**
* Notice to be announced by narrator when a participant joins a call
*/
twoParticipantJoinedNoticeString: string;
/**
* Notice to be announced by narrator when a participant joins a call
*/
threeParticipantJoinedNoticeString: string;
/**
* Notice to be announced by narrator when a participant leaves a call
*/
participantLeftNoticeString: string;
/**
* Notice to be announced by narrator when 2 participants leave a call
*/
twoParticipantLeftNoticeString: string;
/**
* Notice to be announced by narrator when 3 participants leave a call
*/
threeParticipantLeftNoticeString: string;
/**
* string to be used to announce a change in participant if they have no displayName
*/
unnamedParticipantString: string;
/**
* string to be used to announce when more than 3 participants have joined at the same time.
*/
manyParticipantsJoined: string;
/**
* string to be used to announce when more than 3 participants have left at the same time.
*/
manyParticipantsLeft: string;
/**
* string to be used to announce when multiple unnamed participants have joined at the same time.
*/
manyUnnamedParticipantsJoined: string;
/**
* string to be used to announce when multiple unnamed participants have left at the same time.
*/
manyUnnamedParticipantsLeft: string;
/**
* string to be used to open live captions contextual menu
*/
liveCaptionsLabel?: string;
/**
* label for opening captions setting modal
*/
captionsSettingsLabel?: string;
/**
* string to be used to start captions
*/
startCaptionsButtonOnLabel?: string;
/**
* string to be used to open real time text contextual menu
*/
realTimeTextLabel?: string;
/**
* string to be used to start real time text
*/
startRealTimeTextLabel?: string;
/**
* string to be used to when start real time text button is disabled
*/
disabledStartRealTimeTextLabel?: string;
/**
* string to be used to stop captions
*/
startCaptionsButtonOffLabel?: string;
/**
* tooltip string to be used to show captions is on
*/
startCaptionsButtonTooltipOnContent?: string;
/**
*tooltip string to be used to show captions is off
*/
startCaptionsButtonTooltipOffContent?: string;
/**
* captions setting modal title
*/
captionsSettingsModalTitle?: string;
/**
* label for spoken language dropdown inside captions setting modal
*/
captionsSettingsSpokenLanguageDropdownLabel?: string;
/**
* label for captions language inside captions setting modal
*/
captionsSettingsCaptionLanguageDropdownLabel?: string;
/**
* text under captions setting dropdown indicating what the dropdown is for
*/
captionsSettingsSpokenLanguageDropdownInfoText?: string;
/**
* text under captions setting dropdown indicating what the dropdown is for
*/
captionsSettingsCaptionLanguageDropdownInfoText?: string;
/**
* confirm button label in captions setting modal
*/
captionsSettingsConfirmButtonLabel?: string;
/**
* cancel button label in captions setting modal
*/
captionsSettingsCancelButtonLabel?: string;
/**
* arial label for captions setting modal
*/
captionsSettingsModalAriaLabel?: string;
/**
* arial label for captions setting modal close button
*/
captionsSettingsCloseModalButtonAriaLabel?: string;
/**
* label for more button inside captions banner
*/
captionsBannerMoreButtonCallingLabel?: string;
/**
* arial label for more button inside captions banner
*/
captionsBannerMoreButtonTooltip?: string;
/**
* list of key value pairs that pairs spoken language code to language names
*/
spokenLanguageStrings?: SpokenLanguageStrings;
/**
* list of key value pairs that pairs caption language code to language names
*/
captionLanguageStrings?: CaptionLanguageStrings;
/**
* captions banner loading spinner label
*/
captionsBannerSpinnerText?: string;
/**
* Default text for RTT input text box
*/
realTimeTextInputBoxDefaultText?: string;
/**
* Error message for RTT input text box when the size exceeds the limit 2000
*/
realTimeTextInputErrorMessage?: string;
/**
* Text to show in the real time text disclosure banner
*/
realTimeTextBannerContent?: string;
/**
* Title text of the real time text disclosure banner
*/
realTimeTextBannerTitle?: string;
/**
* Label for the link in the real time text disclosure banner
*/
realTimeTextBannerLinkLabel?: string;
/**
* Title for the container when only captions is enabled
*/
captionsOnlyContainerTitle?: string;
/**
* Title for the container when only real time text is enabled
*/
realTimeTextOnlyContainerTitle?: string;
/**
* Title for the container when both captions and real time text is enabled
*/
captionsAndRealTimeTextContainerTitle?: string;
/**
* Expand button aria label
*/
expandButtonAriaLabel?: string;
/**
* Minimize button aria label
*/
minimizeButtonAriaLabel?: string;
/**
* transfer page text when showing the transferor who initiated the transfer
*/
transferPageTransferorText: string;
/**
* transfer page text when showing the transfer target
*/
transferPageTransferTargetText: string;
/**
* transfer page display name for unknown participant
*/
transferPageUnknownTransferorDisplayName: string;
/**
* transfer page display name for unknown participant
*/
transferPageUnknownTransferTargetDisplayName: string;
/**
* notice to be announced by narrator the transfer page is showing
*/
transferPageNoticeString: string;
/**
* Title text of the page shown to the user when target participant could not be reached
*/
participantCouldNotBeReachedTitle?: string;
/**
* More details text of the page shown to the user when target participant could not be reached
*/
participantCouldNotBeReachedMoreDetails?: string;
/**
* Title text of the page shown to the user when permission to reach participant is not allowed
*/
permissionToReachTargetParticipantNotAllowedTitle?: string;
/**
* More details text of the page shown to the user when permission to reach participant is not allowed
*/
permissionToReachTargetParticipantNotAllowedMoreDetails?: string;
/**
* Title text of the page shown to the user when tenant id for the target participant could not be resolved
*/
unableToResolveTenantTitle?: string;
/**
* More details text of the page shown to the user when tenant id for the target participant could not be resolved
*/
unableToResolveTenantMoreDetails?: string;
/**
* Title text of the page shown to the user when target participant id is malformed
*/
participantIdIsMalformedTitle?: string;
/**
* More details text of the page shown to the user when target participant id is malformed
*/
participantIdIsMalformedMoreDetails?: string;
/**
* Controls label to move the overflow gallery around
*/
moreButtonGalleryControlLabel?: string;
/**
* Label for the toggle to move the overflow gallery to the top
*/
moreButtonGalleryPositionToggleLabel?: string;
/**
* Label for the selection of the speaker layout
*/
moreButtonGallerySpeakerLayoutLabel?: string;
/**
* Label for the selection of the default (Gallery) layout
*/
moreButtonGalleryDefaultLayoutLabel?: string;
/**
* Label for the selection of the default (Gallery) layout
*/
moreButtonLargeGalleryDefaultLayoutLabel?: string;
/**
* Label for the selection of the Together Mode (Gallery) layout
*/
moreButtonTogetherModeLayoutLabel?: string;
/**
* Label for the selection of the floatingLocalVideo (Dynamic) layout
*/
moreButtonGalleryFloatingLocalLayoutLabel?: string;
/**
* Label for the selection of the focusedContentLayout (Focused content) layout
*/
moreButtonGalleryFocusedContentLayoutLabel?: string;
/**
* All strings for capability changed notification
*/
capabilityChangedNotification?: CapabilityChangedNotificationStrings;
/**
* Title for the survey
*/
surveyTitle: string;
/**
* Helper text to explain what the survey is for
*/
starSurveyHelperText: string;
/**
* Helper text displayed below survey question after user select one star
*/
starSurveyOneStarText: string;
/**
* Helper text displayed below survey question after user select two star
*/
starSurveyTwoStarText: string;
/**
* Helper text displayed below survey question after user select three star
*/
starSurveyThreeStarText: string;
/**
* Helper text displayed below survey question after user select four star
*/
starSurveyFourStarText: string;
/**
* Helper text displayed below survey question after user select five star
*/
starSurveyFiveStarText: string;
/**
* Aria Label for each individual star rating
*/
starRatingAriaLabel: string;
/**
* Tags Survey Question
*/
tagsSurveyQuestion: string;
/**
* Default text for free form text field inside tags survey
*/
tagsSurveyTextFieldDefaultText: string;
/**
* Tags Survey helper text
*/
tagsSurveyHelperText: string;
/**
* Confirm button label for survey
*/
surveyConfirmButtonLabel: string;
/**
* Cancel button label for survey
*/
surveySkipButtonLabel: string;
/**
* Thank you text appeared on screen after survey is submitted
*/
endOfSurveyText: string;
/**
* Corresponding texts to each call issue
*/
surveyIssues: SurveyIssues;
/**
* Corresponding texts to each call category
*/
surveyIssuesHeadingStrings: SurveyIssuesHeadingStrings;
/**
* String for the dismiss control on the local and remote PIP on mobile
*/
dismissModalAriaLabel?: string;
/**
* String for title when the call is rejected by the callee
*/
callRejectedTitle?: string;
/**
* String for more details when the call is rejected by the callee
*/
callRejectedMoreDetails?: string;
/**
* String for title when the call times out because the remote user does not answer
*/
callTimeoutTitle?: string;
/**
* String for title when the call times out when calling a bot.
*/
callTimeoutBotTitle?: string;
/**
* String for more details when the call times out because the remote user does not answer
*/
callTimeoutDetails?: string;
/**
* String for more details when the call times out when calling a bot
*/
callTimeoutBotDetails?: string;
/**
* Label for the control bar button to show the dtmf dialer when the more button is disabled
*/
dtmfDialerButtonLabel?: string;
/**
* Tooltip for the control bar button to show the dtmf dialer when the more button is disabled
*/
dtmfDialerButtonTooltipOn?: string;
/**
* Tooltip for the control bar button to hide the dtmf dialer when the more button is disabled
*/
dtmfDialerButtonTooltipOff?: string;
/**
* Label to show the dtmf dialer in the more button menu
*/
dtmfDialerMoreButtonLabelOn?: string;
/**
* Label to hide the dtmf dialer in the more button menu
*/
dtmfDialerMoreButtonLabelOff?: string;
/**
* Strings for spotlight prompt
*/
spotlightPrompt: SpotlightPromptStrings;
/**
* Label for button to exit spotlight
*/
exitSpotlightButtonLabel: string;
/**
* Tooltip for button to exit spotlight
*/
exitSpotlightButtonTooltip: string;
/**
* Label for confirm button of hang up for everyone dialog
*/
leaveConfirmButtonLabel?: string;
/**
* Label for confirm button of leave confim dialog
*/
endCallConfirmButtonLabel?: string;
/**
* Label for cancel button in hang up confirm dialog
*/
hangUpCancelButtonLabel?: string;
/**
* Title of confirm dialog when leaving
*/
leaveConfirmDialogTitle?: string;
/**
* Content of confirm dialog when leaving
*/
leaveConfirmDialogContent?: string;
/**
* Title of confirm dialog when leaving
*/
endCallConfirmDialogTitle?: string;
/**
* Content of confirm dialog when leaving
*/
endCallConfirmDialogContent?: string;
/**
* Error message when the meeting identifier or passcode is invalid
*/
invalidMeetingIdentifier: string;
/**
* Menu text shown in Participant Item contextual menu for pinning a remote participant's video tile
*
*/
pinParticipantMenuLabel: string;
/**
* Menu text shown in Participant Item contextual menu when pinning limit is reached
*
*/
pinParticipantLimitReachedMenuLabel: string;
/**
* Menu text shown in Participant Item contextual menu for unpinning a remote participant's video tile
*
*/
unpinParticipantMenuLabel: string;
/**
* Aria label for unpin participant menu item of remote participant
*/
unpinParticipantMenuItemAriaLabel: string;
/**
* Aria label to announce when remote participant is pinned
*/
pinParticipantMenuItemAriaLabel: string;
/**
* Error message when the meeting identifier or passcode is invalid
*/
phoneCallMoreButtonLabel: string;
/**
* Label for mute all remote participants menu item in People Pane
*/
muteAllMenuLabel: string;
/**
* Label for mute all prompt title
*/
muteAllDialogTitle: string;
/**
* Label for mute all prompt content
*/
muteAllDialogContent: string;
/**
* Label for mute all confirm button
*/
muteAllConfirmButtonLabel: string;
/**
* Label for mute all cancel button
*/
muteAllCancelButtonLabel: string;
/**
* Label for join breakout room button
*/
joinBreakoutRoomButtonLabel: string;
/**
* Label for button to return from breakout room
*/
returnFromBreakoutRoomButtonLabel: string;
/**
* Label for button to leave breakout room and meeting
*/
leaveBreakoutRoomAndMeetingButtonLabel: string;
/**
* Notification title for when a user joins a breakout room
*/
breakoutRoomJoinedNotificationTitle: string;
/**
* Title for banner to join the assigned breakout room. The banner is shown in mobile view instead of the
* notification.
*/
joinBreakoutRoomBannerTitle: string;
/**
* Label for button in banner to join breakout room. The banner is shown in mobile view instead of the notification.
*/
joinBreakoutRoomBannerButtonLabel: string;
/**
* Title for banner to return from breakout room. The banner is shown in mobile view instead of the notification.
*/
returnFromBreakoutRoomBannerTitle: string;
/**
* Label for button in banner to return from breakout room. The banner is shown in mobile view instead of the
* notification.
*/
returnFromBreakoutRoomBannerButtonLabel: string;
/**
* Label for menu item to forbid audio media access
*/
forbidAudioMenuLabel: string;
/**
* Label for menu item to permit audio media access
*/
permitAudioMenuLabel: string;
/**
* Dialog title to confirm forbid Teams meeting audio media access
*/
forbidOthersAudioDialogTitle: string;
/**
* Dialog content to confirm forbid Teams meeting audio media access
*/
forbidOthersAudioDialogContent: string;
/**
* Dialog button to confirm forbid Teams meeting audio media access
*/
forbidOthersAudioConfirmButtonLabel: string;
/**
* Dialog cancel button for forbid Teams meeting audio media access
*/
forbidOthersAudioCancelButtonLabel: string;
/**
* Dialog title to confirm permit Teams meeting audio media access
*/
permitOthersAudioDialogTitle: string;
/**
* Dialog content to confirm permit Teams meeting audio media access
*/
permitOthersAudioDialogContent: string;
/**
* Dialog button to confirm permit Teams meeting audio media access
*/
permitOthersAudioConfirmButtonLabel: string;
/**
* Dialog cancel button for permit Teams meeting audio media access
*/
permitOthersAudioCancelButtonLabel: string;
/**
* Label for menu item to forbid video media access
*/
forbidOthersAudioMenuLabel: string;
/** Label for menu item to permit video media access */
permitOthersAudioMenuLabel: string;
/** Label for menu item to forbid video media access */
forbidVideoMenuLabel: string;
/** Label for menu item to permit video media access */
permitVideoMenuLabel: string;
/** Dialog title to confirm forbid Teams meeting video media access */
forbidOthersVideoDialogTitle: string;
/** Dialog content to confirm forbid Teams meeting video media access */
forbidOthersVideoDialogContent: string;
/** Dialog button to confirm forbid Teams meeting video media access */
forbidOthersVideoConfirmButtonLabel: string;
/** Dialog cancel button for forbid Teams meeting video media access */
forbidOthersVideoCancelButtonLabel: string;
/** Dialog title to confirm permit Teams meeting video media access */
permitOthersVideoDialogTitle: string;
/** Dialog content to confirm permit Teams meeting video media access */
permitOthersVideoDialogContent: string;
/** Dialog button to confirm permit Teams meeting video media access */
permitOthersVideoConfirmButtonLabel: string;
/** Dialog cancel button for permit Teams meeting video media access */
permitOthersVideoCancelButtonLabel: string;
/** Label for menu item to forbid audio media access */
forbidOthersVideoMenuLabel: string;
/** Label for menu item to permit audio media access */
permitOthersVideoMenuLabel: string;
/** The title of the RealTimeText modal */
realTimeTextModalTitle: string;
/** The text of the RealTimeText modal */
realTimeTextModalText: string;
/** The label for the confirm button */
realTimeTextConfirmButtonLabel: string;
/** The label for the cancel button */
realTimeTextCancelButtonLabel: string;
/** The aria label for the modal */
realTimeTextModalAriaLabel: string;
/** The aria label for the close button */
realTimeTextCloseModalButtonAriaLabel: string;
}
/**
* Control bar display type for {@link CallComposite}.
*
* @public
*/
export declare type CallControlDisplayType = 'default' | 'compact';
/**
* Customization options for the control bar in calling experience.
*
* @public
*/
export declare type CallControlOptions = CommonCallControlOptions & {
/**
* Show, Hide or Disable participants button during a call. This is the option only work for legacyControl bar.
* @defaultValue true
*/
participantsButton?: boolean | {
disabled: boolean;
};
legacyControlBarExperience?: boolean;
};
/**
* Callback for {@link CallAdapterSubscribers} 'callEnded' event.
*
* @public
*/
export declare type CallEndedListener = (event: CallAdapterCallEndedEvent) => void;
/**
* Error thrown from failed stateful API methods.
*
* @public
*/
export declare class CallError extends Error {
/**
* The API method target that failed.
*/
target: CallErrorTarget;
/**
* Error thrown by the failed SDK method.
*/
innerError: Error;
/**
* Timestamp added to the error by the stateful layer.
*/
timestamp: Date;
/**
* Primary code for the calling error
*/
code?: number;
/**
* Sub code for the calling error
*/
subCode?: number;
/** needs to be a (innerError as CommunicationServicesError) */
constructor(target: CallErrorTarget, innerError: Error, timestamp?: Date);
}
/**
* Selector type for {@link ErrorBar} component.
*
* @public
*/
export declare type CallErrorBarSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {
activeErrorMessages: ActiveErrorMessage[];
};
/**
* Errors teed from API calls to the Calling SDK.
*
* Each property in the object stores the latest error for a particular SDK API method.
*
* Errors from this object can be cleared using the {@link newClearCallErrorsModifier}.
* Additionally, errors are automatically cleared when:
* - The state is cleared.
* - Subsequent calls to related API methods succeed.
* See documentation of individual stateful client methods for details on when errors may be automatically cleared.
*
* @public
*/
export declare type CallErrors = {
[target in CallErrorTarget]: CallError;
};
/**
* String literal type for all permissible keys in {@Link CallErrors}.
*
* @public
*/
export declare type CallErrorTarget = 'Call.addParticipant' | 'Call.dispose' | 'Call.feature' | 'Call.hangUp' | 'Call.hold' | 'Call.mute' | 'Call.muteIncomingAudio' | 'Call.off' | 'Call.on' | 'Call.removeParticipant' | 'Call.resume' | 'Call.sendDtmf' | 'Call.startAudio' | 'Call.startScreenSharing' | 'Call.startVideo' | 'Call.stopScreenSharing' | 'Call.stopAudio' | 'Call.stopVideo' | 'Call.unmute' | 'Call.unmuteIncomingAudio' | 'CallAgent.dispose' | 'CallAgent.feature' | 'CallAgent.join' | 'CallAgent.off' | 'CallAgent.on' | 'CallAgent.startCall' | 'CallClient.createCallAgent' | 'CallClient.createTeamsCallAgent' | 'CallClient.feature' | 'CallClient.getDeviceManager' | 'CallClient.getEnvironmentInfo' | 'DeviceManager.askDevicePermission' | 'DeviceManager.getCameras' | 'DeviceManager.getMicrophones' | 'DeviceManager.getSpeakers' | 'DeviceManager.off' | 'DeviceManager.on' | 'DeviceManager.selectMicrophone' | 'DeviceManager.selectSpeaker' | 'DeviceManager.startPreheatDevices' | 'DeviceManager.stopPreheatDevices' | 'IncomingCall.accept' | 'IncomingCall.reject' | 'TeamsCall.addParticipant' | 'VideoEffectsFeature.startEffects' | 'CallAgent.handlePushNotification' | 'Call.mutedByOthers' | 'Call.muteAllRemoteParticipants' | 'Call.setConstraints';
/**
* Represents the name of the call feature stream
* @public
*/
export declare type CallFeatureStreamName = 'togetherMode';
/**
* State only version of {@link @azure/communication-calling#CallFeatureStream}.
* Represents call feature stream state.
* @public
*/
export declare interface CallFeatureStreamState extends RemoteVideoStreamState {
/**
* The name of the call feature stream.
*/
feature?: CallFeatureStreamName;
}
/**
* Callback for {@link CallAdapterSubscribers} 'callIdChanged' event.
*
* @public
*/
export declare type CallIdChangedListener = (event: {
callId: string;
}) => void;
/**
* State to track the types {@link CallInfo} and {@link TeamsCallInfo}
* @public
*/
export declare interface CallInfoState {
/**
* GroupId of the call that you joined
*/
groupId?: string;
/**
* The teams meeting thread id
*/
threadId?: string;
/**
* participant id of the local user
*/
participantId: string;
/**
* Differentiator between the Call and TeamsCall types
*/
kind: IncomingCallKind;
}
/**
* Common props used to reference calling declarative client state.
*
* @public
*/
export declare type CallingBaseSelectorProps = {
callId: string;
};
/**
* Object containing all the handlers required for calling components.
*
* Calling related components from this package are able to pick out relevant handlers from this object.
* See {@link useHandlers} and {@link usePropsFor}.
*
* @public
*/
export declare interface CallingHandlers extends CommonCallingHandlers {
onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => Call | undefined;
}
/**
* Configuration options to include video effect background dependency.
* @public
*/
export declare type CallingHandlersOptions = {
onResolveVideoBackgroundEffectsDependency?: () => Promise;
/**
* Dependency resolver for deep noise suppression effect.
* @beta
*/
onResolveDeepNoiseSuppressionDependency?: () => Promise;
};
/**
* Helper type for {@link usePropsFor}.
*
* @public
*/
export declare type CallingReturnProps JSX.Element> = GetCallingSelector extends ((state: CallClientState, props: any) => any) ? ReturnType> & Common[0]> : never;
/**
* @public
* Type for representing a set of sounds to use for different calling events
*/
export declare type CallingSounds = {
/**
* Sound to be played when the call ends
*/
callEnded?: SoundEffect;
/**
* Sound to be played when the call is ringing
*/
callRinging?: SoundEffect;
/**
* Sound to be played when the call is rejected by the user being callede
*/
callBusy?: SoundEffect;
};
/**
* Custom Fluent theme palette used by calling related components in this library.
*
* @public
*/
export declare interface CallingTheme {
callingPalette: {
callRed: string;
callRedDark: string;
callRedDarker: string;
iconWhite: string;
raiseHandGold: string;
videoTileLabelBackgroundLight: string;
};
}
/**
* @public
*/
export declare interface CallNotification {
target: NotificationTarget;
timestamp: Date;
}
/**
* @public
*/
export declare type CallNotifications = {
[target in NotificationTarget]: CallNotification;
};
/**
* Calling participant's state, as reflected in the UI components.
*
* @public
*/
export declare type CallParticipantListParticipant = ParticipantListParticipant & {
/** State of calling participant */
state: ParticipantState;
/** Whether calling participant is screen sharing */
isScreenSharing?: boolean;
/** Whether calling participant is muted */
isMuted?: boolean;
/** Whether calling participant is speaking */
isSpeaking?: boolean;
/** Whether calling participant is raised hand */
raisedHand?: RaisedHand;
/**
* Whether calling participant has reacted
*
* @beta
* */
reaction?: Reaction;
/** Whether calling participant is spotlighted **/
spotlight?: Spotlight;
/** Whether calling participant has audio/video media access blocked **/
mediaAccess?: MediaAccess;
};
/**
* A {@link React.Context} that stores a {@link @azure/communication-calling#Call}.
*
* Calling components from this package must be wrapped with a {@link CallProvider}.
*
* @public
*/
export declare const CallProvider: (props: CallProviderProps) => JSX.Element;
/**
* Arguments to initialize a {@link CallProvider}.
*
* @public
*/
export declare interface CallProviderProps {
children: React_2.ReactNode;
call?: Call | TeamsCall;
}
/**
* State only version of {@link @azure/communication-calling#Call}. {@link StatefulCallClient} will automatically
* retrieve Call's state and add it to the state exposed by {@link StatefulCallClient}.
*
* @public
*/
export declare interface CallState {
/**
* Proxy of {@link @azure/communication-calling#Call.id}.
*/
id: string;
/**
* Type of the call.
*/
kind: CallKind;
/**
* Proxy of {@link @azure/communication-calling#Call.callerInfo}.
*/
callerInfo: CallerInfo;
/**
* Proxy of {@link @azure/communication-calling#Call.state}.
*/
state: CallState_2;
/**
* Proxy of {@link @azure/communication-calling#Call.callEndReason}.
*/
callEndReason?: CallEndReason;
/**
* Proxy of {@link @azure/communication-calling#Call.direction}.
*/
direction: CallDirection;
/**
* Proxy of {@link @azure/communication-calling#Call.isMuted}.
*/
isMuted: boolean;
/**
* Proxy of {@link @azure/communication-calling#Call.isScreenSharingOn}.
*/
isScreenSharingOn: boolean;
/**
* Proxy of {@link @azure/communication-calling#DominantSpeakersInfo }.
*/
dominantSpeakers?: DominantSpeakersInfo;
/**
* Proxy of {@link @azure/communication-calling#Call.localVideoStreams}.
*/
localVideoStreams: LocalVideoStreamState[];
/**
* Proxy of {@link @azure/communication-calling#Call.remoteParticipants}.
* Object with {@link RemoteParticipant} fields keyed by flattened {@link RemoteParticipantState.identifier}.
* To obtain a flattened {@link RemoteParticipantState.identifier}, use
* {@link @azure/communication-react#toFlatCommunicationIdentifier}.
*/
remoteParticipants: {
[keys: string]: RemoteParticipantState;
};
/**
* Stores remote participants that have left the call so that the callEndReason could be retrieved.
* Object with {@link RemoteParticipant} fields keyed by flattened {@link RemoteParticipantState.identifier}.
* To obtain a flattened {@link RemoteParticipantState.identifier}, use
* {@link @azure/communication-react#toFlatCommunicationIdentifier}.
*/
remoteParticipantsEnded: {
[keys: string]: RemoteParticipantState;
};
/**
* Proxy of {@link @azure/communication-calling#TranscriptionCallFeature}.
*/
transcription: TranscriptionCallFeature;
/**
* Proxy of {@link @azure/communication-calling#CaptionsCallFeature}.
*/
captionsFeature: CaptionsCallFeatureState;
/**
* Proxy of {@link @azure/communication-calling#RealTimeTextCallFeature}.
*/
realTimeTextFeature: RealTimeTextCallFeatureState;
/**
* Proxy of {@link @azure/communication-calling#OptimalVideoCountCallFeature}.
*/
optimalVideoCount: OptimalVideoCountFeatureState;
/**
* Proxy of {@link @azure/communication-calling#RecordingCallFeature}.
*/
recording: RecordingCallFeature;
/**
* Proxy of {@link @azure/communication-calling#PPTLiveCallFeature}.
*
*@public
*/
pptLive: PPTLiveCallFeatureState;
/**
* Proxy of {@link @azure/communication-calling#RaiseHandCallFeature}.
*/
raiseHand: RaiseHandCallFeature;
/**
* Proxy of {@link @azure/communication-calling#TogetherModeCallFeature}.
*/
togetherMode: TogetherModeCallFeatureState;
/**
* Proxy of {@link @azure/communication-calling#Call.ReactionMessage} with
* UI helper props receivedOn which indicates the timestamp when the message was received.
*
* @public
*/
localParticipantReaction?: ReactionState;
/**
* Stores the currently active screenshare participant's key. If there is no screenshare active, then this will be
* undefined. You can use this key to access the remoteParticipant data in {@link CallState.remoteParticipants} object.
*
* Note this only applies to ScreenShare in RemoteParticipant. A local ScreenShare being active will not affect this
* property.
*
* This property is added by the stateful layer and is not a proxy of SDK state
*/
screenShareRemoteParticipant?: string;
/**
* Stores the currently active pptlive participant's key. Will be reused by White board etc. If there is no screenshare active, then this will be
* undefined. You can use this key to access the remoteParticipant data in {@link CallState.remoteParticipants} object.
*
* Note this only applies to PPTLive in RemoteParticipant.
*
* This property is added by the stateful layer and is not a proxy of SDK state
*
* @public
*/
contentSharingRemoteParticipant?: string;
/**
* Stores the local date when the call started on the client. This property is added by the stateful layer and is not
* a proxy of SDK state.
*/
startTime: Date;
/**
* Stores the local date when the call ended on the client. This property is added by the stateful layer and is not
* a proxy of SDK state.
*/
endTime: Date | undefined;
/**
* Stores the latest call diagnostics.
*/
diagnostics: DiagnosticsCallFeatureState;
/**
* Proxy of {@link @azure/communication-calling#Call.role}.
*/
role?: ParticipantRole;
/**
* Transfer state of call
*/
transfer: TransferFeature;
/**
* Proxy of {@link @azure/communication-calling#CapabilitiesFeature}.
*/
capabilitiesFeature?: CapabilitiesFeatureState;
/**
* Hide attendee names in teams meeting
*/
hideAttendeeNames?: boolean;
/**
* Proxy of {@link @azure/communication-calling#SpotlightCallFeature}.
*/
spotlight?: SpotlightCallFeatureState;
/**
* Proxy of {@link @azure/communication-calling#Call.info}.
*/
info?: TeamsCallInfo;
/**
* Proxy of {@link @azure/communication-calling#TeamsMeetingAudioConferencingCallFeature}.
*/
meetingConference?: {
conferencePhones: ConferencePhoneInfo[];
};
/**
* Proxy of {@link @azure/communication-calling#BreakoutRoomsFeature}.
*/
breakoutRooms?: BreakoutRoomsState;
/**
* Proxy of {@link @azure/communication-calling#MediaAccessFeature}.
*/
meetingMediaAccess?: MediaAccessState;
}
/**
* Represents the improvement suggestion part of call survey
* @public
*/
export declare interface CallSurveyImprovementSuggestions {
/**
* Improvement suggestions for overall call
*/
overallRating?: string;
/**
* Improvement suggestions for audio experience
*/
audioRating?: string;
/**
* Improvement suggestions for video experience
*/
videoRating?: string;
/**
* Improvement suggestions for screenshare experience
*/
screenshareRating?: string;
}
/**
* {@link CallWithChatComposite} Adapter interface.
*
* @public
*/
export declare interface CallWithChatAdapter extends CallWithChatAdapterManagement, AdapterState, Disposable_2, CallWithChatAdapterSubscriptions {
}
/**
* Functionality for managing the current call with chat.
* @public
*/
export declare interface CallWithChatAdapterManagement {
/**
* Remove a participant from a Call.
*
* @param userId - UserId of the participant to remove.
*
* @public
*/
removeParticipant(userId: string): Promise;
/**
* Remove a participant from the call.
* @param participant - {@link @azure/communication-common#CommunicationIdentifier} of the participant to be removed
* @public
*/
removeParticipant(participant: CommunicationIdentifier): Promise;
/**
* Join the call with microphone initially on/off.
* @deprecated Use joinCall(options?:JoinCallOptions) instead.
* @param microphoneOn - Whether microphone is initially enabled
*
* @public
*/
joinCall(microphoneOn?: boolean): Call | undefined;
/**
* Join the call with options bag to set microphone/camera initial state when joining call
* true = turn on the device when joining call
* false = turn off the device when joining call
* 'keep'/undefined = retain devices' precall state
*
* @param options - param to set microphone/camera initially on/off/use precall state.
*
* @public
*/
joinCall(options?: JoinCallOptions): Call | undefined;
/**
* Leave the call.
*
* @param forEveryone - Whether to remove all participants when leaving
*
* @public
*/
leaveCall(forEveryone?: boolean): Promise;
/**
* Start the camera.
*
* This method will start rendering a local camera view when the call is not active.
*
* @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }
*
* @public
*/
startCamera(options?: VideoStreamOptions): Promise;
/**
* Stop the camera.
*
* This method will stop rendering a local camera view when the call is not active.
*
* @public
*/
stopCamera(): Promise;
/**
* Mute the current user during the call or disable microphone locally.
*
* @public
*/
mute(): Promise;
/**
* Unmute the current user during the call or enable microphone locally.
*
* @public
*/
unmute(): Promise;
/**
* Start the call.
*
* @param participants - An array of participant ids to join
*
* @public
*/
startCall(participants: string[], options?: StartCallOptions): Call | undefined;
/**
* Start the call.
* @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called
* @public
*/
startCall(participants: (MicrosoftTeamsAppIdentifier | PhoneNumberIdentifier | CommunicationUserIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier)[], options?: StartCallOptions): Call | undefined;
/**
* Start sharing the screen during a call.
*
* @public
*/
startScreenShare(): Promise;
/**
* Stop sharing the screen.
*
* @public
*/
stopScreenShare(): Promise;
/**
* Raise hand for local user.
*
* @public
*/
raiseHand(): Promise;
/**
* Lower hand for local user.
*
* @public
*/
lowerHand(): Promise;
/**
* Send Reaction to ongoing meeting.
* @param reaction - A value of type {@link @azure/communication-calling#Reaction}
*
* @public
*/
onReactionClick(reaction: Reaction_2): Promise;
/**
* Create the html view for a stream.
*
* @remarks
* This method is implemented for composite.
*
* @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view
* @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }
*
* @public
*/
createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise;
/**
* Dispose the html view for a stream.
*
* @remarks
* This method is implemented for composite.
*
* @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view
* @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }
*
* @public
*/
disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise;
/**
* Create the html view for a togethermode stream.
*
* @remarks
* This method is implemented for composite
*
* @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }
*
* @public
*/
createTogetherModeStreamView(options?: TogetherModeStreamOptions): Promise;
/**
* Start together mode.
*
* @remarks
* This method is implemented for composite
*
*
* @public
*/
startTogetherMode(): Promise;
/**
* Recalculate the seating positions for together mode.
*
* @remarks
* This method is implemented for composite
*
* @param width - Width of the container
* @param height - Height of the container
*
* @public
*/
setTogetherModeSceneSize(width: number, height: number): void;
/**
* Dispose the html view for a togethermode stream.
*
* @remarks
* This method is implemented for composite
*
* @public
*/
disposeTogetherModeStreamView(): Promise;
/**
* Dispose the html view for a screen share stream
*
* @remarks
* this method is implemented for composite
*
* @param remoteUserId - Id of the participant to dispose the screen share stream view for.
*
* @public
*/
disposeScreenShareStreamView(remoteUserId: string): Promise;
/**
* Dispose the html view for a remote video stream
*
* @param remoteUserId - Id of the participant to dispose
*
* @public
*/
disposeRemoteVideoStreamView(remoteUserId: string): Promise;
/**
* Dispose the html view for a local video stream
*
* @public
*/
disposeLocalVideoStreamView(): Promise;
/**
* Ask for permissions of devices.
*
* @remarks
* Browser permission window will pop up if permissions are not granted yet.
*
* @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }
*
* @public
*/
askDevicePermission(constrain: PermissionConstraints): Promise;
/**
* Query for available camera devices.
*
* @remarks
* This method should be called after askDevicePermission()
*
* @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }
*
* @public
*/
queryCameras(): Promise;
/**
* Query for available microphone devices.
*
* @remarks
* This method should be called after askDevicePermission()
*
* @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }
*
* @public
*/
queryMicrophones(): Promise;
/**
* Query for available microphone devices.
*
* @remarks
* This method should be called after askDevicePermission()
*
* @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }
*
* @public
*/
querySpeakers(): Promise;
/**
* Set the camera to use in the call.
*
* @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }
* @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }
*
* @public
*/
setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise;
/**
* Set the microphone to use in the call.
*
* @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }
*
* @public
*/
setMicrophone(sourceInfo: AudioDeviceInfo): Promise;
/**
* Set the speaker to use in the call.
*
* @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }
*
* @public
*/
setSpeaker(sourceInfo: AudioDeviceInfo): Promise;
/**
* Fetch initial state for the Chat adapter.
*
* Performs the minimal fetch necessary for ChatComposite and API methods.
*
* @public
*/
fetchInitialData(): Promise;
/**
* Send a message in the thread.
*
* @public
*/
sendMessage(content: string, options?: SendMessageOptions): Promise;
/**
* Send a read receipt for a message.
*
* @public
*/
sendReadReceipt(chatMessageId: string): Promise;
/**
* Send typing indicator in the thread.
*
* @public
*/
sendTypingIndicator(): Promise;
/**
* Update a message content.
*
* @public
*/
updateMessage(messageId: string, content: string, options?: Record): Promise;
/**
* Delete a message in the thread.
*
* @public
*/
deleteMessage(messageId: string): Promise;
/**
* Load more previous messages in the chat thread history.
*
* @remarks
* This method is usually used to control incremental fetch/infinite scroll.
*
* @public
*/
loadPreviousChatMessages(messagesToLoad: number): Promise;
/** @public */
downloadResourceToCache(resourceDetails: ResourceDetails): Promise;
/** @public */
removeResourceFromCache(resourceDetails: ResourceDetails): void;
/**
* Puts the Call in a Localhold.
*
* @public
*/
holdCall(): Promise;
/**
* Resumes the call from a LocalHold state.
*
* @public
*/
resumeCall(): Promise;
/**
* Adds a new Participant to the call.
*
* @public
*/
addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise;
addParticipant(participant: CommunicationUserIdentifier): Promise;
/**
* send dtmf tone to another participant in the call in 1:1 calls
*
* @public
*/
sendDtmfTone: (dtmfTone: DtmfTone_2) => Promise;
/**
* Function to Start captions
* @param options - options for start captions
*/
startCaptions(options?: StartCaptionsAdapterOptions): Promise;
/**
* Function to set caption language
* @param language - language set for caption
*/
setCaptionLanguage(language: string): Promise;
/**
* Function to set spoken language
* @param language - spoken language
*/
setSpokenLanguage(language: string): Promise;
/**
* Funtion to stop captions
*/
stopCaptions(options?: StopCaptionsAdapterOptions): Promise;
/**
* Start the video background effect.
*
* @public
*/
startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise;
/**
* Stop the video background effect.
*
* @public
*/
stopVideoBackgroundEffects(): Promise;
/**
* Override the background picker images for background replacement effect.
*
* @param backgroundImages - Array of custom background images.
*
* @public
*/
updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[]): void;
/**
* Update the selected video background effect
*
* @public
*/
updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect): void;
/**
* Start the noise suppression effect.
*/
startNoiseSuppressionEffect(): Promise;
/**
* Start the noise suppression effect.
*/
stopNoiseSuppressionEffect(): Promise;
/**
* Send the end of call survey result
*
* @public
*/
submitSurvey(survey: CallSurvey): Promise;
/**
* Start spotlight
*/
startSpotlight(userIds?: string[]): Promise;
/**
* Stop spotlight
*/
stopSpotlight(userIds?: string[]): Promise;
/**
* Stop all spotlights
*/
stopAllSpotlight(): Promise;
/**
* Mute a participant
*/
muteParticipant(userId: string): Promise;
/**
* Mute a participant
*/
muteAllRemoteParticipants(): Promise;
/**
* Return to origin call of breakout room
*/
returnFromBreakoutRoom(): Promise;
/**
* forbids audio for the specified user ids.
*/
forbidAudio: (userIds: string[]) => Promise;
/** permits audio for the specified user ids. */
permitAudio: (userIds: string[]) => Promise;
/** forbids audio for Teams meeting attendees except the local user. */
forbidOthersAudio: () => Promise;
/** permits audio for Teams meeting attendees except the local user. */
permitOthersAudio: () => Promise;
/** forbids video for the specified user ids. */
forbidVideo: (userIds: string[]) => Promise;
/** permits video for the specified user ids. */
permitVideo: (userIds: string[]) => Promise;
/** forbids video for Teams meeting attendees except the local user. */
forbidOthersVideo: () => Promise;
/** permits video for Teams meeting attendees except the local user. */
permitOthersVideo: () => Promise;
/**
* Send real time text
* @param text - real time text content
* @param finalized - Boolean to indicate if the real time text is final
*/
sendRealTimeText: (text: string, isFinalized: boolean) => Promise;
}
/**
* CallWithChat State is a combination of Stateful Chat and Stateful Calling clients with some
* state specific to the CallWithChat Composite only.
*
* @public
*/
export declare interface CallWithChatAdapterState extends CallWithChatAdapterUiState, CallWithChatClientState {
}
/**
* Call and Chat events that can be subscribed to in the {@link CallWithChatAdapter}.
* @public
*/
export declare interface CallWithChatAdapterSubscriptions {
on(event: 'callEnded', listener: CallEndedListener): void;
on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;
on(event: 'callIdChanged', listener: CallIdChangedListener): void;
on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;
on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;
on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;
on(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;
on(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;
on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;
on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;
on(event: 'callError', listener: (e: AdapterError) => void): void;
on(event: 'captionsReceived', listener: CaptionsReceivedListener): void;
on(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;
on(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;
on(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;
on(event: 'realTimeTextReceived', listener: RealTimeTextReceivedListener): void;
on(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;
on(event: 'spotlightChanged', listener: SpotlightChangedListener): void;
on(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;
off(event: 'callEnded', listener: CallEndedListener): void;
off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;
off(event: 'callIdChanged', listener: CallIdChangedListener): void;
off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;
off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;
off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;
off(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;
off(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;
off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;
off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;
off(event: 'callError', listener: (e: AdapterError) => void): void;
off(event: 'captionsReceived', listener: CaptionsReceivedListener): void;
off(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;
off(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;
off(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;
off(event: 'realTimeTextReceived', listener: RealTimeTextReceivedListener): void;
off(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;
off(event: 'spotlightChanged', listener: SpotlightChangedListener): void;
off(event: 'breakoutRoomsUpdated', listener: BreakoutRoomsUpdatedListener): void;
on(event: 'messageReceived', listener: MessageReceivedListener): void;
on(event: 'messageEdited', listener: MessageEditedListener): void;
on(event: 'messageDeleted', listener: MessageDeletedListener): void;
on(event: 'messageSent', listener: MessageSentListener): void;
on(event: 'messageRead', listener: MessageReadListener): void;
on(event: 'chatParticipantsAdded', listener: ParticipantsAddedListener): void;
on(event: 'chatParticipantsRemoved', listener: ParticipantsRemovedListener): void;
on(event: 'chatError', listener: (e: AdapterError) => void): void;
off(event: 'messageReceived', listener: MessageReceivedListener): void;
off(event: 'messageEdited', listener: MessageEditedListener): void;
off(event: 'messageDeleted', listener: MessageDeletedListener): void;
off(event: 'messageSent', listener: MessageSentListener): void;
off(event: 'messageRead', listener: MessageReadListener): void;
off(event: 'chatParticipantsAdded', listener: ParticipantsAddedListener): void;
off(event: 'chatParticipantsRemoved', listener: ParticipantsRemovedListener): void;
off(event: 'chatError', listener: (e: AdapterError) => void): void;
on(event: 'chatInitialized', listener: ChatInitializedListener): void;
off(event: 'chatInitialized', listener: ChatInitializedListener): void;
}
/**
* UI state pertaining to the {@link CallWithChatComposite}.
*
* @public
*/
export declare interface CallWithChatAdapterUiState {
/**
* Microphone state before a call has joined.
*
* @public
*/
isLocalPreviewMicrophoneEnabled: boolean;
/**
* Current page of the Composite.
*
* @public
*/
page: CallCompositePage;
}
/**
* State from the backend services that drives {@link CallWithChatComposite}.
*
* @public
*/
export declare interface CallWithChatClientState {
/** ID of the call participant using this CallWithChatAdapter. */
userId: CommunicationIdentifierKind;
/** Display name of the participant using this CallWithChatAdapter. */
displayName: string | undefined;
/** State of the current call. */
call?: CallState;
/** State of the current chat. */
chat?: ChatThreadClientState;
/** Latest call error encountered for each operation performed via the adapter. */
latestCallErrors: AdapterErrors;
/** Latest call notifications encountered in the call client state via the adapter. */
latestCallNotifications: AdapterNotifications;
/** Latest chat error encountered for each operation performed via the adapter. */
latestChatErrors: AdapterErrors;
/** State of available and currently selected devices */
devices: DeviceManagerState;
/** State of whether the active call is a Teams interop call */
isTeamsCall: boolean;
/** State of whether the active call is a Teams interop meeting */
isTeamsMeeting: boolean;
/** alternateCallerId for PSTN call */
alternateCallerId?: string;
/** Environment information for system adapter is made on */
environmentInfo?: EnvironmentInfo;
/** Default set of background images for background replacement effect */
videoBackgroundImages?: VideoBackgroundImage[];
/** Dependency to be injected for video background effects */
onResolveVideoEffectDependency?: () => Promise;
/**
* Dependency to be injected for deep noise suppression effect.
*/
onResolveDeepNoiseSuppressionDependency?: () => Promise;
/** State to track whether the noise suppression should be on by default.
*/
deepNoiseSuppressionOnByDefault?: boolean;
/** State to track whether to hide the noise suppression button.
*/
hideDeepNoiseSuppressionButton?: boolean;
/** State to track the selected video background effect */
selectedVideoBackgroundEffect?: VideoBackgroundEffect;
/** Hide attendee names in teams meeting */
hideAttendeeNames?: boolean;
/**
* Reaction resources to render in meetings
* */
reactions?: ReactionResources;
}
/**
* CallWithChatComposite brings together key components to provide a full call with chat experience out of the box.
*
* @public
*/
export declare const CallWithChatComposite: (props: CallWithChatCompositeProps) => JSX.Element;
/**
* Icons that can be overridden for {@link CallWithChatComposite}.
*
* @public
*/
export declare type CallWithChatCompositeIcons = {
ChevronLeft?: JSX.Element;
ControlBarChatButtonActive?: JSX.Element;
ControlBarChatButtonInactive?: JSX.Element;
ControlBarPeopleButton?: JSX.Element;
Link?: JSX.Element;
MoreDrawerMicrophones?: JSX.Element;
MoreDrawerPeople?: JSX.Element;
MoreDrawerSelectedMicrophone?: JSX.Element;
MoreDrawerSelectedSpeaker?: JSX.Element;
MoreDrawerSpeakers?: JSX.Element;
ControlButtonCameraOff?: JSX.Element;
ControlButtonCameraOn?: JSX.Element;
ControlButtonEndCall?: JSX.Element;
ControlButtonMicOff?: JSX.Element;
ControlButtonMicOn?: JSX.Element;
ControlButtonOptions?: JSX.Element;
ControlButtonScreenShareStart?: JSX.Element;
ControlButtonScreenShareStop?: JSX.Element;
ControlButtonCameraProhibited?: JSX.Element;
ControlButtonCameraProhibitedSmall?: JSX.Element;
ControlButtonMicProhibited?: JSX.Element;
ControlButtonMicProhibitedSmall?: JSX.Element;
ErrorBarCallCameraAccessDenied?: JSX.Element;
ErrorBarCallCameraAlreadyInUse?: JSX.Element;
ErrorBarCallLocalVideoFreeze?: JSX.Element;
ErrorBarCallMacOsCameraAccessDenied?: JSX.Element;
ErrorBarCallMacOsMicrophoneAccessDenied?: JSX.Element;
ErrorBarCallMicrophoneAccessDenied?: JSX.Element;
ErrorBarCallMicrophoneMutedBySystem?: JSX.Element;
ErrorBarCallMicrophoneUnmutedBySystem?: JSX.Element;
ErrorBarCallNetworkQualityLow?: JSX.Element;
ErrorBarCallNoMicrophoneFound?: JSX.Element;
ErrorBarCallNoSpeakerFound?: JSX.Element;
ErrorBarClear?: JSX.Element;
HorizontalGalleryLeftButton?: JSX.Element;
HorizontalGalleryRightButton?: JSX.Element;
LobbyScreenConnectingToCall?: JSX.Element;
LobbyScreenWaitingToBeAdmitted?: JSX.Element;
LocalDeviceSettingsCamera?: JSX.Element;
LocalDeviceSettingsMic?: JSX.Element;
LocalDeviceSettingsSpeaker?: JSX.Element;
LocalPreviewPlaceholder?: JSX.Element;
Muted?: JSX.Element;
NetworkReconnectIcon?: JSX.Element;
NoticePageAccessDeniedTeamsMeeting?: JSX.Element;
NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element;
NoticePageLeftCall?: JSX.Element;
NoticePageRemovedFromCall?: JSX.Element;
OptionsCamera?: JSX.Element;
OptionsMic?: JSX.Element;
OptionsSpeaker?: JSX.Element;
ParticipantItemMicOff?: JSX.Element;
ParticipantItemScreenShareStart?: JSX.Element;
VideoTileMicOff?: JSX.Element;
LocalCameraSwitch?: JSX.Element;
PeoplePaneAddPerson?: JSX.Element;
PeoplePaneOpenDialpad?: JSX.Element;
DialpadStartCall?: JSX.Element;
DefaultCustomButton?: JSX.Element;
DtmfDialpadButton?: JSX.Element;
EditBoxCancel?: JSX.Element;
EditBoxSubmit?: JSX.Element;
MessageDelivered?: JSX.Element;
MessageEdit?: JSX.Element;
MessageFailed?: JSX.Element;
MessageRemove?: JSX.Element;
MessageSeen?: JSX.Element;
MessageSending?: JSX.Element;
SendBoxSend?: JSX.Element;
SendBoxSendHovered?: JSX.Element;
SendBoxAttachFile?: JSX.Element;
ParticipantItemOptions?: JSX.Element;
ParticipantItemOptionsHovered?: JSX.Element;
PeoplePaneMoreButton?: JSX.Element;
StopAllSpotlightMenuButton?: JSX.Element;
};
/**
* Props for the CallWithChatComposite that you can use in your application.
*
* Contains two options bags:
* - adapterOptions: Options for the {@link AzureCommunicationCallAdapterOptions}
* - callCompositeOptions: Options for the {@link CallWithChatComposite} {@link CallWithChatCompositeOptions}
* @public
*/
export declare interface CallWithChatCompositeLoaderProps extends Partial> {
/**
* UserId for the local user.
*/
userId: CommunicationUserIdentifier;
/**
* CommunicationTokenCredential for the local user.
*/
credential: CommunicationTokenCredential;
/**
* Display name for the local user.
*/
displayName: string;
/**
* Azure communication service endpoint. This used for the token and joining the chat thread.
*/
endpoint: string;
/**
* Locator for the call and the chat thread.
* This is used to join the call and the chat thread.
*/
locator: CallAndChatLocator;
/**
* Options for the {@link AzureCommunicationCallAdapterOptions}
* This is used to configure the call adapter.
*/
callAdapterOptions?: AzureCommunicationCallAdapterOptions;
/**
* Options for the {@link CallWithChatComposite} {@link CallWithChatCompositeOptions}
* This is used to configure the call composite.
*/
callWithChatCompositeOptions?: CallWithChatCompositeOptions;
/**
* Device form factor for the composite.
*/
formFactor?: 'mobile' | 'desktop';
}
/**
* Optional features of the {@link CallWithChatComposite}.
*
* @public
*/
export declare type CallWithChatCompositeOptions = {
/**
* Call control options to change what buttons show on the call-with-chat composite control bar.
* If using the boolean values, true will cause default behavior across the whole control bar. False hides the whole control bar.
*/
callControls?: boolean | CallWithChatControlOptions;
/**
* Remote participant video tile menu options
*/
remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;
/**
* Options for controlling the local video tile.
*
* @remarks if 'false' the local video tile will not be rendered.
*/
localVideoTile?: boolean | LocalVideoTileOptions;
/**
* Options for controlling the starting layout of the composite's video gallery
*/
galleryOptions?: {
/**
* Layout for the gallery when the call starts
*/
layout?: VideoGalleryLayout;
/**
* Controls the view of the local screenshare stream in the gallery
*/
localScreenShareView?: LocalScreenShareView;
};
/**
* Options for end of call survey
*/
surveyOptions?: {
/**
* Disable call survey at the end of a call.
* @defaultValue false
*/
disableSurvey?: boolean;
/**
* Optional callback to redirect users to custom screens when survey is done, note that default end call screen will be shown if this callback is not provided
* This callback can be used to redirect users to different screens depending on survey state, whether it is submitted, skipped or has a problem when submitting the survey
*/
onSurveyClosed?: (surveyState: 'sent' | 'skipped' | 'error', surveyError?: string) => void;
/**
* Optional callback to handle survey data including free form text response
* Note that free form text response survey option is only going to be enabled when this callback is provided
* User will need to handle all free form text response on their own
*/
onSurveySubmitted?: (callId: string, surveyId: string,
/**
* This is the survey results containing star survey data and API tag survey data.
* This part of the result will always be sent to the calling sdk
* This callback provides user with the ability to gain access to survey data
*/
submittedSurvey: CallSurvey,
/**
* This is the survey results containing free form text
* This part of the result will not be handled by composites
* User will need to collect and handle this information 100% on their own
* Free form text survey is not going to show in the UI if onSurveySubmitted is not populated
*/
improvementSuggestions: CallSurveyImprovementSuggestions) => Promise;
};
/**
* Options for setting additional customizations related to personalized branding.
*/
branding?: {
/**
* Logo displayed on the configuration page.
*/
logo?: {
/**
* URL for the logo image.
*
* @remarks
* Recommended size is 80x80 pixels.
*/
url: string;
/**
* Alt text for the logo image.
*/
alt?: string;
/**
* The logo can be displayed as a circle.
*
* @defaultValue 'unset'
*/
shape?: 'unset' | 'circle';
};
/**
* Background image displayed on the configuration page.
*/
backgroundImage?: {
/**
* URL for the background image.
*
* @remarks
* Background image should be larger than 576x567 pixels and smaller than 2048x2048 pixels pixels.
*/
url: string;
};
};
/**
* Options for settings related to spotlight.
*/
spotlight?: {
/**
* Flag to hide the menu buttons to start and stop spotlight for remote participants and the local participant.
* @defaultValue false
*/
hideSpotlightButtons?: boolean;
};
/**
* Options for settings related to joining a call.
*/
joinCallOptions?: {
/**
* options for checking microphone permissions when joining a call.
* block on access will block the user from joining the call if the microphone permission is not granted.
* skip will allow the user to join the call without granting the microphone permission.
* @defaultValue 'requireMicrophoneAvailable'
*/
microphoneCheck?: 'requireMicrophoneAvailable' | 'skip';
};
};
/**
* Props required for the {@link CallWithChatComposite}
*
* @public
*/
export declare interface CallWithChatCompositeProps extends BaseCompositeProps {
adapter: CallWithChatAdapter;
/**
* Fluent theme for the composite.
*
* Defaults to a light theme if undefined.
*/
fluentTheme?: PartialTheme | Theme;
/**
* Optimizes the composite form factor for either desktop or mobile.
* @remarks `mobile` is currently only optimized for Portrait mode on mobile devices and does not support landscape.
* @defaultValue 'desktop'
*/
formFactor?: 'desktop' | 'mobile';
/**
* URL that can be used to copy a call-with-chat invite to the Users clipboard.
*/
joinInvitationURL?: string;
/**
* Flags to enable/disable or customize UI elements of the {@link CallWithChatComposite}
*/
options?: CallWithChatCompositeOptions;
}
/**
* Strings used by the {@link CallWithChatComposite} directly.
*
* This strings are in addition to those used by the components from the component library.
*
* @public
*/
export declare interface CallWithChatCompositeStrings {
/**
* {@link CallWithChatComposite} control bar People button label
*/
peopleButtonLabel: string;
/**
* {@link CallWithChatComposite} control bar People button label when checked
*/
selectedPeopleButtonLabel: string;
/**
* {@link CallWithChatComposite} aria label for control bar People button when unchecked
*/
peopleButtonTooltipOpenAriaLabel: string;
/**
* {@link CallWithChatComposite} aria label for control bar People button when checked
*/
peopleButtonTooltipCloseAriaLabel: string;
/**
* {@link CallWithChatComposite} control bar People button ToolTipContent
*/
peopleButtonTooltipOpen: string;
/**
* {@link CallWithChatComposite} control bar People button ToolTipContent
*/
peopleButtonTooltipClose: string;
/**
* {@link CallWithChatComposite} control bar Chat button label.
*/
chatButtonLabel: string;
/**
* {@Link CallWithChatComposite} control bar Chat button ToolTipContent.
*/
chatButtonTooltipOpen: string;
/**
* {@Link CallWithChatComposite} control bar Chat button ToolTipContent.
*/
chatButtonTooltipClose: string;
/**
* {@link CallWithChatComposite} control bar Chat button enhanced tooltip string.
*/
chatButtonTooltipClosedWithMessageCount: string;
/**
* Title for the audio device selection sub-menu in more button drawer.
*
* Only used with `mobileView` set to `true` and when no speakers are available.
*/
moreDrawerAudioDeviceMenuTitle?: string;
/**
* Title for the microphone selection sub-menu in more button drawer.
*
* Only used with `mobileView` set to `true` and when speakers are available.
*/
moreDrawerMicrophoneMenuTitle: string;
/**
* Title for the speaker selection sub-menu in more button drawer.
*
* Only used with `mobileView` set to `true`.
*/
moreDrawerSpeakerMenuTitle: string;
/**
* Title for the captions sub-menu in more button drawer.
*
* Only used with `mobileView` set to `true`.
*/
moreDrawerCaptionsMenuTitle: string;
/**
* Title for the spoken language sub-menu in more button drawer.
*
* Only used with `mobileView` set to `true`.
*/
moreDrawerSpokenLanguageMenuTitle: string;
/**
* Title for the caption language sub-menu in more button drawer.
*
* Only used with `mobileView` set to `true`.
*/
moreDrawerCaptionLanguageMenuTitle: string;
/**
* Title for the gallery options sub-menu in the more button drawer.
*/
moreDrawerGalleryOptionsMenuTitle: string;
/**
* {@Link CallWithChatComposite} control bar More button label
*/
moreDrawerButtonLabel: string;
/**
* {@Link CallWithChatComposite} control bar More button tooltip content
*/
moreDrawerButtonTooltip: string;
/**
* Side pane People section Title.
*/
peoplePaneTitle: string;
/**
* Side pane People section subheader.
*/
peoplePaneSubTitle: string;
/**
* Side pane Chat screen title.
*/
chatPaneTitle: string;
/**
* Side pane Chat screen title in a breakout room.
*/
breakoutRoomChatPaneTitle: string;
/**
* Label for spinner when chat content is loading.
*/
chatContentSpinnerLabel: string;
/**
* New Message label for chat button with notification icon component.
*/
chatButtonNewMessageNotificationLabel: string;
/**
* Aria label for the picture in picture in picture tile that.
* This feature currently only shows on mobileView when the chat or people pane is expanded.
* @remarks
* This component displays the local and most-dominant remote participant and when clicked
* returns the user to the call screen.
*/
pictureInPictureTileAriaLabel: string;
/**
* Label for menu item to remove participant
*/
removeMenuLabel: string;
/**
* Label for button to copy invite link
*/
copyInviteLinkButtonLabel: string;
/**
* Label for button to copy invite link when it has been actioned
*/
copyInviteLinkButtonActionedLabel: string;
/**
* Label for button to open dialpad
*/
openDialpadButtonLabel: string;
/**
* Label for SidePaneHeader dismiss button
*/
dismissSidePaneButtonLabel?: string;
/**
* Aria Description string for return to call button
*/
returnToCallButtonAriaDescription?: string;
/**
* Aria label string for return to call back button
*/
returnToCallButtonAriaLabel?: string;
/**
* Label for add people dropdown
*/
peoplePaneAddPeopleButtonLabel: string;
/**
* Label for button to start a call
*/
dialpadStartCallButtonLabel: string;
/**
* Title for dialpad Modal
*/
dialpadModalTitle: string;
/**
* Aria Label for dialpad Modal
*/
dialpadModalAriaLabel: string;
/**
* Aria Label for dialpad Modal close button
*/
dialpadCloseModalButtonAriaLabel: string;
/**
* Placeholder text for dtmf dialpad
*/
dtmfDialpadPlaceholderText: string;
/**
* Label for the button to open dtmf dialpad
*/
openDtmfDialpadLabel: string;
/**
* aria label for when the invite link has been actioned
*/
copyInviteLinkActionedAriaLabel: string;
}
/**
* Customization options for the control bar in calling with chat experience.
*
* @public
*/
export declare interface CallWithChatControlOptions extends CommonCallControlOptions {
/**
* Show or hide the chat button in the call-with-chat composite control bar.
* @defaultValue true
*/
chatButton?: boolean | {
disabled: boolean;
};
}
/**
* Events fired off by the {@link CallWithChatAdapter}.
*
* @public
*/
export declare type CallWithChatEvent = 'callError' | 'chatError' | 'callEnded' | 'isMutedChanged' | 'callIdChanged' | 'isLocalScreenSharingActiveChanged' | 'displayNameChanged' | 'isSpeakingChanged' | 'callParticipantsJoined' | 'callParticipantsLeft' | 'selectedMicrophoneChanged' | 'selectedSpeakerChanged' | 'isCaptionsActiveChanged' | 'captionsReceived' | 'isCaptionLanguageChanged' | 'isSpokenLanguageChanged' | 'realTimeTextReceived' | 'capabilitiesChanged' | 'spotlightChanged' | 'breakoutRoomsUpdated' | 'messageReceived' | 'messageEdited' | 'messageDeleted' | 'messageSent' | 'messageRead' | 'chatParticipantsAdded' | 'chatParticipantsRemoved' | 'chatInitialized';
/**
* A button to turn camera on / off.
*
* Can be used with {@link ControlBar}.
*
* @public
*/
export declare const CameraButton: (props: CameraButtonProps) => JSX.Element;
/**
* Styles for the {@link CameraButton} menu.
*
* @public
*/
export declare interface CameraButtonContextualMenuStyles extends IContextualMenuStyles {
/**
* Styles for the items inside the {@link CameraButton} button menu.
*/
menuItemStyles?: IContextualMenuItemStyles;
}
/**
* Props for {@link CameraButton} component.
*
* @public
*/
export declare interface CameraButtonProps extends ControlBarButtonProps {
/**
* Utility property for using this component with `communication react eventHandlers`.
* Maps directly to the `onClick` property.
*/
onToggleCamera?: (options?: VideoStreamOptions) => Promise;
/**
* Options for rendering local video view.
*/
localVideoViewOptions?: VideoStreamOptions;
/**
* Available cameras for selection
*/
cameras?: OptionsDevice[];
/**
* Camera that is shown as currently selected
*/
selectedCamera?: OptionsDevice;
/**
* Callback when a camera is selected
*/
onSelectCamera?: (device: OptionsDevice) => Promise;
/**
* Whether to use a {@link SplitButton} with a {@link IContextualMenu} for device selection.
*
* default: false
*/
enableDeviceSelectionMenu?: boolean;
/**
* Optional strings to override in component
*/
strings?: Partial;
/**
* Styles for {@link CameraButton} and the device selection flyout.
*/
styles?: Partial;
/**
* Callback when a effects is clicked
*/
onClickVideoEffects?: (showVideoEffects: boolean) => void;
}
/**
* Selector type for {@link CameraButton} component.
*
* @public
*/
export declare type CameraButtonSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {
disabled: boolean;
checked: boolean;
cameras: VideoDeviceInfo[];
selectedCamera?: VideoDeviceInfo;
};
/**
* Strings of CameraButton that can be overridden.
*
* @public
*/
export declare interface CameraButtonStrings {
/** Label when button is on. */
onLabel: string;
/** Label when button is off. */
offLabel: string;
/** Tooltip content when the button is disabled. */
tooltipDisabledContent?: string;
/** Tooltip content when the button is on. */
tooltipOnContent?: string;
/** Tooltip content when the button is off. */
tooltipOffContent?: string;
/** Tooltip content when the button is disabled due to video loading. */
tooltipVideoLoadingContent?: string;
/**
* Title of camera menu
*/
cameraMenuTitle: string;
/**
* Tooltip of camera menu
*/
cameraMenuTooltip: string;
/**
* description of camera button split button role
*/
cameraButtonSplitRoleDescription?: string;
/**
* Camera split button aria label for when button is enabled.
*/
onSplitButtonAriaLabel?: string;
/**
* Camera split button aria label for when button is disabled.
*/
offSplitButtonAriaLabel?: string;
/**
* Camera action turned on string for announcer
*/
cameraActionTurnedOnAnnouncement?: string;
/**
* Camera action turned off string for announcer
*/
cameraActionTurnedOffAnnouncement?: string;
/**
* Primary action for when the camera is turned off
*/
offSplitButtonPrimaryActionCamera?: string;
/**
* Primary action for when the camera is on
*/
onSplitButtonPrimaryActionCamera?: string;
/**
* Title for primary action section of split button
*/
cameraPrimaryActionSplitButtonTitle?: string;
/**
* Title for video effects menu item
*/
videoEffectsMenuItemTitle?: string;
/**
* Aria description for camera button
*/
cameraButtonAriaDescription?: string;
}
/**
* Styles for {@link CameraButton}
*
* @public
*/
export declare interface CameraButtonStyles extends ControlBarButtonStyles {
/**
* Styles for the {@link CameraButton} menu.
*/
menuStyles?: Partial;
}
/**
* @public
* Callback function run when a message edit is cancelled.
*/
export declare type CancelEditCallback = (messageId: string) => void;
/**
* Callback for {@link CallAdapterSubscribers} 'capabilitiesChanged' event.
*
* @public
*/
export declare type CapabilitiesChangedListener = (data: CapabilitiesChangeInfo) => void;
/**
* State only version of {@link @azure/communication-calling#CapabilitiesFeature}
*
* @public
*/
export declare interface CapabilitiesFeatureState {
/**
* Proxy of {@link @azure/communication-calling#CapabilitiesFeature.capabilities}.
*/
capabilities: ParticipantCapabilities;
/**
* Proxy of the latest {@link @azure/communication-calling#CapabilitiesChangeInfo}
*/
latestCapabilitiesChangeInfo: CapabilitiesChangeInfo;
}
/**
* Strings for capability changed notification
* @public
*/
export declare interface CapabilityChangedNotificationStrings {
/**
* Strings for 'turnVideoOn' capability
*/
turnVideoOn?: {
/**
* Notification message shown to the user when capability to turn video on is lost due to a meeting option change
*/
lostDueToMeetingOption?: string;
/**
* Notification message shown to the user when capability to turn video on is granted due to a meeting option change
*/
grantedDueToMeetingOption?: string;
};
/**
* Strings for 'unmuteMic' capability
*/
unmuteMic?: {
/**
* Notification message shown to the user when capability to unmute mic is lost due to a meeting option change
*/
lostDueToMeetingOption?: string;
/**
* Notification message shown to the user when capability to unmute mic is granted due to a meeting option change
*/
grantedDueToMeetingOption?: string;
};
/**
* Strings for 'shareScreen' capability
*/
shareScreen?: {
/**
* Notification message shown to the user when capability to share screen is lost due to a role change to Attendeee
*/
lostDueToRoleChangeToAttendee?: string;
/**
* Notification message shown to the user when capability to share screen is granted due to a role change to Presenter
*/
grantedDueToRoleChangeToPresenter?: string;
};
/**
* Strings for hidden attendee names capability
*/
hideAttendeeNames?: {
/**
* Notification message shown to the user when capability to view attendee names is lost due to a meeting option change for Attendee
*/
hideAttendeeNameAttendee?: string;
/**
* Notification message shown to the user when capability to view attendee names is lost due to a meeting option change for Presenter
*/
hideAttendeeNamePresenter?: string;
};
}
/**
* @public
* caption language strings for captions setting modal
*/
export declare interface CaptionLanguageStrings {
ar: string;
da: string;
de: string;
en: string;
es: string;
fi: string;
fr: string;
'fr-ca': string;
hi: string;
it: string;
ja: string;
ko: string;
nb: string;
nl: string;
pl: string;
pt: string;
ru: string;
sv: string;
'zh-Hans': string;
'zh-Hant': string;
cs: string;
'pt-pt': string;
tr: string;
vi: string;
th: string;
he: string;
cy: string;
uk: string;
el: string;
hu: string;
ro: string;
sk: string;
}
/**
* @public
* A component for displaying a CaptionsBanner with user icon, displayName and captions text.
*/
export declare const CaptionsBanner: (props: CaptionsBannerProps) => JSX.Element;
/**
* @public
* CaptionsBanner Component Props.
*/
export declare interface CaptionsBannerProps {
/**
* Array of captions to be displayed
*/
captions: CaptionsInformation[];
/**
* Array of finalized and partial real time text messages
*/
realTimeTexts?: {
completedMessages?: RealTimeTextInformation[];
currentInProgress?: RealTimeTextInformation[];
myInProgress?: RealTimeTextInformation;
};
/**
* Flag to indicate if captions are on
*/
isCaptionsOn?: boolean;
/**
* Flag to indicate if real time text is on
*/
isRealTimeTextOn?: boolean;
/**
* Flag to indicate if captions are being started
* This is used to show spinner while captions are being started
*/
startCaptionsInProgress?: boolean;
/**
* Optional callback to override render of the avatar.
*
* @param userId - user Id
*/
onRenderAvatar?: OnRenderAvatarCallback;
/**
* Optional strings for the component
*/
strings?: CaptionsBannerStrings;
/**
* Optional form factor for the component.
* @defaultValue 'default'
*/
formFactor?: 'default' | 'compact';
/**
* Optional options for the component.
*/
captionsOptions?: {
height: 'full' | 'default';
};
/**
* Optional callback to send real time text.
*/
onSendRealTimeText?: (text: string, isFinalized: boolean) => Promise;
/**
* Latest local real time text
*/
latestLocalRealTimeText?: RealTimeTextInformation;
}
/**
* Selector type for the {@link CaptionsBanner} component.
* @public
*/
export declare type CaptionsBannerSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {
captions: CaptionsInformation[];
realTimeTexts: {
completedMessages?: RealTimeTextInformation[];
currentInProgress?: RealTimeTextInformation[];
myInProgress?: RealTimeTextInformation;
};
isCaptionsOn: boolean;
startCaptionsInProgress: boolean;
isRealTimeTextOn: boolean;
latestLocalRealTimeText: RealTimeTextInformation;
};
/**
* @public
* strings for captions banner
*/
export declare interface CaptionsBannerStrings {
/**
* Spinner text for captions banner
*/
captionsBannerSpinnerText?: string;
/**
* Default text for RTT input text box
*/
realTimeTextInputBoxDefaultText?: string;
/**
* Error message for RTT input text box when the size exceeds the limit 2000
*/
realTimeTextInputErrorMessage?: string;
/**
* Real time text disclosure banner title
*/
realTimeTextBannerTitle?: string;
/**
* Real time text disclosure banner content
*/
realTimeTextBannerContent?: string;
/**
* Real time text disclosure banner link label
*/
realTimeTextBannerLinkLabel?: string;
/**
* Title for the container when only captions is enabled
*/
captionsOnlyContainerTitle?: string;
/**
* Title for the container when only real time text is enabled
*/
realTimeTextOnlyContainerTitle?: string;
/**
* Title for the container when both captions and real time text is enabled
*/
captionsAndRealTimeTextContainerTitle?: string;
/**
* Expand button aria label
*/
expandButtonAriaLabel?: string;
/**
* Minimize button aria label
*/
minimizeButtonAriaLabel?: string;
}
/**
* @public
*/
export declare interface CaptionsCallFeatureState {
/**
* supported spoken languages
*/
supportedSpokenLanguages: string[];
/**
* array of received captions
*/
captions: CaptionsInfo[];
/**
* whether captions is on/off
*/
isCaptionsFeatureActive: boolean;
/**
* whether start captions button is clicked or now
*/
startCaptionsInProgress: boolean;
/**
* supported caption languages
*/
supportedCaptionLanguages: string[];
/**
* current spoken language
*/
currentSpokenLanguage: string;
/**
* current caption language
*/
currentCaptionLanguage: string;
/**
* current caption kind: teams or acs captions
*/
captionsKind: CaptionsKind;
}
/**
* Selector type for components for Changing caption language and spoken language
* @public
*/
export declare type CaptionSettingsSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {
supportedCaptionLanguages: SupportedCaptionLanguage[];
currentCaptionLanguage: SupportedCaptionLanguage;
supportedSpokenLanguages: SupportedSpokenLanguage[];
currentSpokenLanguage: SupportedSpokenLanguage;
isCaptionsFeatureActive: boolean;
};
/**
* @public
*/
export declare interface CaptionsInfo {
/**
* The state in which this caption data can be classified.
*/
resultType: CaptionsResultType;
/**
* The information of the call participant who spoke the captioned text.
*/
speaker: CallerInfo;
/**
* The language that the spoken words were interpretted as. Corresponds to the language specified in startCaptions / setSpokenLanguage.
*/
spokenLanguage: string;
/**
* The caption text.
*/
captionText: string;
/**
* Timestamp of when the captioned words were initially spoken.
*/
timestamp: Date;
/**
* Timestamp of when the captions were last updated.
*/
lastUpdatedTimestamp?: Date;
/**
* The language that the captions are presented in. Corresponds to the captionLanguage specified in startCaptions / setCaptionLanguage.
*/
captionLanguage?: string;
/**
* The original spoken caption text prior to translating to subtitle language
*/
spokenText?: string;
}
/**
* @public
* information required for each line of caption
*/
export declare type CaptionsInformation = {
/**
* unique id for each caption
*/
id: string;
/**
* speaker's display name
*/
displayName: string;
/**
* content of the caption
*/
captionText: string;
/**
* id of the speaker
*/
userId?: string;
/**
* timestamp when the caption was created
* Please note that this value is essential for determining the order of captions and real time text messages
* If you are using both captions and real time text, please ensure that the createdTimeStamp is populated
*/
createdTimeStamp?: Date;
/**
* If caption is finalized
*/
isFinalized?: boolean;
};
/**
* options bag to start captions
*
* @public
*/
export declare type CaptionsOptions = {
spokenLanguage: string;
};
/**
* Callback for {@link CallAdapterSubscribers} 'captionsReceived' event.
*
* @public
*/
export declare type CaptionsReceivedListener = (event: {
captionsInfo: CaptionsInfo;
}) => void;
/**
* @public
* a component for setting spoken languages
*/
export declare const CaptionsSettingsModal: (props: CaptionsSettingsModalProps) => JSX.Element;
/**
* @public
* CaptionsSettingsModal Component Props.
*/
export declare interface CaptionsSettingsModalProps {
/**
* List of supported spoken languages
*/
supportedSpokenLanguages: SupportedSpokenLanguage[];
/**
* List of supported caption languages
*/
supportedCaptionLanguages?: SupportedCaptionLanguage[];
/**
* Callback to set spoken language
*/
onSetSpokenLanguage: (language: SupportedSpokenLanguage) => Promise;
/**
* Callback to set caption language
*/
onSetCaptionLanguage?: (language: SupportedCaptionLanguage) => Promise;
/**
* Callback to start captions
*/
onStartCaptions: (options?: CaptionsOptions) => Promise;
/**
* Current spoken language
*/
currentSpokenLanguage: SupportedSpokenLanguage;
/**
* Current caption language
*/
currentCaptionLanguage?: SupportedCaptionLanguage;
/**
* 1 to 1 mapping between language code and language string for spoken languages
*/
spokenLanguageStrings?: SpokenLanguageStrings;
/**
* 1 to 1 mapping between language code and language string for caption languages
*/
captionLanguageStrings?: CaptionLanguageStrings;
/**
* Flag to indicate if captions feature is active
*/
isCaptionsFeatureActive?: boolean;
/**
* Strings for the captions settings modal
*/
strings?: CaptionsSettingsModalStrings;
/**
* Flag to show the modal
*/
showModal?: boolean;
/**
* Callback that is triggered when the modal is dismissed
*/
onDismissCaptionsSettings?: () => void;
/**
* Flag to show the caption language dropdown
*/
changeCaptionLanguage?: boolean;
}
/**
* @public
* strings for captions setting modal
*/
export declare interface CaptionsSettingsModalStrings {
/**
* Title for the modal
*/
captionsSettingsModalTitle?: string;
/**
* Label for the spoken language dropdown menu
*/
captionsSettingsSpokenLanguageDropdownLabel?: string;
/**
* Label for the caption language dropdown menu
*/
captionsSettingsCaptionLanguageDropdownLabel?: string;
/**
* Disclaimer for the spoken language dropdown menu
*/
captionsSettingsSpokenLanguageDropdownInfoText?: string;
/**
* Disclaimer for the caption language dropdown menu
*/
captionsSettingsCaptionLanguageDropdownInfoText?: string;
/**
* Label for the confirm button
*/
captionsSettingsConfirmButtonLabel?: string;
/**
* Label for the cancel button
*/
captionsSettingsCancelButtonLabel?: string;
/**
* Aria label for the modal
*/
captionsSettingsModalAriaLabel?: string;
/**
* Aria label for the close modal button
*/
captionsSettingsCloseModalButtonAriaLabel?: string;
}
/**
* {@link ChatComposite} Adapter interface.
*
* @public
*/
export declare type ChatAdapter = ChatAdapterThreadManagement & AdapterState & Disposable_2 & ChatAdapterSubscribers;
/**
* Options for configuring the ChatAdapter.
*
* @public
*/
export declare type ChatAdapterOptions = {
/**
* Optional callback to fetch a chat profile
*/
onFetchProfile?: OnFetchChatProfileCallback;
};
/**
* {@link ChatAdapter} state.
*
* @public
*/
export declare type ChatAdapterState = ChatAdapterUiState & ChatCompositeClientState;
/**
* Chat composite events that can be subscribed to.
*
* @public
*/
export declare interface ChatAdapterSubscribers {
/**
* Subscribe function for 'messageReceived' event.
*/
on(event: 'messageReceived', listener: MessageReceivedListener): void;
/**
* Subscribe function for 'messageEdited' event.
*/
on(event: 'messageEdited', listener: MessageEditedListener): void;
/**
* Subscribe function for 'messageDeleted' event.
*/
on(event: 'messageDeleted', listener: MessageDeletedListener): void;
/**
* Subscribe function for 'messageSent' event.
*/
on(event: 'messageSent', listener: MessageSentListener): void;
/**
* Subscribe function for 'messageRead' event.
*/
on(event: 'messageRead', listener: MessageReadListener): void;
/**
* Subscribe function for 'participantsAdded' event.
*/
on(event: 'participantsAdded', listener: ParticipantsAddedListener): void;
/**
* Subscribe function for 'participantsRemoved' event.
*/
on(event: 'participantsRemoved', listener: ParticipantsRemovedListener): void;
/**
* Subscribe function for 'topicChanged' event.
*/
on(event: 'topicChanged', listener: TopicChangedListener): void;
/**
* Subscribe function for 'error' event.
*/
on(event: 'error', listener: (e: AdapterError) => void): void;
/**
* Unsubscribe function for 'messageReceived' event.
*/
off(event: 'messageReceived', listener: MessageReceivedListener): void;
/**
* Unsubscribe function for 'messageEdited' event.
*/
off(event: 'messageEdited', listener: MessageEditedListener): void;
/**
* Unsubscribe function for 'messageDeleted' event.
*/
off(event: 'messageDeleted', listener: MessageDeletedListener): void;
/**
* Unsubscribe function for 'messageSent' event.
*/
off(event: 'messageSent', listener: MessageSentListener): void;
/**
* Unsubscribe function for 'messageRead' event.
*/
off(event: 'messageRead', listener: MessageReadListener): void;
/**
* Unsubscribe function for 'participantsAdded' event.
*/
off(event: 'participantsAdded', listener: ParticipantsAddedListener): void;
/**
* Unsubscribe function for 'participantsRemoved' event.
*/
off(event: 'participantsRemoved', listener: ParticipantsRemovedListener): void;
/**
* Unsubscribe function for 'topicChanged' event.
*/
off(event: 'topicChanged', listener: TopicChangedListener): void;
/**
* Unsubscribe function for 'error' event.
*/
off(event: 'error', listener: (e: AdapterError) => void): void;
}
/**
* Functionality for managing the current chat thread.
*
* @public
*/
export declare interface ChatAdapterThreadManagement {
/**
* Fetch initial state for the Chat adapter.
*
* Performs the minimal fetch necessary for ChatComposite and API methods.
*/
fetchInitialData(): Promise;
/**
* Send a message in the thread.
* Please note that SendMessageOptions is being deprecated, please use MessageOptions instead.
*/
sendMessage(content: string, options?: SendMessageOptions): Promise;
/**
* Send a read receipt for a message.
*/
sendReadReceipt(chatMessageId: string): Promise;
/**
* Send typing indicator in the thread.
*/
sendTypingIndicator(): Promise;
/**
* Remove a participant in the thread.
*/
removeParticipant(userId: string): Promise;
/**
* Set the topic for the thread.
*/
setTopic(topicName: string): Promise;
/**
* Update a message content.
* Please note that metadata is being deprecated, please use MessageOptions.metadata instead.
*/
updateMessage(messageId: string, content: string, options?: Record): Promise;
/**
* Delete a message in the thread.
*/
deleteMessage(messageId: string): Promise;
/**
* Load more previous messages in the chat thread history.
*
* @remarks
* This method is usually used to control incremental fetch/infinite scroll
*
*/
loadPreviousChatMessages(messagesToLoad: number): Promise;
/**
* Downloads a resource into the cache for the given message.
*/
downloadResourceToCache(resourceDetails: ResourceDetails): Promise;
/**
* Removes a resource from the cache for the given message.
*/
removeResourceFromCache(resourceDetails: ResourceDetails): void;
}
/**
* {@link ChatAdapter} state for pure UI purposes.
*
* @public
*/
export declare type ChatAdapterUiState = {
error?: Error;
};
/**
* Represents the type of attachment
* @public
*/
export declare type ChatAttachmentType = 'unknown' | 'image' | 'file';
/**
* Common props for selectors for {@link ChatClientState}.
*
* @public
*/
export declare type ChatBaseSelectorProps = {
threadId: string;
};
/**
* A {@link React.Context} that stores a {@link StatefulChatClient}.
*
* Chat components from this package must be wrapped with a {@link ChatClientProvider}.
*
* @public
*/
export declare const ChatClientProvider: (props: ChatClientProviderProps) => JSX.Element;
/**
* Arguments to initialize a {@link ChatClientProvider}.
*
* @public
*/
export declare type ChatClientProviderProps = {
children: React_2.ReactNode;
chatClient: StatefulChatClient;
};
/**
* Centralized state for {@link @azure/communication-chat#ChatClient}.
*
* @public
*/
export declare type ChatClientState = {
/**
* Identifier of the current user.
*/
userId: CommunicationIdentifierKind;
/**
* DisplayName of the current user.
* The same value as what others see in {@link @azure/communication-chat#ChatParticipant.displayName}
*/
displayName: string;
/**
* Chat threads joined by the current user.
* Object with {@link ChatThreadClientState} fields, keyed by {@link ChatThreadClientState.threadId}.
*/
threads: {
[key: string]: ChatThreadClientState;
};
/**
* Stores the latest error for each API method.
*
* See documentation of {@link ChatErrors} for details.
*/
latestErrors: ChatErrors;
};
/**
* A customizable UI composite for the chat experience.
*
* @remarks Chat composite min width and height are respectively 17.5rem and 20rem (280px and 320px, with default rem at 16px)
*
* @public
*/
export declare const ChatComposite: (props: ChatCompositeProps) => JSX.Element;
/**
* {@link ChatAdapter} state inferred from Azure Communication Services backend.
*
* @public
*/
export declare type ChatCompositeClientState = {
userId: CommunicationIdentifierKind;
displayName: string;
thread: ChatThreadClientState;
/**
* Latest error encountered for each operation performed via the adapter.
*/
latestErrors: AdapterErrors;
};
/**
* Icons that can be overridden for {@link ChatComposite}.
*
* @public
*/
export declare type ChatCompositeIcons = {
EditBoxCancel?: JSX.Element;
EditBoxSubmit?: JSX.Element;
MessageDelivered?: JSX.Element;
MessageEdit?: JSX.Element;
MessageFailed?: JSX.Element;
MessageRemove?: JSX.Element;
MessageSeen?: JSX.Element;
MessageSending?: JSX.Element;
ParticipantItemOptions?: JSX.Element;
ParticipantItemOptionsHovered?: JSX.Element;
SendBoxSend?: JSX.Element;
SendBoxSendHovered?: JSX.Element;
};
/**
* Props for the ChatComposite that you can use in your application. Contains the
* options for the {@link ChatComposite} {@link ChatCompositeOptions}.
* @public
*/
export declare interface ChatCompositeLoaderProps extends Partial> {
/**
* UserId for the local user.
*/
userId: CommunicationUserIdentifier;
/**
* CommunicationTokenCredential for the local user.
*/
credential: CommunicationTokenCredential;
/**
* Display name for the local user.
*/
displayName?: string;
/**
* Communication service endpoint. This is used for the token and joining the chat thread.
*/
endpoint: string;
/**
* Communication threadId for the chat thread.
*/
threadId: string;
/**
* Options for the {@link AzureCommunicationChatAdapter}
* This is used to configure the chat adapter.
*/
chatCompositeOptions?: ChatCompositeOptions;
}
/**
* Optional features of the {@link ChatComposite}.
*
* @public
*/
export declare type ChatCompositeOptions = {
/**
* Surface Azure Communication Services backend errors in the UI with {@link @azure/communication-react#ErrorBar}.
* Hide or show the error bar.
* @defaultValue true
*/
errorBar?: boolean;
/**
* Show or hide the topic at the top of the chat. Hidden if set to `false`
* @defaultValue true
*/
topic?: boolean;
/**
* enumerable to determine if the input box has focus on render or not.
* When undefined nothing has focus on render
*/
autoFocus?: 'sendBoxTextField';
};
/**
* Props for {@link ChatComposite}.
*
* @public
*/
export declare interface ChatCompositeProps extends BaseCompositeProps {
/**
* An adapter provides logic and data to the composite.
* Composite can also be controlled using the adapter.
*/
adapter: ChatAdapter;
/**
* `(messageProps: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element`
* A callback for customizing the message renderer.
*/
onRenderMessage?: (messageProps: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element;
/**
* `(typingUsers: CommunicationParticipant[]) => JSX.Element`
* A callback for customizing the typing indicator renderer.
*/
onRenderTypingIndicator?: (typingUsers: CommunicationParticipant[]) => JSX.Element;
/**
* Flags to enable/disable visual elements of the {@link ChatComposite}.
*/
options?: ChatCompositeOptions;
}
/**
* Strings used by the {@link ChatComposite} directly.
*
* This strings are in addition to those used by the components from the component library.
*
* @public
*/
export declare interface ChatCompositeStrings {
/**
* Chat list header text
*/
chatListHeader: string;
}
/**
* Error thrown from failed {@link StatefulChatClient} methods.
*
* @public
*/
export declare class ChatError extends Error {
/**
* The API method target that failed.
*/
target: ChatErrorTarget;
/**
* Error thrown by the failed SDK method.
*/
innerError: Error;
/**
* Timestamp added to the error by the stateful layer.
*/
timestamp: Date;
constructor(target: ChatErrorTarget, innerError: Error, timestamp?: Date);
}
/**
* Selector type for {@link ErrorBar} component.
*
* @public
*/
export declare type ChatErrorBarSelector = (state: ChatClientState, props: ChatBaseSelectorProps) => {
activeErrorMessages: ActiveErrorMessage[];
};
/**
* Errors teed from API calls to the Chat SDK.
*
* Each property in the object stores the latest error for a particular SDK API method.
*
* @public
*/
export declare type ChatErrors = {
[target in ChatErrorTarget]: ChatError;
};
/**
* String literal type for all permissible keys in {@link ChatErrors}.
*
* @public
*/
export declare type ChatErrorTarget = 'ChatClient.createChatThread' | 'ChatClient.deleteChatThread' | 'ChatClient.getChatThreadClient' | 'ChatClient.listChatThreads' | 'ChatClient.off' | 'ChatClient.on' | 'ChatClient.startRealtimeNotifications' | 'ChatClient.stopRealtimeNotifications' | 'ChatThreadClient.addParticipants' | 'ChatThreadClient.deleteMessage' | 'ChatThreadClient.getMessage' | 'ChatThreadClient.getProperties' | 'ChatThreadClient.listMessages' | 'ChatThreadClient.listParticipants' | 'ChatThreadClient.listReadReceipts' | 'ChatThreadClient.removeParticipant' | 'ChatThreadClient.sendMessage' | 'ChatThreadClient.sendReadReceipt' | 'ChatThreadClient.sendTypingNotification' | 'ChatThreadClient.updateMessage' | 'ChatThreadClient.updateTopic';
/**
* Object containing all the handlers required for chat components.
*
* Chat related components from this package are able to pick out relevant handlers from this object.
* See {@link useHandlers} and {@link usePropsFor}.
*
* @public
*/
export declare type ChatHandlers = {
onSendMessage: (content: string, options?: SendMessageOptions) => Promise;
onMessageSeen: (chatMessageId: string) => Promise;
onTyping: () => Promise;
onRemoveParticipant: (userId: string) => Promise;
updateThreadTopicName: (topicName: string) => Promise;
onLoadPreviousChatMessages: (messagesToLoad: number) => Promise;
onUpdateMessage: (messageId: string, content: string) => Promise;
onDeleteMessage: (messageId: string) => Promise;
};
/**
* Callback for {@link CallWithChatAdapterSubscribers} 'chatInitialized' event.
*
* @public
*/
export declare type ChatInitializedListener = (event: {
adapter: CallWithChatAdapter;
}) => void;
/**
* A chat message.
*
* @public
*/
export declare interface ChatMessage extends MessageCommon {
messageType: 'chat';
content?: string;
editedOn?: Date;
deletedOn?: Date;
senderId?: string;
senderDisplayName?: string;
status?: MessageStatus;
failureReason?: string;
attached?: MessageAttachedStatus;
mine?: boolean;
clientMessageId?: string;
contentType: MessageContentType;
/**
* A metadata field for the message.
* {@link @azure/communication-chat#ChatMessage.metadata}
*/
metadata?: Record;
/**
* A list of attachments in the message.
* {@link AttachmentMetadata}
*/
attachments?: AttachmentMetadata[];
}
/**
* An extension to {@link @azure/communication-chat#ChatMessage} that stores
* client-side only metadata for chat messages.
*
* TODO: The name has bitrotted. Rename me.
*
* @public
*/
export declare type ChatMessageWithStatus = ChatMessage_2 & {
clientMessageId?: string;
status: MessageStatus;
resourceCache?: Record;
};
/**
* Selector type for {@link ParticipantList} component.
*
* @public
*/
export declare type ChatParticipantListSelector = (state: ChatClientState, props: ChatBaseSelectorProps) => {
myUserId: string;
participants: ParticipantListParticipant[];
};
/**
* The profile of a user or bot.
*
* @public
*/
export declare type ChatProfile = {
/**
* Primary text to display, usually the name of the person.
*/
displayName?: string;
};
/**
* Helper type for {@link usePropsFor}.
*
* @public
*/
export declare type ChatReturnProps JSX.Element> = GetChatSelector extends ((state: ChatClientState, props: any) => any) ? ReturnType> & Common[0]> : never;
/**
* A {@link React.Context} that stores a {@link @azure/communication-chat#ChatThreadClient}.
*
* Chat components from this package must be wrapped with a {@link ChatThreadClientProvider}.
*
* @public
*/
export declare const ChatThreadClientProvider: (props: ChatThreadClientProviderProps) => JSX.Element;
/**
* Arguments to initialize a {@link ChatThreadClientProvider}.
*
* @public
*/
export declare type ChatThreadClientProviderProps = {
children: React_2.ReactNode;
chatThreadClient: ChatThreadClient;
};
/**
* Centralized state for {@link @azure/communication-chat#ChatThreadClient}.
*
* @public
*/
export declare type ChatThreadClientState = {
/**
* Messages in this thread.
* Object with {@link ChatMessageWithStatus} entries
* Local messages are keyed by keyed by {@link ChatMessageWithStatus.clientMessageId}.
* Remote messages are keyed by {@link @azure/communication-chat#ChatMessage.id}.
*/
chatMessages: {
[key: string]: ChatMessageWithStatus;
};
/**
* Participants of this chat thread.
*
* Object with {@link @azure/communication-chat#ChatParticipant} fields,
* keyed by {@link @azure/communication-chat#ChatParticipant.id}.
*/
participants: {
[key: string]: ChatParticipant;
};
/**
* Id of this chat thread. Returned from {@link @azure/communication-chat#ChatThreadClient.threadId}
*/
threadId: string;
/**
* An object containing properties of this chat thread.
*/
properties?: ChatThreadProperties;
/**
* An array of ReadReceipts of this chat thread. Returned from {@link @azure/communication-chat#ChatThreadClient.listReadReceipts}
*/
readReceipts: ChatMessageReadReceipt[];
/**
* An array of typingIndicators of this chat thread. Captured from event listener of {@link @azure/communication-chat#ChatClient}
* Stateful client only stores recent 8000ms real-time typing indicators data.
*/
typingIndicators: TypingIndicatorReceivedEvent[];
/**
* Latest timestamp when other users read messages sent by current user.
*/
latestReadTime: Date;
};
/**
* Properties of a chat thread.
*
* We define a minimal one that helps us hide the different types used by underlying API.
*
* @public
*/
export declare type ChatThreadProperties = {
topic?: string;
};
/**
* Centralized state for {@link @azure/communication-calling#CallClient} or {@link @azure/communication-chat#ChatClient}.
*
* See also: {@link CallClientState}, {@link ChatClientState}.
* @public
*/
export declare type ClientState = CallClientState & ChatClientState;
/**
* Return intersect type of 2 types
*
* @public
*/
export declare type Common = Pick>;
/**
* {@link CallComposite} Adapter interface.
*
* @public
*/
export declare interface CommonCallAdapter extends AdapterState, Disposable_2, CallAdapterCallOperations, CallAdapterDeviceManagement, CallAdapterSubscribers {
/**
* Join the call with microphone initially on/off.
* @deprecated Use joinCall(options?:JoinCallOptions) instead.
* @param microphoneOn - Whether microphone is initially enabled
*
* @public
*/
joinCall(microphoneOn?: boolean): void;
/**
* Join the call with options bag to set microphone/camera initial state when joining call
* true = turn on the device when joining call
* false = turn off the device when joining call
* 'keep'/undefined = retain devices' precall state
*
* @param options - param to set microphone/camera initially on/off/use precall state.
*
* @public
*/
joinCall(options?: JoinCallOptions): void;
/**
* Start the call.
*
* @param participants - An array of participant ids to join
*
* @public
*/
startCall(participants: string[], options?: StartCallOptions): void;
/**
* Start the call.
* @param participants - An array of {@link @azure/communication-common#CommunicationIdentifier} to be called
* @public
*/
startCall(participants: StartCallIdentifier[], options?: StartCallOptions): void;
}
/**
* Common optional parameters to create {@link AzureCommunicationCallAdapter} or {@link TeamsCallAdapter}
*
* @public
*/
export declare type CommonCallAdapterOptions = {
/**
* Default set of background images for background image picker.
*/
videoBackgroundOptions?: {
videoBackgroundImages?: VideoBackgroundImage[];
onResolveDependency?: () => Promise;
};
/**
* `DeepNoiseSuppressionEffect` options to be used for noise suppression.
*/
deepNoiseSuppressionOptions?: {
onResolveDependency?: () => Promise;
deepNoiseSuppressionOnByDefault?: boolean;
hideDeepNoiseSuppressionButton?: boolean;
};
/**
* Use this to fetch profile information which will override data in {@link CallAdapterState} like display name
* The onFetchProfile is fetch-and-forget one time action for each user, once a user profile is updated, the value will be cached
* and would not be updated again within the lifecycle of adapter.
*/
onFetchProfile?: OnFetchProfileCallback;
/**
* Sounds to use for calling events
*/
callingSounds?: CallingSounds;
/**
* Reaction resource for reaction resources
* @beta
*/
reactionResources?: ReactionResources;
/**
* A phone number in E.164 format procured using Azure Communication Services that will be used to represent callers identity.
* E.164 numbers are formatted as [+] [country code] [phone number including area code]. For example, +14255550123 for a US phone number.
*/
alternateCallerId?: string;
};
/**
* Customization options for the control bar in calling experience.
*
* @public
*/
export declare type CommonCallControlOptions = {
/**
* {@link CallControlDisplayType} to change how the call controls are displayed.
* `'compact'` display type will decreases the size of buttons and hide the labels.
*
* @remarks
* If the composite `formFactor` is set to `'mobile'`, the control bar will always use compact view.
*
* @defaultValue 'default'
*/
displayType?: CallControlDisplayType;
/**
* Show or Hide Camera Button during a call
* @defaultValue true
*/
cameraButton?: boolean | {
disabled: boolean;
};
/**
* Show or Hide EndCall button during a call.
* @defaultValue true
*/
endCallButton?: boolean | {
/**
* whether to make end call button to trigger a menu, which will enable end call for everybody functionality.
* @defaultValue false
*/
hangUpForEveryone?: false | 'endCallOptions';
/**
* Wether to disable the end call confirmation modal.
*/
disableEndCallModal?: boolean;
};
/**
* Show or Hide Microphone button during a call.
* @defaultValue true
*/
microphoneButton?: boolean | {
disabled: boolean;
};
/**
* Show or Hide Devices button during a call.
* @defaultValue true
*/
devicesButton?: boolean | {
disabled: boolean;
};
/**
* Show, Hide or Disable participants button during a call.
* @defaultValue true
*/
participantsButton?: boolean | {
disabled: boolean;
};
/**
* Show, Hide or Disable the screen share button during a call.
* @defaultValue true
*/
screenShareButton?: boolean | {
disabled: boolean;
};
/**
* Show, Hide or disable the more button during a call.
* @defaultValue true
*/
moreButton?: boolean;
/**
* Show, Hide or Disable the screen share button during a call.
* @defaultValue true
*/
raiseHandButton?: boolean | {
disabled: boolean;
};
/**
* Show, Hide or Disable the reaction button during a call.
* @defaultValue true
*/
reactionButton?: boolean | {
disabled: boolean;
};
/**
* Inject custom buttons in the call controls.
*/
onFetchCustomButtonProps?: CustomCallControlButtonCallback[];
holdButton?: boolean | {
disabled: boolean;
};
/**
* Show or hide the people button in the composite control bar.
* @defaultValue true
*/
peopleButton?: boolean | {
disabled: boolean;
};
/**
* Show or hide the dialpad button in the composite control bar.
*/
dtmfDialerButton?: boolean | {
disabled: boolean;
};
/**
* Show or hide the exit spotlight button in the composite control bar when local participant is spotlighted.
*/
exitSpotlightButton?: boolean;
/**
* Show, Hide or Disable captions during a call.
* @defaultValue true
*/
captionsButton?: boolean;
/**
* Show, Hide or Disable real time text during a call.
* @defaultValue true
*/
realTimeTextButton?: boolean;
/**
* Show, Hide or Disable gallery controls button during a call.
* @defaultValue true
*/
galleryControlsButton?: boolean;
/**
* Show, meeting conference phone information.
* @defaultValue true
*/
teamsMeetingPhoneCallButton?: boolean;
};
/**
* Object containing all the handlers required for calling components.
*
* Calling related components from this package are able to pick out relevant handlers from this object.
* See {@link useHandlers} and {@link usePropsFor}.
*
* @public
*/
export declare interface CommonCallingHandlers {
onStartLocalVideo: () => Promise;
onToggleCamera: (options?: VideoStreamOptions) => Promise;
onSelectMicrophone: (device: AudioDeviceInfo) => Promise;
onSelectSpeaker: (device: AudioDeviceInfo) => Promise;
onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise;
onToggleMicrophone: () => Promise;
onStartScreenShare: () => Promise;
onStopScreenShare: () => Promise;
onToggleScreenShare: () => Promise;
onHangUp: (forEveryone?: boolean) => Promise;
onRaiseHand: () => Promise;
onLowerHand: () => Promise;
onToggleRaiseHand: () => Promise;
onReactionClick: (reaction: Reaction_2) => Promise;
onToggleHold: () => Promise;
onAddParticipant(participant: CommunicationUserIdentifier): Promise;
onAddParticipant(participant: PhoneNumberIdentifier, options: AddPhoneNumberOptions): Promise;
onCreateLocalStreamView: (options?: VideoStreamOptions) => Promise;
onCreateRemoteStreamView: (userId: string, options?: VideoStreamOptions) => Promise;
/**
* @deprecated use {@link onDisposeRemoteVideoStreamView} and {@link onDisposeRemoteScreenShareStreamView} instead.
*/
onDisposeRemoteStreamView: (userId: string) => Promise;
onDisposeLocalStreamView: () => Promise;
onDisposeRemoteVideoStreamView: (userId: string) => Promise;
onDisposeRemoteScreenShareStreamView: (userId: string) => Promise;
onDisposeLocalScreenShareStreamView: () => Promise;
onSendDtmfTone: (dtmfTone: DtmfTone_2) => Promise;
onRemoveParticipant(userId: string): Promise;
onRemoveParticipant(participant: CommunicationIdentifier): Promise;
onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => void;
onAcceptCall: (incomingCallId: string, useVideo?: boolean) => Promise;
onRejectCall: (incomingCallId: string) => Promise;
onRemoveVideoBackgroundEffects: () => Promise;
onBlurVideoBackground: (backgroundBlurConfig?: BackgroundBlurConfig) => Promise;
onReplaceVideoBackground: (backgroundReplacementConfig: BackgroundReplacementConfig) => Promise;
onStartNoiseSuppressionEffect: () => Promise;
onStopNoiseSuppressionEffect: () => Promise;
onStartCaptions: (options?: CaptionsOptions) => Promise;
onStopCaptions: () => Promise;
onSendRealTimeText: (text: string, isFinalized: boolean) => Promise;
onSetSpokenLanguage: (language: string) => Promise;
onSetCaptionLanguage: (language: string) => Promise;
onSubmitSurvey(survey: CallSurvey): Promise;
onStartSpotlight: (userIds?: string[]) => Promise;
onStopSpotlight: (userIds?: string[]) => Promise;
onStopAllSpotlight: () => Promise;
onMuteParticipant: (userId: string) => Promise;
onMuteAllRemoteParticipants: () => Promise;
/**
* Call back to create a view for together mode
*/
onCreateTogetherModeStreamView: (options?: TogetherModeStreamOptions) => Promise;
/**
* Call back to create a view for together mode
*/
onStartTogetherMode: () => Promise;
/**
* Call set together mode scene size
*/
onSetTogetherModeSceneSize: (width: number, height: number) => void;
/**
* Call back to dispose together mode views
*/
onDisposeTogetherModeStreamView: () => Promise;
/**
* Forbid remote participants from sending audio
*
*/
onForbidAudio?: (userIds: string[]) => Promise;
/**
* Permit remote participants to send audio
*
*/
onPermitAudio?: (userIds: string[]) => Promise;
/**
* Change meeting option forbid remote participants from sending audio
*
*/
onForbidOthersAudio?: () => Promise;
/**
* Change meeting option permit remote participants to send audio
*
*/
onPermitOthersAudio?: () => Promise;
/**
* Forbid remote participants from sending video
*
*/
onForbidVideo?: (userIds: string[]) => Promise;
/**
* Permit remote participants to send video
*
*/
onPermitVideo?: (userIds: string[]) => Promise;
/**
* Change meeting option forbid remote participants from sending video
*
*/
onForbidOthersVideo?: () => Promise;
/**
* Change meeting option permit remote participants to send video
*
*/
onPermitOthersVideo?: () => Promise;
}
/**
* Return intersect properties of 2 types
*
* @public
*/
export declare type CommonProperties = {
[P in keyof A & keyof B]: A[P] extends B[P] ? P : never;
}[keyof A & keyof B];
/**
* A Chat or Calling participant's state, as reflected in the UI.
*
* @public
*/
export declare type CommunicationParticipant = {
/** User ID of participant */
userId: string;
/** Display name of participant */
displayName?: string;
};
/**
* Locale for Arabic (Saudi Arabia).
*
* @public
*/
export declare const COMPONENT_LOCALE_AR_SA: ComponentLocale;
/**
* Locale for Czech (Czech Republic).
*
* @public
*/
export declare const COMPONENT_LOCALE_CS_CZ: ComponentLocale;
/**
* Locale for Welsh (GB).
*
* @public
*/
export declare const COMPONENT_LOCALE_CY_GB: ComponentLocale;
/**
* Locale for German (Germany).
*
* @public
*/
export declare const COMPONENT_LOCALE_DE_DE: ComponentLocale;
/**
* Locale for English (GB).
*
* @public
*/
export declare const COMPONENT_LOCALE_EN_GB: ComponentLocale;
/**
* Locale for English (US).
*
* @public
*/
export declare const COMPONENT_LOCALE_EN_US: ComponentLocale;
/**
* Locale for Spanish (Spain).
*
* @public
*/
export declare const COMPONENT_LOCALE_ES_ES: ComponentLocale;
/**
* Locale for Spanish (Mexico).
*
* @public
*/
export declare const COMPONENT_LOCALE_ES_MX: ComponentLocale;
/**
* Locale for Finnish (Finland).
*
* @public
*/
export declare const COMPONENT_LOCALE_FI_FI: ComponentLocale;
/**
* Locale for French (Canada).
*
* @public
*/
export declare const COMPONENT_LOCALE_FR_CA: ComponentLocale;
/**
* Locale for French (France).
*
* @public
*/
export declare const COMPONENT_LOCALE_FR_FR: ComponentLocale;
/**
* Locale for Hebrew (Israel).
*
* @public
*/
export declare const COMPONENT_LOCALE_HE_IL: ComponentLocale;
/**
* Locale for Italian (Italy).
*
* @public
*/
export declare const COMPONENT_LOCALE_IT_IT: ComponentLocale;
/**
* Locale for Japanese (Japan).
*
* @public
*/
export declare const COMPONENT_LOCALE_JA_JP: ComponentLocale;
/**
* Locale for Korean (South Korea).
*
* @public
*/
export declare const COMPONENT_LOCALE_KO_KR: ComponentLocale;
/**
* Locale for Norwegian Bokmål (Norway) .
*
* @public
*/
export declare const COMPONENT_LOCALE_NB_NO: ComponentLocale;
/**
* Locale for Dutch (Netherlands).
*
* @public
*/
export declare const COMPONENT_LOCALE_NL_NL: ComponentLocale;
/**
* Locale for Polish (Poland).
*
* @public
*/
export declare const COMPONENT_LOCALE_PL_PL: ComponentLocale;
/**
* Locale for Portuguese (Brazil).
*
* @public
*/
export declare const COMPONENT_LOCALE_PT_BR: ComponentLocale;
/**
* Locale for Russian (Russia).
*
* @public
*/
export declare const COMPONENT_LOCALE_RU_RU: ComponentLocale;
/**
* Locale for Swedish (Sweden) .
*
* @public
*/
export declare const COMPONENT_LOCALE_SV_SE: ComponentLocale;
/**
* Locale for Turkish (Turkey).
*
* @public
*/
export declare const COMPONENT_LOCALE_TR_TR: ComponentLocale;
/**
* Locale for Chinese (Mainland China).
*
* @public
*/
export declare const COMPONENT_LOCALE_ZH_CN: ComponentLocale;
/**
* Locale for Chinese (Taiwan).
*
* @public
*/
export declare const COMPONENT_LOCALE_ZH_TW: ComponentLocale;
/**
* Icons used by the React components exported from this library.
*
* @remark See {@link CompositeIcons} for icons used by composites only.
*
* @public
*/
export declare type ComponentIcons = Record;
/**
* Locale information for all components exported from this library.
*
* @public
*/
export declare interface ComponentLocale {
/** Strings for components */
strings: ComponentStrings;
}
/**
* Helper type for {@link usePropsFor}.
*
* @public
*/
export declare type ComponentProps JSX.Element> = ChatReturnProps extends never ? CallingReturnProps extends never ? undefined : CallingReturnProps : ChatReturnProps;
/**
* ComponentSlotStyle is a \@fluentui/react-northstar type.
* As we have moved away from this package we have used the more generic IRawStyle type from fluent for interoperability.
*
* @public
*/
export declare type ComponentSlotStyle = Omit;
/**
* Strings used by all components exported from this library.
*
* @public
*/
export declare interface ComponentStrings {
/** Strings for MessageThread */
messageThread: MessageThreadStrings;
/** Strings for ParticipantItem */
participantItem: ParticipantItemStrings;
/** Strings for CameraButton */
cameraButton: CameraButtonStrings;
/** Strings for MicrophoneButton */
microphoneButton: MicrophoneButtonStrings;
/** Strings for EndCallButton */
endCallButton: EndCallButtonStrings;
/** Strings for DevicesButton */
devicesButton: DevicesButtonStrings;
/** Strings for ParticipantsButton */
participantsButton: ParticipantsButtonStrings;
/** Strings for ScreenShareButton */
screenShareButton: ScreenShareButtonStrings;
/** Strings for RaiseHandButton */
raiseHandButton: RaiseHandButtonStrings;
/**
* Strings for ReactionButton
* */
reactionButton: ReactionButtonStrings;
/** Strings for TypingIndicator */
typingIndicator: TypingIndicatorStrings;
/** Strings for SendBox */
sendBox: SendBoxStrings;
/** Strings for ImageOverlay */
imageOverlay: ImageOverlayStrings;
/** Strings for MessageStatusIndicator */
messageStatusIndicator: MessageStatusIndicatorStrings;
/** Strings for ErrorBar */
errorBar: ErrorBarStrings;
/** Strings for NotificationStack */
notificationStack: NotificationStackStrings;
/** Strings for VideoGallery */
videoGallery: VideoGalleryStrings;
/** Strings for Dialpad */
dialpad: DialpadStrings;
/** Strings for VideoTile */
videoTile: VideoTileStrings;
/** Strings for HoldButton */
holdButton: HoldButtonStrings;
/**
* Strings for the VerticalGallery.
*/
verticalGallery: VerticalGalleryStrings;
/** Strings for the MeetingConferencePhoneInfoModal */
meetingConferencePhoneInfo: MeetingConferencePhoneInfoModalStrings;
IncomingCallNotification: IncomingCallNotificationStrings;
/** Strings for the RealTimeTextModal */
realTimeTextModal: RealTimeTextModalStrings;
/** Strings for RealTimeText */
realTimeText: RealTimeTextStrings;
/** Strings for Captions Setting Modal */
captionsSettingsModal: CaptionsSettingsModalStrings;
/**
* 1 to 1 mapping between language code and language string for spoken languages
*/
spokenLanguages: SpokenLanguageStrings;
/**
* 1 to 1 mapping between language code and language string for caption languages
*/
captionLanguages: CaptionLanguageStrings;
/** Strings for CaptionsBanner */
captionsBanner: CaptionsBannerStrings;
/** Strings for Start Captions Button */
startCaptionsButton: StartCaptionsButtonStrings;
/** Strings for Start RealTimeText Button */
startRealTimeTextButton: StartRealTimeTextButtonStrings;
}
/**
* Locale for Arabic (Saudi Arabia)
*
* @public
*/
export declare const COMPOSITE_LOCALE_AR_SA: CompositeLocale;
/**
* Locale for Czech (Czech Republic)
*
* @public
*/
export declare const COMPOSITE_LOCALE_CS_CZ: CompositeLocale;
/**
* Locale for Welsh (GB)
*
* @public
*/
export declare const COMPOSITE_LOCALE_CY_GB: CompositeLocale;
/**
* Locale for German (Germany)
*
* @public
*/
export declare const COMPOSITE_LOCALE_DE_DE: CompositeLocale;
/**
* Locale for English (British)
*
* @public
*/
export declare const COMPOSITE_LOCALE_EN_GB: CompositeLocale;
/**
* Locale for English (US)
*
* @public
*/
export declare const COMPOSITE_LOCALE_EN_US: CompositeLocale;
/**
* Locale for Spanish (Spain)
*
* @public
*/
export declare const COMPOSITE_LOCALE_ES_ES: CompositeLocale;
/**
* Locale for Spanish (Mexico)
*
* @public
*/
export declare const COMPOSITE_LOCALE_ES_MX: CompositeLocale;
/**
* Locale for Finnish (Finland)
*
* @public
*/
export declare const COMPOSITE_LOCALE_FI_FI: CompositeLocale;
/**
* Locale for French (Canada)
*
* @public
*/
export declare const COMPOSITE_LOCALE_FR_CA: CompositeLocale;
/**
* Locale for French (France)
*
* @public
*/
export declare const COMPOSITE_LOCALE_FR_FR: CompositeLocale;
/**
* Locale for Hebrew (Israel)
*
* @public
*/
export declare const COMPOSITE_LOCALE_HE_IL: CompositeLocale;
/**
* Locale for Italian (Italy)
*
* @public
*/
export declare const COMPOSITE_LOCALE_IT_IT: CompositeLocale;
/**
* Locale for Japanese (Japan)
*
* @public
*/
export declare const COMPOSITE_LOCALE_JA_JP: CompositeLocale;
/**
* Locale for Korean (South Korea)
*
* @public
*/
export declare const COMPOSITE_LOCALE_KO_KR: CompositeLocale;
/**
* Locale for Norwegian Bokmål (Norway)
*
* @public
*/
export declare const COMPOSITE_LOCALE_NB_NO: CompositeLocale;
/**
* Locale for Dutch (Netherlands)
*
* @public
*/
export declare const COMPOSITE_LOCALE_NL_NL: CompositeLocale;
/**
* Locale for Polish (Poland)
*
* @public
*/
export declare const COMPOSITE_LOCALE_PL_PL: CompositeLocale;
/**
* Locale for Portuguese (Brazil)
*
* @public
*/
export declare const COMPOSITE_LOCALE_PT_BR: CompositeLocale;
/**
* Locale for Russian (Russia)
*
* @public
*/
export declare const COMPOSITE_LOCALE_RU_RU: CompositeLocale;
/**
* Locale for Swedish (Sweden)
*
* @public
*/
export declare const COMPOSITE_LOCALE_SV_SE: CompositeLocale;
/**
* Locale for Turkish (Turkey)
*
* @public
*/
export declare const COMPOSITE_LOCALE_TR_TR: CompositeLocale;
/**
* Locale for Chinese (Mainland China)
*
* @public
*/
export declare const COMPOSITE_LOCALE_ZH_CN: CompositeLocale;
/**
* Locale for Chinese (Taiwan)
*
* @public
*/
export declare const COMPOSITE_LOCALE_ZH_TW: CompositeLocale;
/**
* The default set of icons used by the composites directly (i.e. not via the components defined in this library).
*
* @public
*/
export declare const COMPOSITE_ONLY_ICONS: CompositeIcons;
/**
* Icons that can be overridden in one of the composites exported by this library.
*
* See {@link ChatCompositeIcons}, {@link CallCompositeIcons} and {@link CallWithChatCompositeIcons} for more targeted types.
*
* @public
*/
export declare type CompositeIcons = ChatCompositeIcons & CallCompositeIcons & CallWithChatCompositeIcons;
/**
* Locale information for all composites exported from this library.
*
* @public
*/
export declare interface CompositeLocale {
/** Strings used in composites directly
*
* Contrast with {@link CompositeLocale.component}, which contains strings used via the component library.
*/
strings: CompositeStrings;
/** Locale information for the pure Components used by Composites. See {@link communication-react#ComponentLocale}. */
component: ComponentLocale;
}
/**
* Strings used in the composites directly.
*
* These strings are used by the composites directly, instead of by the contained components.
*
* @public
*/
export declare interface CompositeStrings {
/**
* Strings used by {@link CallComposite}.
*/
call: CallCompositeStrings;
/**
* Strings used by {@link ChatComposite}.
*/
chat: ChatCompositeStrings;
/**
* Strings used by {@link CallWithChatComposite}.
*/
callWithChat: CallWithChatCompositeStrings;
}
/**
* @public
* Information for conference phone info
*/
export declare interface ConferencePhoneInfo {
/**
* Phone number for the conference
*/
phoneNumber: string;
/**
* Conference id for the conference
*/
conferenceId: string;
/**
* Is toll free phone number
*/
isTollFree: boolean;
/**
* phone number country
*/
country?: string;
/**
* phone number city
*/
city?: string;
}
/**
* A system message with arbitary content.
*
* @public
*/
export declare interface ContentSystemMessage extends SystemMessageCommon {
systemMessageType: 'content';
content: string;
}
/**
* A container for various buttons for call controls.
*
* Use with various call control buttons in this library, e.g., {@link CameraButton}, or your own instances of
* {@link ControlBarButton} directly.
*
* @public
*/
export declare const ControlBar: (props: ControlBarProps) => JSX.Element;
/**
* Default button styled for the {@link ControlBar}.
*
* Use this component create custom buttons that are styled the same as other buttons provided by the UI Library.
*
* @public
*/
export declare const ControlBarButton: (props: ControlBarButtonProps) => JSX.Element;
/**
* Props for {@link ControlBarButton}.
*
* @public
*/
export declare interface ControlBarButtonProps extends IButtonProps {
/**
* Whether the label is displayed or not.
*
* @defaultValue `false`
*/
showLabel?: boolean;
/**
* Key to use for the Label component
*/
labelKey?: string;
/**
* Disable tooltip.
*
* @defaultValue 'false'
*/
disableTooltip?: boolean;
/**
* Id to use for the tooltip host.
*
* @defaultValue This uses the labelKey and appends -tooltip by default
*/
tooltipId?: string;
/**
* Optional strings to override in component.
*/
strings?: ControlBarButtonStrings;
/**
* Icon to render when the button is checked.
*/
onRenderOnIcon?: IRenderFunction;
/**
* Icon to render when the button is not checked.
*/
onRenderOffIcon?: IRenderFunction;
/**
* Fluent styles, including extensions common to all {@link ControlBarButton}s.
*/
styles?: ControlBarButtonStyles;
}
/**
* Strings of {@link ControlBarButton} that can be overridden.
*
* @public
*/
export declare interface ControlBarButtonStrings {
/**
* Label of the button. This supersedes onLabel or offLabel if used.
*/
label?: string;
/**
* Label of the button shown when the button is checked.
*/
onLabel?: string;
/**
* Label of the button shown when the button is not checked.
*/
offLabel?: string;
/**
* Tooltip content of the button. This supersedes tooltipDisabledContent, tooltipOnContent and tooltipOffContent if used.
*/
tooltipContent?: string;
/**
* Tooltip content when the button is disabled.
*/
tooltipDisabledContent?: string;
/**
* Tooltip content when the button is in the checked state.
*/
tooltipOnContent?: string;
/**
* Tooltip content when the button is in the unchecked state.
*/
tooltipOffContent?: string;
}
/**
* Styles for all {@link ControlBarButton} implementations.
*
* @public
*/
export declare type ControlBarButtonStyles = IButtonStyles;
/**
* Present layouts for the {@link ControlBar}.
*
* @public
*/
export declare type ControlBarLayout = 'horizontal' | 'vertical' | 'dockedTop' | 'dockedBottom' | 'dockedLeft' | 'dockedRight' | 'floatingTop' | 'floatingBottom' | 'floatingLeft' | 'floatingRight';
/**
* Props for {@link ControlBar}.
*
* @public
*/
export declare interface ControlBarProps {
/** React Child components. */
children?: React_2.ReactNode;
/**
* Allows users to pass an object containing custom CSS styles.
* @Example
* ```
*
* ```
*/
styles?: BaseCustomStyles;
/**
* Changes the layout of the control bar.
* Available layouts are `horizontal`, `vertical`, `dockedTop`, `dockedBottom`,
* `dockedLeft`, `dockedRight`, `floatingTop`, `floatingBottom`, `floatingLeft`,
* `floatingRight`
* Defaults to a `horizontal` layout.
*/
layout?: ControlBarLayout;
}
/**
* Create a {@link CallAdapter} backed by Azure Communication Services.
*
* This is the default implementation of {@link CallAdapter} provided by this library.
*
* Note: `displayName` can be a maximum of 256 characters.
*
* @public
*/
export declare function createAzureCommunicationCallAdapter(args: AzureCommunicationCallAdapterArgs): Promise;
/**
* Create a {@link CallAdapter} backed by Azure Communication Services.
*
* This is the default implementation of {@link CallAdapter} provided by this library.
*
* Note: `displayName` can be a maximum of 256 characters.
*
* @public
*/
export declare function createAzureCommunicationCallAdapter(args: AzureCommunicationOutboundCallAdapterArgs): Promise;
/**
* Create a {@link CallAdapter} using the provided {@link StatefulCallClient}.
*
* Useful if you want to keep a reference to {@link StatefulCallClient}.
* Consider using {@link createAzureCommunicationCallAdapter} for a simpler API.
*
* @public
*/
export declare function createAzureCommunicationCallAdapterFromClient(callClient: StatefulCallClient, callAgent: CallAgent, targetCallees: StartCallIdentifier[], options?: AzureCommunicationCallAdapterOptions): Promise