Share via


@azure/communication-react package

Classes

CallError

Error thrown from failed stateful API methods.

ChatError

Error thrown from failed StatefulChatClient methods.

Interfaces

AcceptedTransfer

Transfer feature state

ActiveErrorMessage

Active error messages to be shown via ErrorBar.

ActiveNotification

Active notifications to be shown via NotificationStack.

AdapterError

Error reported via error events and stored in adapter state.

AdapterNotification

Notification from call client state stored in adapter state.

AdapterState

Functionality for interfacing with Composite adapter state.

AttachmentMetadata

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.

BaseCompositeProps

Properties common to all composites exported from this library.

BaseCustomStyles

Basic fluent styles props for all components exported from this libray.

BreakoutRoomsState

Breakout rooms state

CallAdapter

An Adapter interface specific for Azure Communication identity which extends CommonCallAdapter.

CallAdapterCallManagement

Functionality for managing the current call or start a new call

CallAdapterCallOperations

Functionality for managing the current call.

CallAdapterDeviceManagement

Functionality for managing devices within a call.

CallAdapterSubscribers

Call composite events that can be subscribed to.

CallAgentProviderProps

Arguments to initialize a CallAgentProvider.

CallAgentState

State only version of <xref:%40azure%2Fcommunication-calling%23CallAgent> except calls is moved to be a child directly of 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.

CallAndChatLocator

Arguments for use in createAzureCommunicationCallWithChatAdapter to join a Call with an associated Chat thread.

CallClientProviderProps

Arguments to initialize a CallClientProvider.

CallClientState

Container for all of the state data proxied by 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 DeviceManagerState. The userId state is provided as a convenience for the developer and is completely controled and set by the developer.

CallCompositeLoaderProps

Props for the OutboundCallComposite that you can use in your application.

Contains two options bags:

CallCompositeProps

Props for CallComposite.

CallCompositeStrings

Strings used by the CallComposite directly.

This strings are in addition to those used by the components from the component library.

CallFeatureStreamState

State only version of <xref:%40azure%2Fcommunication-calling%23CallFeatureStream>. Represents call feature stream state.

CallInfoState

State to track the types <xref:CallInfo> and <xref:TeamsCallInfo>

CallNotification
CallProviderProps

Arguments to initialize a CallProvider.

CallState

State only version of <xref:%40azure%2Fcommunication-calling%23Call>. StatefulCallClient will automatically retrieve Call's state and add it to the state exposed by StatefulCallClient.

CallSurveyImprovementSuggestions

Represents the improvement suggestion part of call survey

CallWithChatAdapter

CallWithChatComposite Adapter interface.

CallWithChatAdapterManagement

Functionality for managing the current call with chat.

CallWithChatAdapterState

CallWithChat State is a combination of Stateful Chat and Stateful Calling clients with some state specific to the CallWithChat Composite only.

CallWithChatAdapterSubscriptions

Call and Chat events that can be subscribed to in the CallWithChatAdapter.

CallWithChatAdapterUiState

UI state pertaining to the CallWithChatComposite.

CallWithChatClientState

State from the backend services that drives CallWithChatComposite.

CallWithChatCompositeLoaderProps

Props for the CallWithChatComposite that you can use in your application.

Contains two options bags:

CallWithChatCompositeProps

Props required for the CallWithChatComposite

CallWithChatCompositeStrings

Strings used by the CallWithChatComposite directly.

This strings are in addition to those used by the components from the component library.

CallWithChatControlOptions

Customization options for the control bar in calling with chat experience.

CallingHandlers

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 <xref:useHandlers> and usePropsFor.

CallingTheme

Custom Fluent theme palette used by calling related components in this library.

CameraButtonContextualMenuStyles

Styles for the CameraButton menu.

CameraButtonProps

Props for CameraButton component.

CameraButtonStrings

Strings of CameraButton that can be overridden.

CameraButtonStyles

Styles for CameraButton

CapabilitiesFeatureState

State only version of <xref:%40azure%2Fcommunication-calling%23CapabilitiesFeature>

CapabilityChangedNotificationStrings

Strings for capability changed notification

CaptionLanguageStrings

caption language strings for captions setting modal

CaptionsBannerProps

CaptionsBanner Component Props.

CaptionsBannerStrings

strings for captions banner

CaptionsCallFeatureState
CaptionsInfo
CaptionsSettingsModalProps

CaptionsSettingsModal Component Props.

CaptionsSettingsModalStrings

strings for captions setting modal

ChatAdapterSubscribers

Chat composite events that can be subscribed to.

ChatAdapterThreadManagement

Functionality for managing the current chat thread.

ChatCompositeLoaderProps

Props for the ChatComposite that you can use in your application. Contains the options for the ChatComposite ChatCompositeOptions.

ChatCompositeProps

Props for ChatComposite.

ChatCompositeStrings

Strings used by the ChatComposite directly.

This strings are in addition to those used by the components from the component library.

ChatMessage

A chat message.

CommonCallAdapter

CallComposite Adapter interface.

CommonCallingHandlers

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 <xref:useHandlers> and usePropsFor.

ComponentLocale

Locale information for all components exported from this library.

ComponentStrings

Strings used by all components exported from this library.

CompositeLocale

Locale information for all composites exported from this library.

CompositeStrings

Strings used in the composites directly.

These strings are used by the composites directly, instead of by the contained components.

ConferencePhoneInfo

Information for conference phone info

ContentSystemMessage

A system message with arbitary content.

ControlBarButtonProps

Props for ControlBarButton.

ControlBarButtonStrings

Strings of ControlBarButton that can be overridden.

ControlBarProps

Props for ControlBar.

CreateVideoStreamViewResult

Object returned after creating a local or remote VideoStream. This contains helper functions to manipulate the render of the stream.

CustomCallControlButtonCallbackArgs

Arguments for CustomCallControlButtonCallback.

CustomCallControlButtonProps

Response from CustomCallControlButtonCallback. Includes the base props necessary to render a ControlBarButton or <xref:DrawerMenuItem>.

CustomCallControlButtonStrings

Strings for CustomCallControlButtons

CustomMessage

A custom message type.

Custom messages are not rendered by default, but applications can provide custom renderers for them.

DevicesButtonContextualMenuStyles

Styles for the DevicesButton menu.

DevicesButtonProps

Props for DevicesButton.

DevicesButtonStrings

Strings of DevicesButton that can be overridden.

DevicesButtonStyles

Styles for the Devices button menu items.

DiagnosticsCallFeatureState

State only proxy for <xref:%40azure%2Fcommunication-calling%23DiagnosticsCallFeature>.

DialpadProps

Props for Dialpad component.

DialpadStrings

Strings of Dialpad that can be overridden.

DialpadStyles

Styles for Dialpad component.

Disposable

Functionality for correctly disposing a Composite.

DtmfDialPadOptions

Options to determine the rendering behavior of the dtmfDialer in the CallComposite

EndCallButtonProps

Props for EndCallButton.

EndCallButtonStrings

Strings of EndCallButton that can be overridden.

ErrorBarProps

Props for ErrorBar.

In addition to the following, ErrorBar forwards all <xref:%40fluentui%2Freact%23IMessageBarProps> to the underlying <xref:%40fluentui%2Freact%23MessageBar>.

ErrorBarStrings

All strings that may be shown on the UI in the ErrorBar.

FluentThemeProviderProps

Props for FluentThemeProvider.

GridLayoutProps

Props for GridLayout.

GridLayoutStyles

GridLayout Component Styles.

HoldButtonProps
HoldButtonStrings

Strings for the hold button labels

HorizontalGalleryStyles

<xref:HorizontalGallery> Component Styles.

ImageOverlayProps

Props for ImageOverlay.

ImageOverlayStrings

Strings of ImageOverlay that can be overridden.

IncomingCallNotificationProps

Properties for the incoming call notification component.

IncomingCallNotificationStrings

Strings for the incoming call notification component.

IncomingCallNotificationStyles

Styles for the incoming call notification component.

IncomingCallStackCall

Represents an active incoming call.

IncomingCallStackProps

Props for the IncomingCallManager component.

IncomingCallState

State only version of <xref:%40azure%2Fcommunication-calling%23IncomingCall>. StatefulCallClient will automatically detect incoming calls and add their state to the state exposed by StatefulCallClient.

InlineImage

InlineImage's state, as reflected in the UI.

InlineImageOptions

Options to display inline image in the inline image scenario.

JoinCallOptions

Options for setting microphone and camera state when joining a call true = turn on the device when joining call false = turn off the device when joining call 'keep'/undefined = retain devices' precall state

JumpToNewMessageButtonProps

Arguments for <xref:MessageThreadProps.onRenderJumpToNewMessageButton>.

LocalVideoCameraCycleButtonProps
LocalVideoStreamState

State only version of <xref:%40azure%2Fcommunication-calling%23LocalVideoStream>.

LocalVideoStreamVideoEffectsState

State only version of a LocalVideoStream's <xref:%40azure%2Fcommunication-calling%23VideoEffectsFeature>.

LocalVideoTileOptions

Options for the local video tile in the Call composite.

MediaAccessState

Media access state

MediaDiagnosticsState

State only proxy for <xref:%40azure%2Fcommunication-calling%23MediaDiagnostics>.

MeetingConferencePhoneInfoModalStrings

strings for phone info modal

MessageCommon

Common properties of all message types.

MessageStatusIndicatorProps

Props for MessageStatusIndicator.

MessageStatusIndicatorStrings

Strings of MessageStatusIndicator that can be overridden.

MessageThreadStrings

Strings of MessageThread that can be overridden.

MessageThreadStyles

Fluent styles for MessageThread.

MicrophoneButtonContextualMenuStyles

Styles for the MicrophoneButton menu.

MicrophoneButtonProps

Props for MicrophoneButton.

MicrophoneButtonStrings

Strings of MicrophoneButton that can be overridden.

MicrophoneButtonStyles

Styles for MicrophoneButton

NetworkDiagnosticsState

State only proxy for <xref:%40azure%2Fcommunication-calling%23NetworkDiagnostics>.

NotificationOptions

Options for controlling the notifications in the composite.

NotificationProps

Props for Notification.

NotificationStackProps

Props for NotificationStack.

NotificationStackStrings

All strings that may be shown on the UI in the NotificationStack.

NotificationStrings

All strings that may be shown on the UI in the Notification.

NotificationStyles

Styles for the notification component.

OptimalVideoCountFeatureState

State only version of Optimal Video Count Feature <xref:%40azure%2Fcommunication-calling%23OptimalVideoCountCallFeature>.

OptionsDevice

A device, e.g. camera, microphone, or speaker, in the DevicesButton flyout.

OutboundCallCompositeLoaderProps

Props for the OutboundCallComposite that you can use in your application.

Contains two options bags:

PPTLiveCallFeatureState

State only version of <xref:%40azure%2Fcommunication-calling%23PPTLiveCallFeature>. StatefulCallClient will automatically listen for pptLive on the call and update the state exposed by StatefulCallClient accordingly.

ParticipantAddedSystemMessage

A system message notifying that a participant was added to the chat thread.

ParticipantItemProps

Props for ParticipantItem.

ParticipantItemStrings

Strings of ParticipantItem that can be overridden.

ParticipantItemStyles

Fluent styles for ParticipantItem.

ParticipantListItemStyles

Styles for the ParticipantList ParticipantItem.

ParticipantListStyles

Styles for the ParticipantList.

ParticipantRemovedSystemMessage

A system message notifying that a participant was removed from the chat thread.

ParticipantsButtonContextualMenuStyles

Styles for the ParticipantsButton menu.

ParticipantsButtonProps

Props for ParticipantsButton.

ParticipantsButtonStrings

Strings of ParticipantsButton that can be overridden.

ParticipantsButtonStyles

Styles Props for ParticipantsButton.

RaiseHandButtonProps

Props for RaiseHandButton.

RaiseHandButtonStrings

Strings of RaiseHandButton that can be overridden.

RaiseHandCallFeature

State only version of <xref:%40azure%2Fcommunication-calling%23RaiseHandCallFeature>. StatefulCallClient will automatically listen for raised hands on the call and update the state exposed by StatefulCallClient accordingly.

ReactionButtonProps

Props for ReactionButton.

ReactionButtonStrings

Strings of ReactionButton that can be overridden.

ReactionResources

Interface for animation sprite image and related metadata

RealTimeTextCallFeatureState
RealTimeTextInfo
RealTimeTextModalProps

RealTimeTextModal Component Props.

RealTimeTextModalStrings

strings for realTimeText modal

RealTimeTextProps

Props for a single line of RealTimeText.

RealTimeTextStrings

strings for rtt

RecordingCallFeature

State only version of <xref:%40azure%2Fcommunication-calling%23RecordingCallFeature>. StatefulCallClient will automatically listen for recording state of the call and update the state exposed by StatefulCallClient accordingly.

RemoteParticipantState

State only version of <xref:%40azure%2Fcommunication-calling%23RemoteParticipant>. StatefulCallClient will automatically retrieve RemoteParticipants and add their state to the state exposed by StatefulCallClient.

RemoteVideoStreamState

State only version of <xref:%40azure%2Fcommunication-calling%23RemoteVideoStream>.

RemoteVideoTileMenuOptions

Menu options for remote video tiles in VideoGallery.

ScreenShareButtonProps

Props for ScreenShareButton.

ScreenShareButtonStrings

Strings of ScreenShareButton that can be overridden.

SendBoxProps

Props for SendBox.

SendBoxStrings

Strings of SendBox that can be overridden.

SendBoxStylesProps

Fluent styles for <xref:Sendbox>.

SpokenLanguageStrings

spoken language strings for captions setting modal

SpotlightCallFeatureState

State only version of <xref:%40azure%2Fcommunication-calling%23SpotlightCallFeature>

SpotlightPromptStrings

Strings used in prompt related to spotlight

SpotlightState

Spotlight state with order

StartCaptionsAdapterOptions

Options passed to adapter.startCaptions

StartCaptionsButtonProps
StartCaptionsButtonStrings

Strings for the hold button labels

StartRealTimeTextButtonProps

Props for the StartRealTimeTextButton component

StartRealTimeTextButtonStrings

Strings for the hold button labels

StatefulCallClient

Defines the methods that allow CallClient <xref:%40azure%2Fcommunication-calling%23CallClient> to be used statefully. The interface provides access to proxied state and also allows registering a handler for state change events. For state definition see CallClientState.

State change events are driven by:

  • Returned data from <xref:%40azure%2Fcommunication-calling%23DeviceManager> APIs.
  • Returned data from <xref:%40azure%2Fcommunication-calling%23CallAgent> APIs.
  • Listeners automatically attached to various azure communication-calling objects:
    • CallAgent 'incomingCall'
    • CallAgent 'callsUpdated'
    • DeviceManager 'videoDevicesUpdated'
    • DeviceManager 'audioDevicesUpdated
    • DeviceManager 'selectedMicrophoneChanged'
    • DeviceManager 'selectedSpeakerChanged'
    • Call 'stateChanged'
    • Call 'idChanged'
    • Call 'isMutedChanged'
    • Call 'isScreenSharingOnChanged'
    • Call 'remoteParticipantsUpdated'
    • Call 'localVideoStreamsUpdated'
    • IncomingCall 'callEnded'
    • RemoteParticipant 'stateChanged'
    • RemoteParticipant 'isMutedChanged'
    • RemoteParticipant 'displayNameChanged'
    • RemoteParticipant 'isSpeakingChanged'
    • RemoteParticipant 'videoStreamsUpdated'
    • RemoteVideoStream 'isAvailableChanged'
    • TranscriptionCallFeature 'isTranscriptionActiveChanged'
    • RecordingCallFeature 'isRecordingActiveChanged'
    • LocalRecordingCallFeature 'isLocalRecordingActiveChanged'
    • RaiseHandCallFeature 'raisedHandEvent'
    • RaiseHandCallFeature 'loweredHandEvent'
    • PPTLiveCallFeature 'isAciveChanged'
    • ReactionCallFeature 'reaction'
StatefulChatClient

Defines the methods that allow {@Link @azure/communication-chat#ChatClient} to be used with a centralized generated state.

The interface provides access to proxied state and also allows registering a handler for state change events.

StatefulDeviceManager

Defines the additional methods added by the stateful on top of <xref:%40azure%2Fcommunication-calling%23DeviceManager>.

StopCaptionsAdapterOptions

Options passed to adapter.stopCaptions

StreamMediaProps

Props for StreamMedia.

SurveyIssues

Corresponding texts to each call issue

SurveyIssuesHeadingStrings

Corresponding texts to each call issue category

SystemMessageCommon

Common properties of all system messages.

TeamsCallAdapter

An Adapter interface specific for Teams identity which extends CommonCallAdapter.

TeamsCallingHandlers

Object containing all the teams call handlers required for calling components.

Calling related components from this package are able to pick out relevant handlers from this object. See <xref:useHandlers> and usePropsFor.

TeamsIncomingCallState

State only version of <xref:%40azure%2Fcommunication-calling%23TeamsIncomingCall>

TogetherModeCallFeatureState

State only version of <xref:%40azure%2Fcommunication-calling%23TogetherModeCallFeature>. StatefulCallClient. Represents the state of the Together Mode feature.

TogetherModeSeatingPositionState

State only version of <xref:%40azure%2Fcommunication-calling%23TogetherModeSeatingMap>.

Represents the seating position of a participant in Together Mode.

TogetherModeStreamOptions

Interface representing the result of a Together Mode stream view.

TogetherModeStreamViewResult

Interface representing the result of a Together Mode stream view.

TogetherModeStreamsState

Represents the streams in Together Mode.

TopicUpdatedSystemMessage

A system message notifying that the chat thread topic was updated.

TranscriptionCallFeature

State only version of <xref:%40azure%2Fcommunication-calling%23TranscriptionCallFeature>. StatefulCallClient will automatically listen for transcription state of the call and update the state exposed by StatefulCallClient accordingly.

TransferFeature

Transfer feature state

TypingIndicatorProps

Props for TypingIndicator.

TypingIndicatorStrings

Strings of TypingIndicator that can be overridden.

TypingIndicatorStylesProps

Fluent styles for TypingIndicator.

VerticalGalleryControlBarStyles

Styles for the control bar inside the VerticalGallery component

VerticalGalleryStrings

Strings for localization of the vertical gallery.

VerticalGalleryStyles

Styles for the VerticalGallery component

VideoBackgroundBlurEffect

Contains the attibutes of the blur video background effect

VideoBackgroundImage

Contains the attibutes of a background image like url, name etc.

VideoBackgroundNoEffect

Contains the attibutes to remove video background effect

VideoBackgroundReplacementEffect

Contains the attibutes of a selected replacement video background effect

VideoGalleryLocalParticipant

The state of the local participant in the VideoGallery.

VideoGalleryProps

Props for VideoGallery.

VideoGalleryRemoteParticipant

The state of a remote participant in the VideoGallery.

VideoGalleryStream

Video stream of a participant in VideoGallery.

VideoGalleryStrings

All strings that may be shown on the UI in the VideoGallery.

VideoGalleryStyles

VideoGallery Component Styles.

VideoGalleryTogetherModeSeatingInfo

Interface representing the seating information in Together Mode.

VideoGalleryTogetherModeStreams

Interface representing the streams in Together Mode.

VideoStreamOptions

Options to control how video streams are rendered.

VideoStreamRendererViewState

State only version of <xref:%40azure%2Fcommunication-calling%23VideoStreamRendererView>. This property is added to the state exposed by StatefulCallClient by createView and removed by disposeView.

VideoTileContextualMenuProps

Properties for showing contextual menu for remote VideoTile components in VideoGallery.

VideoTileDrawerMenuProps

Properties for showing drawer menu on remote VideoTile long touch in VideoGallery.

VideoTileProps

Props for VideoTile.

VideoTileStrings

Strings of VideoTile that can be overridden.

VideoTileStylesProps

Fluent styles for VideoTile.

VideoTilesOptions

Options that apply to all Video Tiles in the VideoGallery

Type Aliases

AdapterErrors

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.

AdapterNotifications

Adapters stores the latest notification for each target.

AreEqual

Compare if 2 react components are exact equal, result type will be true/false

AreParamEqual

Compare if props of 2 react components are equal, result type will be true/false

AreTypeEqual

Compare if two types are equal, result type will be true/false

AvatarPersonaData

Custom data attributes for displaying avatar for a user.

AvatarPersonaDataCallback

Callback function used to provide custom data to build an avatar for a user.

AzureCommunicationCallAdapterArgs

Arguments for creating the Azure Communication Services implementation of CallAdapter.

Note: displayName can be a maximum of 256 characters.

AzureCommunicationCallAdapterOptions

Optional parameters to create useAzureCommunicationCallAdapter(Partial<AzureCommunicationCallAdapterArgs | AzureCommunicationOutboundCallAdapterArgs>, (adapter: CallAdapter) => Promise<CallAdapter>, (adapter: CallAdapter) => Promise<void>)

AzureCommunicationCallWithChatAdapterArgs

Arguments for createAzureCommunicationCallWithChatAdapter

AzureCommunicationCallWithChatAdapterFromClientArgs

Arguments for <xref:createAzureCommunicationCallWithChatAdapterFromClient>

AzureCommunicationChatAdapterArgs

Arguments for creating the Azure Communication Services implementation of ChatAdapter.

AzureCommunicationOutboundCallAdapterArgs

Arguments for creating the Azure Communication Services implementation of CallAdapter.

These arguments are used to create an outbound call scenarios.

Note: displayName can be a maximum of 256 characters.

CallAdapterCallEndedEvent

Payload for CallEndedListener containing details on the ended call.

CallAdapterClientState

CommonCallAdapter state inferred from Azure Communication Services backend.

CallAdapterLocator

Locator used by createAzureCommunicationCallAdapter to locate the call to join

CallAdapterState

CommonCallAdapter state.

CallAdapterUiState

CommonCallAdapter state for pure UI purposes.

CallCompositeIcons

Icons that can be overridden for CallComposite.

CallCompositeOptions

Optional features of the CallComposite.

CallCompositePage

Major UI screens shown in the CallComposite.

CallControlDisplayType

Control bar display type for CallComposite.

CallControlOptions

Customization options for the control bar in calling experience.

CallEndedListener

Callback for CallAdapterSubscribers 'callEnded' event.

CallErrorBarSelector

Selector type for ErrorBar component.

CallErrorTarget

String literal type for all permissible keys in {@Link CallErrors}.

CallErrors

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 <xref: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.
CallFeatureStreamName

Represents the name of the call feature stream

CallIdChangedListener

Callback for CallAdapterSubscribers 'callIdChanged' event.

CallNotifications
CallParticipantListParticipant

Calling participant's state, as reflected in the UI components.

CallWithChatCompositeIcons

Icons that can be overridden for CallWithChatComposite.

CallWithChatCompositeOptions

Optional features of the CallWithChatComposite.

CallWithChatEvent

Events fired off by the CallWithChatAdapter.

CallingBaseSelectorProps

Common props used to reference calling declarative client state.

CallingHandlersOptions

Configuration options to include video effect background dependency.

CallingReturnProps

Helper type for usePropsFor.

CallingSounds

Type for representing a set of sounds to use for different calling events

CameraButtonSelector

Selector type for CameraButton component.

CancelEditCallback

Callback function run when a message edit is cancelled.

CapabilitiesChangedListener

Callback for CallAdapterSubscribers 'capabilitiesChanged' event.

CaptionSettingsSelector

Selector type for components for Changing caption language and spoken language

CaptionsBannerSelector

Selector type for the CaptionsBanner component.

CaptionsInformation

information required for each line of caption

CaptionsOptions

options bag to start captions

CaptionsReceivedListener

Callback for CallAdapterSubscribers 'captionsReceived' event.

ChatAdapter

ChatComposite Adapter interface.

ChatAdapterOptions

Options for configuring the ChatAdapter.

ChatAdapterState

ChatAdapter state.

ChatAdapterUiState

ChatAdapter state for pure UI purposes.

ChatAttachmentType

Represents the type of attachment

ChatBaseSelectorProps

Common props for selectors for ChatClientState.

ChatClientProviderProps

Arguments to initialize a ChatClientProvider.

ChatClientState

Centralized state for <xref:%40azure%2Fcommunication-chat%23ChatClient>.

ChatCompositeClientState

ChatAdapter state inferred from Azure Communication Services backend.

ChatCompositeIcons

Icons that can be overridden for ChatComposite.

ChatCompositeOptions

Optional features of the ChatComposite.

ChatErrorBarSelector

Selector type for ErrorBar component.

ChatErrorTarget

String literal type for all permissible keys in ChatErrors.

ChatErrors

Errors teed from API calls to the Chat SDK.

Each property in the object stores the latest error for a particular SDK API method.

ChatHandlers

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 <xref:useHandlers> and usePropsFor.

ChatInitializedListener

Callback for <xref:CallWithChatAdapterSubscribers> 'chatInitialized' event.

ChatMessageWithStatus

An extension to <xref:%40azure%2Fcommunication-chat%23ChatMessage> that stores client-side only metadata for chat messages.

TODO: The name has bitrotted. Rename me.

ChatParticipantListSelector

Selector type for ParticipantList component.

ChatProfile

The profile of a user or bot.

ChatReturnProps

Helper type for usePropsFor.

ChatThreadClientProviderProps

Arguments to initialize a ChatThreadClientProvider.

ChatThreadClientState

Centralized state for <xref:%40azure%2Fcommunication-chat%23ChatThreadClient>.

ChatThreadProperties

Properties of a chat thread.

We define a minimal one that helps us hide the different types used by underlying API.

ClientState

Centralized state for <xref:%40azure%2Fcommunication-calling%23CallClient> or <xref:%40azure%2Fcommunication-chat%23ChatClient>.

See also: CallClientState, ChatClientState.

Common

Return intersect type of 2 types

CommonCallAdapterOptions

Common optional parameters to create useAzureCommunicationCallAdapter(Partial<AzureCommunicationCallAdapterArgs | AzureCommunicationOutboundCallAdapterArgs>, (adapter: CallAdapter) => Promise<CallAdapter>, (adapter: CallAdapter) => Promise<void>) or TeamsCallAdapter

CommonCallControlOptions

Customization options for the control bar in calling experience.

CommonProperties

Return intersect properties of 2 types

CommunicationParticipant

A Chat or Calling participant's state, as reflected in the UI.

ComponentIcons

Icons used by the React components exported from this library.

ComponentProps

Helper type for usePropsFor.

ComponentSlotStyle

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.

CompositeIcons

Icons that can be overridden in one of the composites exported by this library.

See ChatCompositeIcons, CallCompositeIcons and CallWithChatCompositeIcons for more targeted types.

ControlBarButtonStyles

Styles for all ControlBarButton implementations.

ControlBarLayout

Present layouts for the ControlBar.

CreateDefaultCallingHandlers

Type of createDefaultCallingHandlers.

CreateViewResult

Return result from createView.

CustomAvatarOptions

Options that can be injected into the onRender function for customizing an Avatar (Persona) component.

CustomCallControlButtonCallback

A callback that returns the props to render a custom ControlBarButton and <xref:DrawerMenuItem>.

The response indicates where the custom button should be placed.

Performance tip: This callback is only called when either the callback or its arguments change.

CustomCallControlButtonPlacement

Placement for a custom button injected in the <xref:CommonCallControlBar>.

'primary': Place the button(s) on the right end of the center control bar but before the EndCallButton (left end in rtl mode). 'overflow': Place the buttons(s) on the end of the overflow Menu. 'secondary': Place the button(s) on the left end of the side control bar (right in rtl mode).

Multiple buttons assigned the same placement are appended in order. E.g., if two buttons are placed in 'secondary', they'll both appear on the left end (right end in rtl mode) in the order provided.

Only 'primary' placement works when legacy call control is enabled in call composite

DeclarativeCallAgent

DeclarativeCallAgent extends and proxies the <xref:%40azure%2Fcommunication-calling%23CallAgent>

DeclarativeTeamsCallAgent

DeclarativeTeamsCallAgent extends and proxies the <xref:%40azure%2Fcommunication-calling%23TeamsCallAgent>

DeepNoiseSuppressionEffectDependency

Dependency type to be injected for deep noise suppression

DeviceManagerState

This type is meant to encapsulate all the state inside <xref:%40azure%2Fcommunication-calling%23DeviceManager>. For optional parameters they may not be available until permission is granted by the user. The cameras, microphones, speakers, and deviceAccess states will be empty until the corresponding <xref:%40azure%2Fcommunication-calling%23DeviceManager>'s getCameras, getMicrophones, getSpeakers, and askDevicePermission APIs are called and completed.

DevicesButtonSelector

Selector type for DevicesButton component.

DiagnosticChangedEventListner

Callback for CallAdapterSubscribers 'diagnosticChanged' event.

DialpadMode

Modes of the dialpad component.

DisplayNameChangedListener

Callback for CallAdapterSubscribers 'displayNameChanged' event.

DtmfTone

DTMF tone for PSTN calls.

EmptySelector

A type for trivial selectors that return no data.

Used as a default return value if usePropsFor is called for a component that requires no data.

ErrorType

All errors that can be shown in the ErrorBar.

GetCallingSelector

Specific type of the selector applicable to a given Component.

GetChatSelector

Specific type of the selector applicable to a given Component.

HoldButtonSelector

Selector type for the HoldButton component.

IncomingCallManagement

This contains a readonly array that returns all the active incomingCalls. An active incoming call is a call that has not been answered, declined or disconnected.

IncomingCallStackSelector

Selector to get the active and removed incoming calls.

IsCaptionLanguageChangedListener

Callback for CallAdapterSubscribers 'isCaptionLanguageChanged' event.

IsCaptionsActiveChangedListener

Callback for CallAdapterSubscribers 'isCaptionsActiveChanged' event.

IsLocalScreenSharingActiveChangedListener

Callback for CallAdapterSubscribers 'isLocalScreenSharingActiveChanged' event.

IsMutedChangedListener

Callback for CallAdapterSubscribers 'isMuted' event.

IsSpeakingChangedListener

Callback for CallAdapterSubscribers 'isSpeakingChanged' event.

IsSpokenLanguageChangedListener

Callback for CallAdapterSubscribers 'isSpokenLanguageChanged' event.

LoadingState

Whether the stream is loading or not.

LocalScreenShareView
LocalVideoTileSize

different modes of the local video tile

LocalizationProviderProps

Props for LocalizationProvider.

LongPressTrigger

Modes of how the longpress handlers can be tiggered.

MediaAccess

Audio/Video Media access state

MediaDiagnosticChangedEvent

Payload for DiagnosticChangedEventListner where there is a change in a media diagnostic.

Message

Discriminated union of all messages.

The messageType field specializes into union variants.

MessageAttachedStatus

Indicate whether a chat message should be displayed merged with the message before / after it. If true, the message will be appear grouped with the message before it. 'top' and 'bottom' are used to indicate that the message is the start or end of a group.

MessageContentType

Supported types of chat message content.

MessageDeletedListener

Callback for ChatAdapterSubscribers 'messageDeleted' event.

MessageEditedListener

Callback for ChatAdapterSubscribers 'messageEdited' event.

MessageProps

Props to render a single message.

See MessageRenderer.

MessageReadListener

Callback for ChatAdapterSubscribers 'messageRead' event.

MessageReceivedListener

Callback for ChatAdapterSubscribers 'messageReceived' event.

MessageRenderer

A component to render a single message.

MessageSentListener

Callback for ChatAdapterSubscribers 'messageSent' event.

MessageStatus

Client-side state of a sent message.

Includes transitional states that occur before message delivery is confirmed from the backend.

MessageThreadProps

Props for MessageThread.

MessageThreadSelector

Selector type for MessageThread component.

MicrophoneButtonSelector

Selector type for MicrophoneButton component.

NetworkDiagnosticChangedEvent

Payload for DiagnosticChangedEventListner where there is a change in a network diagnostic.

NotificationStackSelector

Selector type for Notification component.

NotificationTarget
NotificationType

All notifications that can be shown in the NotificationStack.

OnFetchChatProfileCallback

Callback function used to provide custom data to build profile for a user or bot.

OnFetchProfileCallback

Callback function used to provide custom data to build profile for a user or bot.

OnRenderAvatarCallback

A custom rendered callback that allows users to customize the rendering of a Persona Component.

OverflowGalleryPosition

Different modes and positions of the overflow gallery in the VideoGallery

ParticipantListParticipant

Participants displayed in a ParticipantList.

ParticipantListProps

Props for ParticipantList.

ParticipantListSelector

Selector type for ParticipantList component.

ParticipantMenuItemsCallback

A callback for providing custom menu items for each participant in ParticipantList.

ParticipantState

The connection state of a call participant.

ParticipantsAddedListener

Callback for ChatAdapterSubscribers 'participantsAdded' event.

ParticipantsButtonSelector

Selector type for ParticipantsButton component.

ParticipantsJoinedListener

Callback for CallAdapterSubscribers 'participantsJoined' event.

ParticipantsLeftListener

Callback for CallAdapterSubscribers 'participantsLeft' event.

ParticipantsRemovedListener

Callback for ChatAdapterSubscribers 'participantsRemoved' event.

Profile

The profile of a user or bot.

RaiseHandButtonSelector

Selector type for RaiseHandButton component.

RaisedHand

Raised hand state with order

RaisedHandState

Raised hand state with order

Reaction

Reaction state with reaction type to render

ReactionButtonReaction

Reactions types for the Reaction button

ReactionSprite

Type for animation sprite image and related metadata

ReactionState

State only version of <xref:%40azure%2Fcommunication-calling%23Call.ReactionMessage> with UI helper props receivedOn. Reaction state with a timestamp which helps UI to decide to render the reaction accordingly.

ReadReceiptsBySenderId

An array of key value pairs that stores each sender's display name and last read message

RealTimeTextInformation

information required for each line of real time text

RealTimeTextReceivedListener

Callback for CallAdapterSubscribers 'realTimeTextReceived' event.

ResourceDetails

Details required for download a resource to cache.

ResourceFetchResult

Result of the Resource downloaded from stateful client

ScreenShareButtonSelector

Selector type for ScreenShareButton component.

Selector

An optimized selector that refines ClientState updates into props for React Components in this library.

SendBoxSelector

Selector type for SendBox component.

SoundEffect

Type for representing a custom sound to use for a calling event

Spotlight

Spotlight state with order

SpotlightChangedListener

Callback for CallAdapterSubscribers 'spotlightChanged' event.

StartCallIdentifier

Identifier types for initiating a call using the CallAdapter

StartCaptionsButtonSelector

Selector type for the StartCaptionsButton component.

StatefulCallClientArgs

Arguments to construct the StatefulCallClient.

StatefulCallClientOptions

Options to construct the StatefulCallClient with.

StatefulChatClientArgs

Arguments to construct the StatefulChatClient.

StatefulChatClientOptions

Options to construct the StatefulChatClient.

SupportedCaptionLanguage
SupportedSpokenLanguage
SystemMessage

Discriminated union of all system messages.

The systemMessageType field specializes into union variants.

TeamsAdapterOptions

Optional parameters to create TeamsCallAdapter

TeamsCallAdapterArgs

Arguments for creating the Azure Communication Services implementation of TeamsCallAdapter.

TeamsCallAdapterArgsCommon

Common part of args to create the Azure Communication Services implementation of TeamsCallAdapter.

TeamsIncomingCallManagement

Proxies the <xref:%40azure%2Fcommunication-calling%23TeamsIncomingCall> interface.

TogetherModeParticipantSeatingState

Represents the seating positions of participants in Together Mode.

TopicChangedListener

Callback for ChatAdapterSubscribers 'topicChanged' event.

TransferAcceptedListener

Callback for CallAdapterSubscribers 'transferRequested' event.

TypingIndicatorSelector

Selector type for TypingIndicator component.

UpdateMessageCallback

Callback function run when a message is updated.

VideoBackgroundEffect

Contains the attibutes of a selected video background effect

VideoBackgroundEffectsDependency

Dependency type to be injected for video background effects

VideoGalleryLayout
VideoGalleryParticipant

The state of a participant in the VideoGallery.

VideoGallerySelector

Selector type for VideoGallery component.

VideoGalleryTogetherModeParticipantPosition

Interface representing the position of a participant in Together Mode.

ViewScalingMode

Scaling mode of a VideoGalleryStream.

Functions

CallAgentProvider(CallAgentProviderProps)

A <xref:React.Context> that stores a <xref:%40azure%2Fcommunication-calling%23CallAgent>.

Calling components from this package must be wrapped with a CallAgentProvider.

CallClientProvider(CallClientProviderProps)

A <xref:React.Context> that stores a StatefulCallClient.

Calling components from this package must be wrapped with a CallClientProvider.

CallComposite(CallCompositeProps)

A customizable UI composite for calling experience.

CallProvider(CallProviderProps)

A <xref:React.Context> that stores a <xref:%40azure%2Fcommunication-calling%23Call>.

Calling components from this package must be wrapped with a CallProvider.

CallWithChatComposite(CallWithChatCompositeProps)

CallWithChatComposite brings together key components to provide a full call with chat experience out of the box.

CameraButton(CameraButtonProps)

A button to turn camera on / off.

Can be used with ControlBar.

CaptionsBanner(CaptionsBannerProps)

A component for displaying a CaptionsBanner with user icon, displayName and captions text.

CaptionsSettingsModal(CaptionsSettingsModalProps)

a component for setting spoken languages

ChatClientProvider(ChatClientProviderProps)

A <xref:React.Context> that stores a StatefulChatClient.

Chat components from this package must be wrapped with a ChatClientProvider.

ChatComposite(ChatCompositeProps)

A customizable UI composite for the chat experience.

ChatThreadClientProvider(ChatThreadClientProviderProps)

A <xref:React.Context> that stores a <xref:%40azure%2Fcommunication-chat%23ChatThreadClient>.

Chat components from this package must be wrapped with a ChatThreadClientProvider.

ControlBar(ControlBarProps)

A container for various buttons for call controls.

Use with various call control buttons in this library, e.g., CameraButton, or your own instances of ControlBarButton directly.

ControlBarButton(ControlBarButtonProps)

Default button styled for the ControlBar.

Use this component create custom buttons that are styled the same as other buttons provided by the UI Library.

DevicesButton(DevicesButtonProps)

A button to open a menu that controls device options.

Can be used with ControlBar.

Dialpad(DialpadProps)

A component to allow users to enter phone number through clicking on dialpad/using keyboard It will return empty component for stable builds

EndCallButton(EndCallButtonProps)

A button to end an ongoing call.

Can be used with ControlBar.

ErrorBar(ErrorBarProps)

A component to show error messages on the UI. All strings that can be shown are accepted as the strings so that they can be localized. Active errors are selected by activeErrorMessages.

This component internally tracks dismissed by the user.

  • Errors that have an associated timestamp: The error is shown on the UI again if it occurs after being dismissed.
  • Errors that do not have a timestamp: The error is dismissed until it disappears from the props. If the error recurs, it is shown in the UI.

Uses <xref:%40fluentui%2Freact%23MessageBar> UI element.

FluentThemeProvider(FluentThemeProviderProps)

Provider to apply a Fluent theme across this library's react components.

GridLayout(GridLayoutProps)

A component to lay out audio / video participants tiles in a call.

HoldButton(HoldButtonProps)

a button to hold or resume a ongoing call.

Can be used with ControlBar

ImageOverlay(ImageOverlayProps)

Component to render a fullscreen modal for a selected image.

IncomingCallNotification(IncomingCallNotificationProps)

A Notification component that is to be used to represent incoming calls to the end user. Allows the user to accept or reject the incoming call.

IncomingCallStack(IncomingCallStackProps)

Wrapper to manage multiple incoming calls

LocalizationProvider(LocalizationProviderProps)

Provider to provide localized strings for this library's react components.

MessageStatusIndicator(MessageStatusIndicatorProps)

Component to display the status of a sent message.

Adds an icon and tooltip corresponding to the message status.

MessageThread(MessageThreadProps)

MessageThread allows you to easily create a component for rendering chat messages, handling scrolling behavior of new/old messages and customizing icons & controls inside the chat thread.

MicrophoneButton(MicrophoneButtonProps)

A button to turn microphone on / off.

Can be used with ControlBar.

Notification(NotificationProps)

A component to show notification messages on the UI.

NotificationStack(NotificationStackProps)

A component to show notifications on the UI. All strings that can be shown are accepted as the strings so that they can be localized. Active notifications are selected by activeNotifications.

This component internally tracks dismissed by the user.

  • Notifications that have an associated timestamp: The notification is shown on the UI again if it occurs after being dismissed.
  • Notifications that do not have a timestamp: The notification is dismissed until it disappears from the props. If the notification recurs, it is shown in the UI.
ParticipantItem(ParticipantItemProps)

Component to render a calling or chat participant.

Displays the participant's avatar, displayName and status as well as optional icons and context menu.

ParticipantList(ParticipantListProps)

Component to render all calling or chat participants.

By default, each participant is rendered with ParticipantItem. See <xref:ParticipantListProps.onRenderParticipant> to override.

ParticipantsButton(ParticipantsButtonProps)

A button to show a menu with calling or chat participants.

Can be used with ControlBar.

This button contains dropdown menu items defined through its property menuProps. By default, it can display the number of remote participants with the full list as sub-menu and an option to mute all participants, as well as a copy-to-clipboard button to copy the call invitation URL. This menuProps can be fully redefined and its property is of type IContextualMenuProps.

RaiseHandButton(RaiseHandButtonProps)

A button to start / stop screen sharing.

Can be used with ControlBar.

ReactionButton(ReactionButtonProps)

A button to send reactions.

Can be used with ControlBar.

RealTimeText(RealTimeTextProps)

A component for displaying a single line of RealTimeText

RealTimeTextModal(RealTimeTextModalProps)

a component for realTimeText modal

ScreenShareButton(ScreenShareButtonProps)

A button to start / stop screen sharing.

Can be used with ControlBar.

SendBox(SendBoxProps)

Component for typing and sending messages.

Supports sending typing notification when user starts entering text. Supports an optional message below the text input field.

StartCaptionsButton(StartCaptionsButtonProps)

a button to start or stop captions

Can be used with ControlBar

StartRealTimeTextButton(StartRealTimeTextButtonProps)

a button to start RealTimeText based on accessibility requirement, real time text cannot be turned off once it is on

Can be used with ControlBar

StreamMedia(StreamMediaProps)

Utility component to convert an HTMLElement with a video stream into a JSX element.

Use to convert an HTMLElement returned by headless calling API into a component that can be rendered as a VideoTile.

TypingIndicator(TypingIndicatorProps)

Component to notify local user when one or more participants in the chat thread are typing.

VideoGallery(VideoGalleryProps)

VideoGallery represents a layout of video tiles for a specific call. It displays a VideoTile for the local user as well as for each remote participant who has joined the call.

VideoTile(VideoTileProps)

A component to render the video stream for a single call participant.

Use with GridLayout in a VideoGallery.

createAzureCommunicationCallAdapter(AzureCommunicationCallAdapterArgs)

Create a CallAdapter backed by Azure Communication Services.

This is the default implementation of CallAdapter provided by this library.

Note: displayName can be a maximum of 256 characters.

createAzureCommunicationCallAdapter(AzureCommunicationOutboundCallAdapterArgs)

Create a CallAdapter backed by Azure Communication Services.

This is the default implementation of CallAdapter provided by this library.

Note: displayName can be a maximum of 256 characters.

createAzureCommunicationCallAdapterFromClient(StatefulCallClient, CallAgent, CommunicationIdentifier[], CommonCallAdapterOptions)

Create a CallAdapter using the provided StatefulCallClient.

Useful if you want to keep a reference to StatefulCallClient. Consider using createAzureCommunicationCallAdapter for a simpler API.

createAzureCommunicationCallAdapterFromClient(StatefulCallClient, CallAgent, CallAdapterLocator, CommonCallAdapterOptions)

Create a CallAdapter using the provided StatefulCallClient.

Useful if you want to keep a reference to StatefulCallClient. Consider using createAzureCommunicationCallAdapter for a simpler API.

createAzureCommunicationCallWithChatAdapter(AzureCommunicationCallWithChatAdapterArgs)

Create a CallWithChatAdapter backed by Azure Communication services to plug into the CallWithChatComposite.

createAzureCommunicationCallWithChatAdapterFromClients(AzureCommunicationCallWithChatAdapterFromClientArgs)

Create a CallWithChatAdapter using the provided StatefulChatClient and StatefulCallClient.

Useful if you want to keep a reference to StatefulChatClient and StatefulCallClient. Please note that chatThreadClient has to be created by StatefulChatClient via chatClient.getChatThreadClient(chatThreadId) API. Consider using createAzureCommunicationCallWithChatAdapter for a simpler API.

createAzureCommunicationChatAdapter(AzureCommunicationChatAdapterArgs)

Create a ChatAdapter backed by Azure Communication Services.

This is the default implementation of ChatAdapter provided by this library.

createAzureCommunicationChatAdapterFromClient(StatefulChatClient, ChatThreadClient, ChatAdapterOptions)

Create a ChatAdapter using the provided StatefulChatClient.

Useful if you want to keep a reference to StatefulChatClient. Consider using createAzureCommunicationChatAdapter for a simpler API.

createDefaultCallingHandlers(StatefulCallClient, undefined | CallAgent, undefined | StatefulDeviceManager, undefined | Call, CallingHandlersOptions)

Create the default implementation of CallingHandlers for teams call.

Useful when implementing a custom component that utilizes the providers exported from this library.

createDefaultChatHandlers(StatefulChatClient, ChatThreadClient)

Create the default implementation of ChatHandlers.

Useful when implementing a custom component that utilizes the providers exported from this library.

Returned object is memoized to avoid rerenders when used as props for React Components.

createDefaultTeamsCallingHandlers(StatefulCallClient, TeamsCallAgent, StatefulDeviceManager, TeamsCall, { onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>, onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency> })

Create the default implementation of TeamsCallingHandlers for teams call.

Useful when implementing a custom component that utilizes the providers exported from this library.

createStatefulCallClient(StatefulCallClientArgs, StatefulCallClientOptions)

Creates a StatefulCallClient StatefulCallClient by proxying CallClient <xref:%40azure%2Fcommunication-calling%23CallClient> with ProxyCallClient <xref:ProxyCallClient> which then allows access to state in a declarative way.

It is important to use the <xref:%40azure%2Fcommunication-calling%23DeviceManager> and <xref:%40azure%2Fcommunication-calling%23CallAgent> and <xref:%40azure%2Fcommunication-calling%23Call> (and etc.) that are obtained from the StatefulCallClient in order for their state changes to be proxied properly.

createStatefulChatClient(StatefulChatClientArgs, StatefulChatClientOptions)

Creates a stateful ChatClient StatefulChatClient by proxying ChatClient <xref:%40azure%2Fcommunication-chat%23ChatClient> with ProxyChatClient <xref:ProxyChatClient> which then allows access to state in a declarative way.

createTeamsCallAdapter(TeamsCallAdapterArgs)
createTeamsCallAdapterFromClient(StatefulCallClient, TeamsCallAgent, CallAdapterLocator, CommonCallAdapterOptions)

Create a TeamsCallAdapter using the provided StatefulCallClient.

Useful if you want to keep a reference to StatefulCallClient. Consider using createAzureCommunicationCallAdapter for a simpler API.

fromFlatCommunicationIdentifier(string)

Reverse operation of toFlatCommunicationIdentifier.

getCallingSelector<Component>(Component)

Get the selector for a specified component.

Useful when implementing a custom component that utilizes the providers exported from this library.

getChatSelector<Component>(Component)

Get the selector for a specified component.

Useful when implementing a custom component that utilizes the providers exported from this library.

loadCallComposite(CallCompositeLoaderProps, HTMLElement)

Loader function for the CallComposite that you can use in your application. This function will load the CallComposite into the provided HTML element. The best use case for this is in a Node ui framework that is not React based.

loadCallWithChatComposite(CallWithChatCompositeLoaderProps, HTMLElement)

Props for the CallWithChatComposite that you can use in your application. This function will load the CallWithChatComposite into the provided HTML element. The best use case for this is in a Node UI framework that is not React based.

loadChatComposite(ChatCompositeLoaderProps, HTMLElement)

Loader function for the ChatComposite that you can use in your application. This function will load the ChatComposite into the provided HTML element. The best use case for this is in a Node UI framework that is not React based.

loadOutboundCallComposite(OutboundCallCompositeLoaderProps, HTMLElement)

Loader function for the OutboundCallComposite that you can use in your application. This function will load the CallComposite into the provided HTML element to make outbound calls. The best use case for this is in a Node UI framework that is not React based.

onResolveDeepNoiseSuppressionDependency()

Dependency resolution for video background effects using lazy loading.

onResolveDeepNoiseSuppressionDependencyLazy()

Dependency resolution for video background effects using lazy loading.

onResolveVideoEffectDependency()

Dependency resolution for video background effects.

onResolveVideoEffectDependencyLazy()

Dependency resolution for video background effects using lazy loading.

toFlatCommunicationIdentifier(CommunicationIdentifier)

A string representation of a <xref:%40azure%2Fcommunication-common%23CommunicationIdentifier>.

This string representation of CommunicationIdentifier is guaranteed to be stable for a unique Communication user. Thus,

  • it can be used to persist a user's identity in external databases.
  • it can be used as keys into a Map to store data for the user.
useAzureCommunicationCallAdapter(Partial<AzureCommunicationCallAdapterArgs | AzureCommunicationOutboundCallAdapterArgs>, (adapter: CallAdapter) => Promise<CallAdapter>, (adapter: CallAdapter) => Promise<void>)

A custom React hook to simplify the creation of CallAdapter.

Similar to createAzureCommunicationCallAdapter, but takes care of asynchronous creation of the adapter internally.

Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments as they are created. The adapter is only created when all arguments are defined.

Note that you must memoize the arguments to avoid recreating adapter on each render. See storybook for typical usage examples.

useAzureCommunicationCallWithChatAdapter(Partial<AzureCommunicationCallWithChatAdapterArgs>, (adapter: CallWithChatAdapter) => Promise<CallWithChatAdapter>, (adapter: CallWithChatAdapter) => Promise<void>)

A custom React hook to simplify the creation of CallWithChatAdapter.

Similar to createAzureCommunicationCallWithChatAdapter, but takes care of asynchronous creation of the adapter internally.

Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments as they are created. The adapter is only created when all arguments are defined.

Note that you must memoize the arguments to avoid recreating adapter on each render. See storybook for typical usage examples.

useAzureCommunicationChatAdapter(Partial<AzureCommunicationChatAdapterArgs>, (adapter: ChatAdapter) => Promise<ChatAdapter>, (adapter: ChatAdapter) => Promise<void>)

A custom React hook to simplify the creation of ChatAdapter.

Similar to createAzureCommunicationChatAdapter, but takes care of asynchronous creation of the adapter internally.

Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments as they are created. The adapter is only created when all arguments are defined.

Note that you must memoize the arguments to avoid recreating adapter on each render. See storybook for typical usage examples.

useCall()

Hook to obtain <xref:%40azure%2Fcommunication-calling%23Call> from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

you must have previously used the CallProvider with a Call object to use this hook

useCallAgent()

Hook to obtain <xref:%40azure%2Fcommunication-calling%23CallAgent> from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

useCallClient()

Hook to obtain StatefulCallClient from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

useChatClient()

Hook to obtain StatefulChatClient from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

useChatThreadClient()

Hook to obtain <xref:%40azure%2Fcommunication-chat%23ChatThreadClient> from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

useDeviceManager()

Hook to obtain StatefulDeviceManager from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

usePropsFor<Component>(Component, "chat" | "calling")

Primary hook to get all hooks necessary for a React Component from this library.

To call this hook, the component requires to be wrapped under these providers:

  1. For chat components: ChatClientProvider and ChatThreadClientProvider.

  2. For calling components: CallClientProvider, CallAgentProvider and CallAgentProvider.

Most straightforward usage of a components looks like:

Example

    import { ParticipantList, usePropsFor } from '@azure/communication-react';

    const App = (): JSX.Element => {
        // ... code to setup Providers ...

        return <ParticipantList {...usePropsFor(ParticipantList)}/>
    }
useSelector<ParamT>(ParamT, (ParamT extends Selector ? Parameters<ParamT>[1] : undefined), "chat" | "calling")

Hook to obtain a selector for a specified component.

Useful when implementing a custom component that utilizes the providers exported from this library.

useTeamsCall()

Hook to obtain <xref:%40azure%2Fcommunication-calling%23TeamsCall> from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

you must have previously used the CallProvider with a TeamsCall object to use this hook

useTeamsCallAdapter(Partial<TeamsCallAdapterArgs>, (adapter: TeamsCallAdapter) => Promise<TeamsCallAdapter>, (adapter: TeamsCallAdapter) => Promise<void>)

A custom React hook to simplify the creation of TeamsCallAdapter.

Similar to <xref:createTeamsAzureCommunicationCallAdapter>, but takes care of asynchronous creation of the adapter internally.

Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments as they are created. The adapter is only created when all arguments are defined.

Note that you must memoize the arguments to avoid recreating adapter on each render. See storybook for typical usage examples.

useTeamsCallAgent()

Hook to obtain <xref:%40azure%2Fcommunication-calling%23TeamsCallAgent> from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

useTheme()

React hook to access theme

Function Details

CallAgentProvider(CallAgentProviderProps)

A <xref:React.Context> that stores a <xref:%40azure%2Fcommunication-calling%23CallAgent>.

Calling components from this package must be wrapped with a CallAgentProvider.

function CallAgentProvider(props: CallAgentProviderProps): Element

Parameters

Returns

Element

CallClientProvider(CallClientProviderProps)

A <xref:React.Context> that stores a StatefulCallClient.

Calling components from this package must be wrapped with a CallClientProvider.

function CallClientProvider(props: CallClientProviderProps): Element

Parameters

Returns

Element

CallComposite(CallCompositeProps)

A customizable UI composite for calling experience.

function CallComposite(props: CallCompositeProps): Element

Parameters

Returns

Element

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)

CallProvider(CallProviderProps)

A <xref:React.Context> that stores a <xref:%40azure%2Fcommunication-calling%23Call>.

Calling components from this package must be wrapped with a CallProvider.

function CallProvider(props: CallProviderProps): Element

Parameters

Returns

Element

CallWithChatComposite(CallWithChatCompositeProps)

CallWithChatComposite brings together key components to provide a full call with chat experience out of the box.

function CallWithChatComposite(props: CallWithChatCompositeProps): Element

Parameters

Returns

Element

CameraButton(CameraButtonProps)

A button to turn camera on / off.

Can be used with ControlBar.

function CameraButton(props: CameraButtonProps): Element

Parameters

Returns

Element

CaptionsBanner(CaptionsBannerProps)

A component for displaying a CaptionsBanner with user icon, displayName and captions text.

function CaptionsBanner(props: CaptionsBannerProps): Element

Parameters

Returns

Element

CaptionsSettingsModal(CaptionsSettingsModalProps)

a component for setting spoken languages

function CaptionsSettingsModal(props: CaptionsSettingsModalProps): Element

Parameters

Returns

Element

ChatClientProvider(ChatClientProviderProps)

A <xref:React.Context> that stores a StatefulChatClient.

Chat components from this package must be wrapped with a ChatClientProvider.

function ChatClientProvider(props: ChatClientProviderProps): Element

Parameters

Returns

Element

ChatComposite(ChatCompositeProps)

A customizable UI composite for the chat experience.

function ChatComposite(props: ChatCompositeProps): Element

Parameters

Returns

Element

Remarks

Chat composite min width and height are respectively 17.5rem and 20rem (280px and 320px, with default rem at 16px)

ChatThreadClientProvider(ChatThreadClientProviderProps)

A <xref:React.Context> that stores a <xref:%40azure%2Fcommunication-chat%23ChatThreadClient>.

Chat components from this package must be wrapped with a ChatThreadClientProvider.

function ChatThreadClientProvider(props: ChatThreadClientProviderProps): Element

Parameters

Returns

Element

ControlBar(ControlBarProps)

A container for various buttons for call controls.

Use with various call control buttons in this library, e.g., CameraButton, or your own instances of ControlBarButton directly.

function ControlBar(props: ControlBarProps): Element

Parameters

Returns

Element

ControlBarButton(ControlBarButtonProps)

Default button styled for the ControlBar.

Use this component create custom buttons that are styled the same as other buttons provided by the UI Library.

function ControlBarButton(props: ControlBarButtonProps): Element

Parameters

Returns

Element

DevicesButton(DevicesButtonProps)

A button to open a menu that controls device options.

Can be used with ControlBar.

function DevicesButton(props: DevicesButtonProps): Element

Parameters

Returns

Element

Dialpad(DialpadProps)

A component to allow users to enter phone number through clicking on dialpad/using keyboard It will return empty component for stable builds

function Dialpad(props: DialpadProps): Element

Parameters

props
DialpadProps

Returns

Element

EndCallButton(EndCallButtonProps)

A button to end an ongoing call.

Can be used with ControlBar.

function EndCallButton(props: EndCallButtonProps): Element

Parameters

Returns

Element

ErrorBar(ErrorBarProps)

A component to show error messages on the UI. All strings that can be shown are accepted as the strings so that they can be localized. Active errors are selected by activeErrorMessages.

This component internally tracks dismissed by the user.

  • Errors that have an associated timestamp: The error is shown on the UI again if it occurs after being dismissed.
  • Errors that do not have a timestamp: The error is dismissed until it disappears from the props. If the error recurs, it is shown in the UI.

Uses <xref:%40fluentui%2Freact%23MessageBar> UI element.

function ErrorBar(props: ErrorBarProps): Element

Parameters

Returns

Element

FluentThemeProvider(FluentThemeProviderProps)

Provider to apply a Fluent theme across this library's react components.

function FluentThemeProvider(props: FluentThemeProviderProps): Element

Parameters

Returns

Element

Remarks

Components in this library are composed primarily from Fluent UI, controls, mixing v8 and v9 controls. This provider handles applying any theme provided to the underlying Fluent UI controls. *

GridLayout(GridLayoutProps)

A component to lay out audio / video participants tiles in a call.

function GridLayout(props: GridLayoutProps): Element

Parameters

Returns

Element

HoldButton(HoldButtonProps)

a button to hold or resume a ongoing call.

Can be used with ControlBar

function HoldButton(props: HoldButtonProps): Element

Parameters

props
HoldButtonProps

properties for the hold button.

Returns

Element

ImageOverlay(ImageOverlayProps)

Component to render a fullscreen modal for a selected image.

function ImageOverlay(props: ImageOverlayProps): Element

Parameters

Returns

Element

IncomingCallNotification(IncomingCallNotificationProps)

A Notification component that is to be used to represent incoming calls to the end user. Allows the user to accept or reject the incoming call.

function IncomingCallNotification(props: IncomingCallNotificationProps): Element

Parameters

Returns

Element

IncomingCallStack(IncomingCallStackProps)

Wrapper to manage multiple incoming calls

function IncomingCallStack(props: IncomingCallStackProps): Element

Parameters

props
IncomingCallStackProps

<xref:IncomingCallManagerProps>

Returns

Element

LocalizationProvider(LocalizationProviderProps)

Provider to provide localized strings for this library's react components.

function LocalizationProvider(props: LocalizationProviderProps): Element

Parameters

Returns

Element

Remarks

Components will be provided localized strings in English (US) by default if this provider is not used.

MessageStatusIndicator(MessageStatusIndicatorProps)

Component to display the status of a sent message.

Adds an icon and tooltip corresponding to the message status.

function MessageStatusIndicator(props: MessageStatusIndicatorProps): Element

Parameters

Returns

Element

MessageThread(MessageThreadProps)

MessageThread allows you to easily create a component for rendering chat messages, handling scrolling behavior of new/old messages and customizing icons & controls inside the chat thread.

function MessageThread(props: MessageThreadProps): Element

Parameters

props
MessageThreadProps

of type MessageThreadProps

Users will need to provide at least chat messages and userId to render the MessageThread component. Users can also customize MessageThread by passing in their own Avatar, MessageStatusIndicator icon, JumpToNewMessageButton, LoadPreviousMessagesButton and the behavior of these controls.

MessageThread internally uses the Chat component from @fluentui-contrib/chat. You can checkout the details about these components here.

Returns

Element

MicrophoneButton(MicrophoneButtonProps)

A button to turn microphone on / off.

Can be used with ControlBar.

function MicrophoneButton(props: MicrophoneButtonProps): Element

Parameters

Returns

Element

Notification(NotificationProps)

A component to show notification messages on the UI.

function Notification(props: NotificationProps): Element

Parameters

Returns

Element

NotificationStack(NotificationStackProps)

A component to show notifications on the UI. All strings that can be shown are accepted as the strings so that they can be localized. Active notifications are selected by activeNotifications.

This component internally tracks dismissed by the user.

  • Notifications that have an associated timestamp: The notification is shown on the UI again if it occurs after being dismissed.
  • Notifications that do not have a timestamp: The notification is dismissed until it disappears from the props. If the notification recurs, it is shown in the UI.
function NotificationStack(props: NotificationStackProps): Element

Parameters

Returns

Element

ParticipantItem(ParticipantItemProps)

Component to render a calling or chat participant.

Displays the participant's avatar, displayName and status as well as optional icons and context menu.

function ParticipantItem(props: ParticipantItemProps): Element

Parameters

Returns

Element

ParticipantList(ParticipantListProps)

Component to render all calling or chat participants.

By default, each participant is rendered with ParticipantItem. See <xref:ParticipantListProps.onRenderParticipant> to override.

function ParticipantList(props: ParticipantListProps): Element

Parameters

Returns

Element

ParticipantsButton(ParticipantsButtonProps)

A button to show a menu with calling or chat participants.

Can be used with ControlBar.

This button contains dropdown menu items defined through its property menuProps. By default, it can display the number of remote participants with the full list as sub-menu and an option to mute all participants, as well as a copy-to-clipboard button to copy the call invitation URL. This menuProps can be fully redefined and its property is of type IContextualMenuProps.

function ParticipantsButton(props: ParticipantsButtonProps): Element

Parameters

Returns

Element

RaiseHandButton(RaiseHandButtonProps)

A button to start / stop screen sharing.

Can be used with ControlBar.

function RaiseHandButton(props: RaiseHandButtonProps): Element

Parameters

Returns

Element

ReactionButton(ReactionButtonProps)

A button to send reactions.

Can be used with ControlBar.

function ReactionButton(props: ReactionButtonProps): Element

Parameters

Returns

Element

RealTimeText(RealTimeTextProps)

A component for displaying a single line of RealTimeText

function RealTimeText(props: RealTimeTextProps): Element

Parameters

Returns

Element

RealTimeTextModal(RealTimeTextModalProps)

a component for realTimeText modal

function RealTimeTextModal(props: RealTimeTextModalProps): Element

Parameters

Returns

Element

ScreenShareButton(ScreenShareButtonProps)

A button to start / stop screen sharing.

Can be used with ControlBar.

function ScreenShareButton(props: ScreenShareButtonProps): Element

Parameters

Returns

Element

SendBox(SendBoxProps)

Component for typing and sending messages.

Supports sending typing notification when user starts entering text. Supports an optional message below the text input field.

function SendBox(props: SendBoxProps): Element

Parameters

props
SendBoxProps

Returns

Element

StartCaptionsButton(StartCaptionsButtonProps)

a button to start or stop captions

Can be used with ControlBar

function StartCaptionsButton(props: StartCaptionsButtonProps): Element

Parameters

props
StartCaptionsButtonProps

properties for the start captions button.

Returns

Element

StartRealTimeTextButton(StartRealTimeTextButtonProps)

a button to start RealTimeText based on accessibility requirement, real time text cannot be turned off once it is on

Can be used with ControlBar

function StartRealTimeTextButton(props: StartRealTimeTextButtonProps): Element

Parameters

props
StartRealTimeTextButtonProps

properties for the start RealTimeText button.

Returns

Element

StreamMedia(StreamMediaProps)

Utility component to convert an HTMLElement with a video stream into a JSX element.

Use to convert an HTMLElement returned by headless calling API into a component that can be rendered as a VideoTile.

function StreamMedia(props: StreamMediaProps): Element

Parameters

Returns

Element

TypingIndicator(TypingIndicatorProps)

Component to notify local user when one or more participants in the chat thread are typing.

function TypingIndicator(props: TypingIndicatorProps): Element

Parameters

Returns

Element

VideoGallery(VideoGalleryProps)

VideoGallery represents a layout of video tiles for a specific call. It displays a VideoTile for the local user as well as for each remote participant who has joined the call.

function VideoGallery(props: VideoGalleryProps): Element

Parameters

Returns

Element

VideoTile(VideoTileProps)

A component to render the video stream for a single call participant.

Use with GridLayout in a VideoGallery.

function VideoTile(props: VideoTileProps): Element

Parameters

Returns

Element

createAzureCommunicationCallAdapter(AzureCommunicationCallAdapterArgs)

Create a CallAdapter backed by Azure Communication Services.

This is the default implementation of CallAdapter provided by this library.

Note: displayName can be a maximum of 256 characters.

function createAzureCommunicationCallAdapter(args: AzureCommunicationCallAdapterArgs): Promise<CallAdapter>

Parameters

Returns

Promise<CallAdapter>

createAzureCommunicationCallAdapter(AzureCommunicationOutboundCallAdapterArgs)

Create a CallAdapter backed by Azure Communication Services.

This is the default implementation of CallAdapter provided by this library.

Note: displayName can be a maximum of 256 characters.

function createAzureCommunicationCallAdapter(args: AzureCommunicationOutboundCallAdapterArgs): Promise<CallAdapter>

Parameters

Returns

Promise<CallAdapter>

createAzureCommunicationCallAdapterFromClient(StatefulCallClient, CallAgent, CommunicationIdentifier[], CommonCallAdapterOptions)

Create a CallAdapter using the provided StatefulCallClient.

Useful if you want to keep a reference to StatefulCallClient. Consider using createAzureCommunicationCallAdapter for a simpler API.

function createAzureCommunicationCallAdapterFromClient(callClient: StatefulCallClient, callAgent: CallAgent, targetCallees: CommunicationIdentifier[], options?: CommonCallAdapterOptions): Promise<CallAdapter>

Parameters

callClient
StatefulCallClient
callAgent
CallAgent
targetCallees

CommunicationIdentifier[]

Returns

Promise<CallAdapter>

createAzureCommunicationCallAdapterFromClient(StatefulCallClient, CallAgent, CallAdapterLocator, CommonCallAdapterOptions)

Create a CallAdapter using the provided StatefulCallClient.

Useful if you want to keep a reference to StatefulCallClient. Consider using createAzureCommunicationCallAdapter for a simpler API.

function createAzureCommunicationCallAdapterFromClient(callClient: StatefulCallClient, callAgent: CallAgent, locator: CallAdapterLocator, options?: CommonCallAdapterOptions): Promise<CallAdapter>

Parameters

callClient
StatefulCallClient
callAgent
CallAgent

Returns

Promise<CallAdapter>

createAzureCommunicationCallWithChatAdapter(AzureCommunicationCallWithChatAdapterArgs)

Create a CallWithChatAdapter backed by Azure Communication services to plug into the CallWithChatComposite.

function createAzureCommunicationCallWithChatAdapter(__namedParameters: AzureCommunicationCallWithChatAdapterArgs): Promise<CallWithChatAdapter>

Parameters

Returns

createAzureCommunicationCallWithChatAdapterFromClients(AzureCommunicationCallWithChatAdapterFromClientArgs)

Create a CallWithChatAdapter using the provided StatefulChatClient and StatefulCallClient.

Useful if you want to keep a reference to StatefulChatClient and StatefulCallClient. Please note that chatThreadClient has to be created by StatefulChatClient via chatClient.getChatThreadClient(chatThreadId) API. Consider using createAzureCommunicationCallWithChatAdapter for a simpler API.

function createAzureCommunicationCallWithChatAdapterFromClients(__namedParameters: AzureCommunicationCallWithChatAdapterFromClientArgs): Promise<CallWithChatAdapter>

Parameters

Returns

createAzureCommunicationChatAdapter(AzureCommunicationChatAdapterArgs)

Create a ChatAdapter backed by Azure Communication Services.

This is the default implementation of ChatAdapter provided by this library.

function createAzureCommunicationChatAdapter(__namedParameters: AzureCommunicationChatAdapterArgs): Promise<ChatAdapter>

Parameters

Returns

Promise<ChatAdapter>

createAzureCommunicationChatAdapterFromClient(StatefulChatClient, ChatThreadClient, ChatAdapterOptions)

Create a ChatAdapter using the provided StatefulChatClient.

Useful if you want to keep a reference to StatefulChatClient. Consider using createAzureCommunicationChatAdapter for a simpler API.

function createAzureCommunicationChatAdapterFromClient(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient, chatAdapterOptions?: ChatAdapterOptions): Promise<ChatAdapter>

Parameters

chatClient
StatefulChatClient
chatThreadClient
ChatThreadClient
chatAdapterOptions
ChatAdapterOptions

Returns

Promise<ChatAdapter>

createDefaultCallingHandlers(StatefulCallClient, undefined | CallAgent, undefined | StatefulDeviceManager, undefined | Call, CallingHandlersOptions)

Create the default implementation of CallingHandlers for teams call.

Useful when implementing a custom component that utilizes the providers exported from this library.

function createDefaultCallingHandlers(callClient: StatefulCallClient, callAgent: undefined | CallAgent, deviceManager: undefined | StatefulDeviceManager, call: undefined | Call, options?: CallingHandlersOptions): CallingHandlers

Parameters

callClient
StatefulCallClient
callAgent

undefined | CallAgent

deviceManager

undefined | StatefulDeviceManager

call

undefined | Call

Returns

createDefaultChatHandlers(StatefulChatClient, ChatThreadClient)

Create the default implementation of ChatHandlers.

Useful when implementing a custom component that utilizes the providers exported from this library.

Returned object is memoized to avoid rerenders when used as props for React Components.

function createDefaultChatHandlers(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient): ChatHandlers

Parameters

chatClient
StatefulChatClient
chatThreadClient
ChatThreadClient

Returns

createDefaultTeamsCallingHandlers(StatefulCallClient, TeamsCallAgent, StatefulDeviceManager, TeamsCall, { onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>, onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency> })

Create the default implementation of TeamsCallingHandlers for teams call.

Useful when implementing a custom component that utilizes the providers exported from this library.

function createDefaultTeamsCallingHandlers(callClient: StatefulCallClient, callAgent?: TeamsCallAgent, deviceManager?: StatefulDeviceManager, call?: TeamsCall, options?: { onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>, onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency> }): TeamsCallingHandlers

Parameters

callClient
StatefulCallClient
callAgent
TeamsCallAgent
deviceManager
StatefulDeviceManager
call
TeamsCall
options

{ onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>, onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency> }

Returns

createStatefulCallClient(StatefulCallClientArgs, StatefulCallClientOptions)

Creates a StatefulCallClient StatefulCallClient by proxying CallClient <xref:%40azure%2Fcommunication-calling%23CallClient> with ProxyCallClient <xref:ProxyCallClient> which then allows access to state in a declarative way.

It is important to use the <xref:%40azure%2Fcommunication-calling%23DeviceManager> and <xref:%40azure%2Fcommunication-calling%23CallAgent> and <xref:%40azure%2Fcommunication-calling%23Call> (and etc.) that are obtained from the StatefulCallClient in order for their state changes to be proxied properly.

function createStatefulCallClient(args: StatefulCallClientArgs, options?: StatefulCallClientOptions): StatefulCallClient

Parameters

Returns

createStatefulChatClient(StatefulChatClientArgs, StatefulChatClientOptions)

Creates a stateful ChatClient StatefulChatClient by proxying ChatClient <xref:%40azure%2Fcommunication-chat%23ChatClient> with ProxyChatClient <xref:ProxyChatClient> which then allows access to state in a declarative way.

function createStatefulChatClient(args: StatefulChatClientArgs, options?: StatefulChatClientOptions): StatefulChatClient

Parameters

Returns

createTeamsCallAdapter(TeamsCallAdapterArgs)

function createTeamsCallAdapter(args: TeamsCallAdapterArgs): Promise<TeamsCallAdapter>

Parameters

Returns

Promise<TeamsCallAdapter>

createTeamsCallAdapterFromClient(StatefulCallClient, TeamsCallAgent, CallAdapterLocator, CommonCallAdapterOptions)

Create a TeamsCallAdapter using the provided StatefulCallClient.

Useful if you want to keep a reference to StatefulCallClient. Consider using createAzureCommunicationCallAdapter for a simpler API.

function createTeamsCallAdapterFromClient(callClient: StatefulCallClient, callAgent: TeamsCallAgent, locator: CallAdapterLocator, options?: CommonCallAdapterOptions): Promise<TeamsCallAdapter>

Parameters

callClient
StatefulCallClient
callAgent
TeamsCallAgent

Returns

Promise<TeamsCallAdapter>

fromFlatCommunicationIdentifier(string)

Reverse operation of toFlatCommunicationIdentifier.

function fromFlatCommunicationIdentifier(id: string): CommunicationIdentifier

Parameters

id

string

Returns

getCallingSelector<Component>(Component)

Get the selector for a specified component.

Useful when implementing a custom component that utilizes the providers exported from this library.

function getCallingSelector<Component>(component: Component): GetCallingSelector<Component>

Parameters

component

Component

Returns

GetCallingSelector<Component>

getChatSelector<Component>(Component)

Get the selector for a specified component.

Useful when implementing a custom component that utilizes the providers exported from this library.

function getChatSelector<Component>(component: Component): GetChatSelector<Component>

Parameters

component

Component

Returns

GetChatSelector<Component>

loadCallComposite(CallCompositeLoaderProps, HTMLElement)

Loader function for the CallComposite that you can use in your application. This function will load the CallComposite into the provided HTML element. The best use case for this is in a Node ui framework that is not React based.

function loadCallComposite(loaderArgs: CallCompositeLoaderProps, htmlElement: HTMLElement): Promise<undefined | CallAdapter>

Parameters

htmlElement

HTMLElement

Returns

Promise<undefined | CallAdapter>

loadCallWithChatComposite(CallWithChatCompositeLoaderProps, HTMLElement)

Props for the CallWithChatComposite that you can use in your application. This function will load the CallWithChatComposite into the provided HTML element. The best use case for this is in a Node UI framework that is not React based.

function loadCallWithChatComposite(loaderArgs: CallWithChatCompositeLoaderProps, htmlElement: HTMLElement): Promise<undefined | CallWithChatAdapter>

Parameters

htmlElement

HTMLElement

Returns

Promise<undefined | CallWithChatAdapter>

loadChatComposite(ChatCompositeLoaderProps, HTMLElement)

Loader function for the ChatComposite that you can use in your application. This function will load the ChatComposite into the provided HTML element. The best use case for this is in a Node UI framework that is not React based.

function loadChatComposite(loaderArgs: ChatCompositeLoaderProps, htmlElement: HTMLElement): Promise<undefined | ChatAdapter>

Parameters

htmlElement

HTMLElement

Returns

Promise<undefined | ChatAdapter>

loadOutboundCallComposite(OutboundCallCompositeLoaderProps, HTMLElement)

Loader function for the OutboundCallComposite that you can use in your application. This function will load the CallComposite into the provided HTML element to make outbound calls. The best use case for this is in a Node UI framework that is not React based.

function loadOutboundCallComposite(loaderArgs: OutboundCallCompositeLoaderProps, htmlElement: HTMLElement): Promise<undefined | CallAdapter>

Parameters

htmlElement

HTMLElement

Returns

Promise<undefined | CallAdapter>

onResolveDeepNoiseSuppressionDependency()

Dependency resolution for video background effects using lazy loading.

function onResolveDeepNoiseSuppressionDependency(): Promise<DeepNoiseSuppressionEffectDependency>

Returns

onResolveDeepNoiseSuppressionDependencyLazy()

Dependency resolution for video background effects using lazy loading.

function onResolveDeepNoiseSuppressionDependencyLazy(): Promise<DeepNoiseSuppressionEffectDependency>

Returns

onResolveVideoEffectDependency()

Dependency resolution for video background effects.

function onResolveVideoEffectDependency(): Promise<VideoBackgroundEffectsDependency>

Returns

onResolveVideoEffectDependencyLazy()

Dependency resolution for video background effects using lazy loading.

function onResolveVideoEffectDependencyLazy(): Promise<VideoBackgroundEffectsDependency>

Returns

toFlatCommunicationIdentifier(CommunicationIdentifier)

A string representation of a <xref:%40azure%2Fcommunication-common%23CommunicationIdentifier>.

This string representation of CommunicationIdentifier is guaranteed to be stable for a unique Communication user. Thus,

  • it can be used to persist a user's identity in external databases.
  • it can be used as keys into a Map to store data for the user.
function toFlatCommunicationIdentifier(identifier: CommunicationIdentifier): string

Parameters

Returns

string

useAzureCommunicationCallAdapter(Partial<AzureCommunicationCallAdapterArgs | AzureCommunicationOutboundCallAdapterArgs>, (adapter: CallAdapter) => Promise<CallAdapter>, (adapter: CallAdapter) => Promise<void>)

A custom React hook to simplify the creation of CallAdapter.

Similar to createAzureCommunicationCallAdapter, but takes care of asynchronous creation of the adapter internally.

Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments as they are created. The adapter is only created when all arguments are defined.

Note that you must memoize the arguments to avoid recreating adapter on each render. See storybook for typical usage examples.

function useAzureCommunicationCallAdapter(args: Partial<AzureCommunicationCallAdapterArgs | AzureCommunicationOutboundCallAdapterArgs>, afterCreate?: (adapter: CallAdapter) => Promise<CallAdapter>, beforeDispose?: (adapter: CallAdapter) => Promise<void>): undefined | CallAdapter

Parameters

afterCreate

(adapter: CallAdapter) => Promise<CallAdapter>

beforeDispose

(adapter: CallAdapter) => Promise<void>

Returns

undefined | CallAdapter

useAzureCommunicationCallWithChatAdapter(Partial<AzureCommunicationCallWithChatAdapterArgs>, (adapter: CallWithChatAdapter) => Promise<CallWithChatAdapter>, (adapter: CallWithChatAdapter) => Promise<void>)

A custom React hook to simplify the creation of CallWithChatAdapter.

Similar to createAzureCommunicationCallWithChatAdapter, but takes care of asynchronous creation of the adapter internally.

Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments as they are created. The adapter is only created when all arguments are defined.

Note that you must memoize the arguments to avoid recreating adapter on each render. See storybook for typical usage examples.

function useAzureCommunicationCallWithChatAdapter(args: Partial<AzureCommunicationCallWithChatAdapterArgs>, afterCreate?: (adapter: CallWithChatAdapter) => Promise<CallWithChatAdapter>, beforeDispose?: (adapter: CallWithChatAdapter) => Promise<void>): undefined | CallWithChatAdapter

Parameters

afterCreate

(adapter: CallWithChatAdapter) => Promise<CallWithChatAdapter>

beforeDispose

(adapter: CallWithChatAdapter) => Promise<void>

Returns

undefined | CallWithChatAdapter

useAzureCommunicationChatAdapter(Partial<AzureCommunicationChatAdapterArgs>, (adapter: ChatAdapter) => Promise<ChatAdapter>, (adapter: ChatAdapter) => Promise<void>)

A custom React hook to simplify the creation of ChatAdapter.

Similar to createAzureCommunicationChatAdapter, but takes care of asynchronous creation of the adapter internally.

Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments as they are created. The adapter is only created when all arguments are defined.

Note that you must memoize the arguments to avoid recreating adapter on each render. See storybook for typical usage examples.

function useAzureCommunicationChatAdapter(args: Partial<AzureCommunicationChatAdapterArgs>, afterCreate?: (adapter: ChatAdapter) => Promise<ChatAdapter>, beforeDispose?: (adapter: ChatAdapter) => Promise<void>): undefined | ChatAdapter

Parameters

afterCreate

(adapter: ChatAdapter) => Promise<ChatAdapter>

beforeDispose

(adapter: ChatAdapter) => Promise<void>

Returns

undefined | ChatAdapter

useCall()

Hook to obtain <xref:%40azure%2Fcommunication-calling%23Call> from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

you must have previously used the CallProvider with a Call object to use this hook

function useCall(): undefined | Call

Returns

undefined | Call

useCallAgent()

Hook to obtain <xref:%40azure%2Fcommunication-calling%23CallAgent> from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

function useCallAgent(): undefined | CallAgent

Returns

undefined | CallAgent

useCallClient()

Hook to obtain StatefulCallClient from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

function useCallClient(): StatefulCallClient

Returns

useChatClient()

Hook to obtain StatefulChatClient from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

function useChatClient(): StatefulChatClient

Returns

useChatThreadClient()

Hook to obtain <xref:%40azure%2Fcommunication-chat%23ChatThreadClient> from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

function useChatThreadClient(): ChatThreadClient

Returns

useDeviceManager()

Hook to obtain StatefulDeviceManager from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

function useDeviceManager(): undefined | StatefulDeviceManager

Returns

undefined | StatefulDeviceManager

usePropsFor<Component>(Component, "chat" | "calling")

Primary hook to get all hooks necessary for a React Component from this library.

To call this hook, the component requires to be wrapped under these providers:

  1. For chat components: ChatClientProvider and ChatThreadClientProvider.

  2. For calling components: CallClientProvider, CallAgentProvider and CallAgentProvider.

Most straightforward usage of a components looks like:

Example

    import { ParticipantList, usePropsFor } from '@azure/communication-react';

    const App = (): JSX.Element => {
        // ... code to setup Providers ...

        return <ParticipantList {...usePropsFor(ParticipantList)}/>
    }
function usePropsFor<Component>(component: Component, type?: "chat" | "calling"): ComponentProps<Component>

Parameters

component

Component

type

"chat" | "calling"

Returns

ComponentProps<Component>

useSelector<ParamT>(ParamT, (ParamT extends Selector ? Parameters<ParamT>[1] : undefined), "chat" | "calling")

Hook to obtain a selector for a specified component.

Useful when implementing a custom component that utilizes the providers exported from this library.

function useSelector<ParamT>(selector: ParamT, selectorProps?: (ParamT extends Selector ? Parameters<ParamT>[1] : undefined), type?: "chat" | "calling"): (ParamT extends Selector ? ReturnType<ParamT> : undefined)

Parameters

selector

ParamT

selectorProps

(ParamT extends Selector ? Parameters<ParamT>[1] : undefined)

type

"chat" | "calling"

Returns

(ParamT extends Selector ? ReturnType<ParamT> : undefined)

useTeamsCall()

Hook to obtain <xref:%40azure%2Fcommunication-calling%23TeamsCall> from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

you must have previously used the CallProvider with a TeamsCall object to use this hook

function useTeamsCall(): undefined | TeamsCall

Returns

undefined | TeamsCall

useTeamsCallAdapter(Partial<TeamsCallAdapterArgs>, (adapter: TeamsCallAdapter) => Promise<TeamsCallAdapter>, (adapter: TeamsCallAdapter) => Promise<void>)

A custom React hook to simplify the creation of TeamsCallAdapter.

Similar to <xref:createTeamsAzureCommunicationCallAdapter>, but takes care of asynchronous creation of the adapter internally.

Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments as they are created. The adapter is only created when all arguments are defined.

Note that you must memoize the arguments to avoid recreating adapter on each render. See storybook for typical usage examples.

function useTeamsCallAdapter(args: Partial<TeamsCallAdapterArgs>, afterCreate?: (adapter: TeamsCallAdapter) => Promise<TeamsCallAdapter>, beforeDispose?: (adapter: TeamsCallAdapter) => Promise<void>): undefined | TeamsCallAdapter

Parameters

args

Partial<TeamsCallAdapterArgs>

afterCreate

(adapter: TeamsCallAdapter) => Promise<TeamsCallAdapter>

beforeDispose

(adapter: TeamsCallAdapter) => Promise<void>

Returns

undefined | TeamsCallAdapter

useTeamsCallAgent()

Hook to obtain <xref:%40azure%2Fcommunication-calling%23TeamsCallAgent> from the provider.

Useful when implementing a custom component that utilizes the providers exported from this library.

function useTeamsCallAgent(): undefined | TeamsCallAgent

Returns

undefined | TeamsCallAgent

useTheme()

React hook to access theme

function useTheme(): Theme

Returns

Theme