@azure/communication-react package
接口
| AcceptedTransfer |
传输功能状态 |
| ActiveErrorMessage |
要通过 ErrorBar显示的活动错误消息。 |
| ActiveNotification |
将通过 NotificationStack 显示的活动通知。 |
| AdapterError |
通过错误事件报告并存储在适配器状态中的错误。 |
| AdapterNotification |
来自调用客户端状态的通知存储在适配器状态中。 |
| AdapterState |
与复合适配器状态交互的功能。 |
| AttachmentMetadata |
表示聊天消息附件的数据模型,其中包含用于唯一标识附件的 ID、表示文件名的名称以及用于下载附件的 URL。 |
| BaseCompositeProps |
从此库导出的所有复合的通用属性。 |
| BaseCustomStyles |
从此库导出的所有组件的基本 Fluent 样式属性。 |
| BreakoutRoomsState |
分组讨论室状态 |
| CallAdapter |
特定于 Azure 通信标识的适配器接口,用于扩展 CommonCallAdapter。 |
| CallAdapterCallManagement |
用于管理当前呼叫或启动新呼叫的功能 |
| CallAdapterCallOperations |
用于管理当前调用的功能。 |
| CallAdapterDeviceManagement |
用于在通话中管理设备的功能。 |
| CallAdapterSubscribers |
调用可订阅的复合事件。 |
| CallAgentProviderProps |
用于初始化 CallAgentProvider的参数。 |
| CallAgentState |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23CallAgent>,但调用将直接移动到 CallClientState 的子级,此处不包含。 调用代理的状态代理的原因是提供对 displayName 的访问权限。 我们不会平展 CallAgent.displayName 并将其置于 CallClientState 中,因为 displayName 实际上依赖于 CallAgent 的创建/存在才可用是不明确的。 |
| CallAndChatLocator |
createAzureCommunicationCallWithChatAdapter 中用于联接与关联聊天线程的通话的参数。 |
| CallClientProviderProps |
用于初始化 CallClientProvider的参数。 |
| CallClientState |
StatefulCallClient代理的所有状态数据的容器。 如果已创建 callAgent,则会自动提供调用、callsEnded、incomingCalls 和 incomingCallsEnded 状态。 deviceManager 最初将为空,直到填充到 DeviceManagerState。 userId 状态作为开发人员的便利提供,由开发人员完全控制并设置。 |
| CallCompositeLoaderProps |
Props 的 Props 中,您可以在应用程序中使用的 OutboundCallComposite 的 Props 中实现。 包含两个可选袋: |
| CallCompositeProps |
CallComposite的道具。 |
| CallCompositeStrings |
除了组件库中的组件使用的字符串外, 这些字符串。 |
| CallFeatureStreamState |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23CallFeatureStream>。 表示呼叫特征流状态。 |
| CallInfoState |
State 来跟踪类型和<xref:CallInfo><xref:TeamsCallInfo> |
| CallNotification | |
| CallProviderProps |
用于初始化 CallProvider的参数。 |
| CallState |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23Call>。 StatefulCallClient 将自动检索呼叫的状态,并将其添加到由 StatefulCallClient公开的状态。 |
| CallSurveyImprovementSuggestions |
表示呼叫调查的改进建议部分 |
| CallWithChatAdapter |
CallWithChatComposite 适配器接口。 |
| CallWithChatAdapterManagement |
使用聊天管理当前呼叫的功能。 |
| CallWithChatAdapterState |
CallWithChat State 是有状态聊天和有状态呼叫客户端的组合,其状态仅特定于 CallWithChat 复合。 |
| CallWithChatAdapterSubscriptions |
可在 CallWithChatAdapter中订阅的呼叫和聊天事件。 |
| CallWithChatAdapterUiState |
与 CallWithChatComposite相关的 UI 状态。 |
| CallWithChatClientState |
来自驱动 CallWithChatComposite的后端服务的状态。 |
| CallWithChatCompositeLoaderProps |
可在应用程序中使用的 CallWithChatComposite 的 props。 包含两个可选袋:
|
| CallWithChatCompositeProps |
CallWithChatComposite 所需的属性 |
| CallWithChatCompositeStrings |
CallWithChatComposite 使用的字符串。 除了组件库中的组件使用的字符串外, 这些字符串。 |
| CallWithChatControlOptions |
使用聊天体验进行呼叫时控件栏的自定义选项。 |
| CallingHandlers |
包含调用组件所需的所有处理程序的对象。 从此包调用相关组件可以从此对象中选取相关处理程序。 请参阅 <xref:useHandlers> 和 usePropsFor。 |
| CallingTheme |
通过调用此库中的相关组件使用的自定义 Fluent 主题调色板。 |
| CameraButtonContextualMenuStyles |
CameraButton 菜单的样式。 |
| CameraButtonProps |
CameraButton 组件的属性。 |
| CameraButtonStrings |
可以重写的 CameraButton 的字符串。 |
| CameraButtonStyles |
CameraButton 样式 |
| CapabilitiesFeatureState |
的 仅限状态版本 <xref:%40azure%2Fcommunication-calling%23CapabilitiesFeature> |
| CapabilityChangedNotificationStrings |
功能更改通知的字符串 |
| CaptionLanguageStrings |
captions 设置模式的 caption language strings for captions setting |
| CaptionsBannerProps |
CaptionsBanner 组件 props。 |
| CaptionsBannerStrings |
标题横幅的字符串 |
| CaptionsCallFeatureState | |
| CaptionsInfo | |
| CaptionsSettingsModalProps |
CaptionsSettingsModal 组件道具。 |
| CaptionsSettingsModalStrings |
Strings for captions 设置 modal |
| ChatAdapterSubscribers |
可以订阅的聊天复合事件。 |
| ChatAdapterThreadManagement |
用于管理当前聊天线程的功能。 |
| ChatCompositeLoaderProps |
可在应用程序中使用的 ChatComposite 的 props。 包含 ChatCompositeChatCompositeOptions 的选项。 |
| ChatCompositeProps |
ChatComposite的道具。 |
| ChatCompositeStrings |
ChatComposite 直接使用的字符串。 除了组件库中的组件使用的字符串外, 这些字符串。 |
| ChatMessage |
聊天消息。 |
| CommonCallAdapter |
CallComposite 适配器接口。 |
| CommonCallingHandlers |
包含调用组件所需的所有处理程序的对象。 从此包调用相关组件可以从此对象中选取相关处理程序。 请参阅 <xref:useHandlers> 和 usePropsFor。 |
| ComponentLocale |
从此库导出的所有组件的区域设置信息。 |
| ComponentStrings |
从此库导出的所有组件使用的字符串。 |
| CompositeLocale |
从此库导出的所有复合的区域设置信息。 |
| CompositeStrings |
直接在复合中使用的字符串。 这些字符串由复合直接使用,而不是由包含的组件使用。 |
| ConferencePhoneInfo |
会议电话信息信息 |
| ContentSystemMessage |
包含仲裁内容的系统消息。 |
| ControlBarButtonProps |
ControlBarButton的道具。 |
| ControlBarButtonStrings |
可以重写的 ControlBarButton 字符串。 |
| ControlBarProps |
ControlBar的道具。 |
| CreateVideoStreamViewResult |
创建本地或远程 VideoStream 后返回的对象。 这包含用于作流的呈现的帮助程序函数。 |
| CustomCallControlButtonCallbackArgs | |
| CustomCallControlButtonProps |
来自 CustomCallControlButtonCallback 的响应。 包括渲染 ControlBarButton 或 <xref:DrawerMenuItem>. |
| CustomCallControlButtonStrings |
CustomCallControlButtons 的字符串 |
| CustomMessage |
自定义消息类型。 默认情况下不会呈现自定义消息,但应用程序可以为它们提供自定义呈现器。 |
| DevicesButtonContextualMenuStyles |
DevicesButton 菜单的样式。 |
| DevicesButtonProps |
DevicesButton的道具。 |
| DevicesButtonStrings |
可以重写的 DevicesButton 字符串。 |
| DevicesButtonStyles |
“设备”按钮菜单项的样式。 |
| DiagnosticsCallFeatureState |
仅 <xref:%40azure%2Fcommunication-calling%23DiagnosticsCallFeature>的状态代理。 |
| DialpadProps |
Dialpad 组件的 props。 |
| DialpadStrings |
可以覆盖的 Dialpad 字符串。 |
| DialpadStyles |
Dialpad 组件的样式。 |
| Disposable |
用于正确释放复合的功能。 |
| DtmfDialPadOptions |
用于确定 CallComposite 中 dtmfDialer 的呈现行为的选项 |
| EndCallButtonProps |
EndCallButton的道具。 |
| EndCallButtonStrings |
可以重写的 EndCallButton 的字符串。 |
| ErrorBarProps |
ErrorBar的属性。 除了以下项,ErrorBar 将所有 <xref:%40fluentui%2Freact%23IMessageBarProps> 转发到基础 <xref:%40fluentui%2Freact%23MessageBar>。 |
| ErrorBarStrings |
ErrorBar中 UI 上可能显示的所有字符串。 |
| FluentThemeProviderProps | |
| GridLayoutProps |
GridLayout的道具。 |
| GridLayoutStyles |
GridLayout 组件样式。 |
| HoldButtonProps | |
| HoldButtonStrings |
用于保持按钮标签的字符串 |
| HorizontalGalleryStyles |
<xref:HorizontalGallery> 组件样式。 |
| ImageOverlayProps |
ImageOverlay 的 props 中。 |
| ImageOverlayStrings |
可以重写的 ImageOverlay 字符串。 |
| IncomingCallNotificationProps |
来电通知组件的属性。 |
| IncomingCallNotificationStrings |
来电通知组件的字符串。 |
| IncomingCallNotificationStyles |
来电通知组件的样式。 |
| IncomingCallStackCall |
表示活动的来电。 |
| IncomingCallStackProps |
IncomingCallManager 组件的 props。 |
| IncomingCallState |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23IncomingCall>。 StatefulCallClient 将自动检测传入呼叫,并将其状态添加到由 StatefulCallClient公开的状态。 |
| InlineImage |
InlineImage 的状态,如 UI 中所示。 |
| InlineImageOptions |
用于在内嵌图像场景中显示内嵌图像的选项。 |
| JoinCallOptions |
加入通话时设置麦克风和摄像头状态的选项 true = 加入通话时打开设备 false = 加入通话时关闭设备 'keep'/undefined = 保留设备的呼叫前状态 |
| JumpToNewMessageButtonProps |
<xref:MessageThreadProps.onRenderJumpToNewMessageButton>的参数。 |
| LocalVideoCameraCycleButtonProps | |
| LocalVideoStreamState |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23LocalVideoStream>。 |
| LocalVideoStreamVideoEffectsState |
LocalVideoStream 的 <xref:%40azure%2Fcommunication-calling%23VideoEffectsFeature>. |
| LocalVideoTileOptions |
Call composite(通话合成)中本地视频磁贴的选项。 |
| MediaAccessState |
媒体访问状态 |
| MediaDiagnosticsState |
仅 <xref:%40azure%2Fcommunication-calling%23MediaDiagnostics>的状态代理。 |
| MeetingConferencePhoneInfoModalStrings |
Phone Info 模式的字符串 |
| MessageCommon |
所有消息类型的常见属性。 |
| MessageStatusIndicatorProps | |
| MessageStatusIndicatorStrings |
可以重写的 MessageStatusIndicator 字符串。 |
| MessageThreadStrings |
可以重写的 MessageThread 字符串。 |
| MessageThreadStyles |
MessageThread的 Fluent 样式。 |
| MicrophoneButtonContextualMenuStyles |
MicrophoneButton 菜单的样式。 |
| MicrophoneButtonProps |
MicrophoneButton的道具。 |
| MicrophoneButtonStrings |
可以重写的 MicrophoneButton 字符串。 |
| MicrophoneButtonStyles | |
| NetworkDiagnosticsState |
仅 <xref:%40azure%2Fcommunication-calling%23NetworkDiagnostics>的状态代理。 |
| NotificationOptions |
用于控制复合中通知的选项。 |
| NotificationProps |
通知的 props 中。 |
| NotificationStackProps |
NotificationStack 的 props 来获取。 |
| NotificationStackStrings |
可能在 NotificationStack 的 UI 上显示的所有字符串。 |
| NotificationStrings |
通知的 UI 上可能显示的所有字符串。 |
| NotificationStyles |
通知组件的样式。 |
| OptimalVideoCountFeatureState |
最佳视频计数功能 <xref:%40azure%2Fcommunication-calling%23OptimalVideoCountCallFeature>的仅限状态版本 。 |
| OptionsDevice |
DevicesButton 浮出控件中的设备,例如相机、麦克风或扬声器。 |
| OutboundCallCompositeLoaderProps |
Props 的 Props 中,您可以在应用程序中使用的 OutboundCallComposite 的 Props 中实现。 包含两个可选袋: |
| PPTLiveCallFeatureState |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23PPTLiveCallFeature>。 StatefulCallClient 会自动监听通话中的 pptLive,并相应地更新 StatefulCallClient 暴露的状态。 |
| ParticipantAddedSystemMessage |
一条系统消息,通知参与者已添加到聊天线程。 |
| ParticipantItemProps |
ParticipantItem的道具。 |
| ParticipantItemStrings |
可以重写的 ParticipantItem 字符串。 |
| ParticipantItemStyles |
ParticipantItem的 Fluent 样式。 |
| ParticipantListItemStyles | |
| ParticipantListStyles |
ParticipantList的样式。 |
| ParticipantRemovedSystemMessage |
系统消息,通知参与者已从聊天线程中删除。 |
| ParticipantsButtonContextualMenuStyles |
ParticipantsButton 菜单的样式。 |
| ParticipantsButtonProps |
参与者按钮的道具。 |
| ParticipantsButtonStrings |
可以重写的 ParticipantsButton 字符串。 |
| ParticipantsButtonStyles |
ParticipantsButton的样式属性。 |
| RaiseHandButtonProps |
RaiseHandButton 的 props 中。 |
| RaiseHandButtonStrings |
可以重写的 RaiseHandButton 字符串。 |
| RaiseHandCallFeature |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23RaiseHandCallFeature>。 StatefulCallClient 将自动监听调用中的举手,并相应地更新 StatefulCallClient 公开的状态。 |
| ReactionButtonProps |
ReactionButton 的 props 中。 |
| ReactionButtonStrings |
可以重写的 ReactionButton 字符串。 |
| ReactionResources |
动画 Sprite 图像和相关元数据的接口 |
| RealTimeTextCallFeatureState | |
| RealTimeTextInfo | |
| RealTimeTextModalProps |
RealTimeTextModal 组件属性。 |
| RealTimeTextModalStrings |
realTimeText 模态框的字符串 |
| RealTimeTextProps |
Props 的命令。 |
| RealTimeTextStrings |
RTT 字符串 |
| RecordingCallFeature |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23RecordingCallFeature>。 StatefulCallClient 将自动侦听呼叫的录制状态,并相应地更新 StatefulCallClient 公开的状态。 |
| RemoteParticipantState |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23RemoteParticipant>。 StatefulCallClient 将自动检索 RemoteParticipants 并将其状态添加到由 StatefulCallClient公开的状态。 |
| RemoteVideoStreamState |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23RemoteVideoStream>。 |
| RemoteVideoTileMenuOptions |
VideoGallery 中远程视频拼贴的菜单选项。 |
| ScreenShareButtonProps | |
| ScreenShareButtonStrings |
可以重写的 ScreenShareButton 字符串。 |
| SendBoxProps |
SendBox的道具。 |
| SendBoxStrings |
可以重写的 SendBox 字符串。 |
| SendBoxStylesProps |
<xref:Sendbox>的 Fluent 样式。 |
| SpokenLanguageStrings |
字幕设置的口语字符串 modal |
| SpotlightCallFeatureState |
的 仅限状态版本 <xref:%40azure%2Fcommunication-calling%23SpotlightCallFeature> |
| SpotlightPromptStrings |
与 spotlight 相关的提示中使用的字符串 |
| SpotlightState |
带顺序的 Spotlight 状态 |
| StartCaptionsAdapterOptions |
传递给 adapter.startCaptions 的选项 |
| StartCaptionsButtonProps | |
| StartCaptionsButtonStrings |
用于保持按钮标签的字符串 |
| StartRealTimeTextButtonProps |
StartRealTimeTextButton 组件的 props |
| StartRealTimeTextButtonStrings |
用于保持按钮标签的字符串 |
| StatefulCallClient |
定义允许有状态使用 CallClient <xref:%40azure%2Fcommunication-calling%23CallClient> 的方法。 该接口提供对代理状态的访问,并允许注册状态更改事件的处理程序。 有关状态定义,请参阅 CallClientState。 状态更改事件由:
|
| StatefulChatClient |
定义允许 {@Link @azure/communication-chat#ChatClient} 与集中式生成状态一起使用的方法。 该接口提供对代理状态的访问,并允许注册状态更改事件的处理程序。 |
| StatefulDeviceManager |
定义由有状态在 <xref:%40azure%2Fcommunication-calling%23DeviceManager>之上添加的其他方法。 |
| StopCaptionsAdapterOptions |
传递给 adapter.stopCaptions 的选项 |
| StreamMediaProps |
StreamMedia的道具。 |
| SurveyIssues |
每个呼叫问题的相应文本 |
| SurveyIssuesHeadingStrings |
每个呼叫问题类别对应的文本 |
| SystemMessageCommon |
所有系统消息的常见属性。 |
| TeamsCallAdapter |
特定于 Teams 标识的 Adapter 接口,用于扩展 CommonCallAdapter。 |
| TeamsCallingHandlers |
包含调用组件所需的所有 teams 调用处理程序的对象。 从此包调用相关组件可以从此对象中选取相关处理程序。 请参阅 <xref:useHandlers> 和 usePropsFor。 |
| TeamsIncomingCallState |
的 仅限状态版本 <xref:%40azure%2Fcommunication-calling%23TeamsIncomingCall> |
| TogetherModeCallFeatureState |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23TogetherModeCallFeature>。 StatefulCallClient 的 表示 Together Mode (一起模式) 功能的状态。 |
| TogetherModeSeatingPositionState |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23TogetherModeSeatingMap>。 表示参加者在 Together Mode 中的就座位置。 |
| TogetherModeStreamOptions |
表示 Together Mode 流视图结果的接口。 |
| TogetherModeStreamViewResult |
表示 Together Mode 流视图结果的接口。 |
| TogetherModeStreamsState |
表示 Together Mode 中的流。 |
| TopicUpdatedSystemMessage |
一条系统消息,通知聊天线程主题已更新。 |
| TranscriptionCallFeature |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23TranscriptionCallFeature>。 StatefulCallClient 将自动侦听呼叫的听录状态,并相应地更新由 StatefulCallClient 公开的状态。 |
| TransferFeature |
传输功能状态 |
| TypingIndicatorProps |
TypeIndicator的道具。 |
| TypingIndicatorStrings |
可以重写的 TypeIndicator 字符串。 |
| TypingIndicatorStylesProps |
TypingIndicator的 Fluent 样式。 |
| VerticalGalleryControlBarStyles |
VerticalGallery 组件内控件栏的样式 |
| VerticalGalleryStrings |
用于垂直库本地化的字符串。 |
| VerticalGalleryStyles |
VerticalGallery 组件的样式 |
| VideoBackgroundBlurEffect |
包含模糊视频背景效果的属性 |
| VideoBackgroundImage |
包含背景图像的属性,如 url、name 等。 |
| VideoBackgroundNoEffect |
包含删除视频背景效果的属性 |
| VideoBackgroundReplacementEffect |
包含所选替换视频背景效果的属性 |
| VideoGalleryLocalParticipant |
VideoGallery中本地参与者的状态。 |
| VideoGalleryProps |
VideoGallery的道具。 |
| VideoGalleryRemoteParticipant |
VideoGallery中远程参与者的状态。 |
| VideoGalleryStream |
VideoGallery中参与者的视频流。 |
| VideoGalleryStrings |
VideoGallery中 UI 上可能显示的所有字符串。 |
| VideoGalleryStyles |
VideoGallery 组件样式。 |
| VideoGalleryTogetherModeSeatingInfo |
表示 Together Mode 中的座位信息的接口。 |
| VideoGalleryTogetherModeStreams |
表示 Together Mode 中的流的接口。 |
| VideoStreamOptions |
用于控制视频流的呈现方式的选项。 |
| VideoStreamRendererViewState |
仅状态版本的 <xref:%40azure%2Fcommunication-calling%23VideoStreamRendererView>。 此属性通过 createView 添加到 StatefulCallClient 公开的状态,并通过 disposeView删除。 |
| VideoTileContextualMenuProps |
用于在 VideoGallery 中显示远程 VideoTile 组件的上下文菜单的属性。 |
| VideoTileDrawerMenuProps |
在 VideoGallery 中长按远程 VideoTile 上显示抽屉菜单的属性。 |
| VideoTileProps |
VideoTile的道具。 |
| VideoTileStrings |
可以重写的 VideoTile 字符串。 |
| VideoTileStylesProps |
VideoTile的 Fluent 样式。 |
| VideoTilesOptions |
适用于 VideoGallery 中所有视频图块的选项 |
类型别名
函数
函数详细信息
CallAgentProvider(CallAgentProviderProps)
存储 <xref:React.Context>的 <xref:%40azure%2Fcommunication-calling%23CallAgent>。
必须用 CallAgentProvider包装来自此包的调用组件。
function CallAgentProvider(props: CallAgentProviderProps): Element
参数
- props
- CallAgentProviderProps
返回
Element
CallClientProvider(CallClientProviderProps)
必须用 CallClientProvider包装来自此包的调用组件。
function CallClientProvider(props: CallClientProviderProps): Element
参数
- props
- CallClientProviderProps
返回
Element
CallComposite(CallCompositeProps)
用于调用体验的可自定义 UI 复合。
function CallComposite(props: CallCompositeProps): Element
参数
- props
- CallCompositeProps
返回
Element
注解
调用复合最小宽度/高度如下所示:
- mobile: 17.5rem x 21rem (280px x 336px,默认 rem 为 16px)
- 桌面:30rem x 22rem (480px x 352px,默认 rem 为 16px)
CallProvider(CallProviderProps)
存储 <xref:React.Context>的 <xref:%40azure%2Fcommunication-calling%23Call>。
必须用 CallProvider包装来自此包的调用组件。
function CallProvider(props: CallProviderProps): Element
参数
- props
- CallProviderProps
返回
Element
CallWithChatComposite(CallWithChatCompositeProps)
CallWithChatComposite 汇集了关键组件,提供现成的聊天体验的完整呼叫。
function CallWithChatComposite(props: CallWithChatCompositeProps): Element
参数
返回
Element
CameraButton(CameraButtonProps)
用于打开/关闭相机的按钮。
可与 ControlBar一起使用。
function CameraButton(props: CameraButtonProps): Element
参数
- props
- CameraButtonProps
返回
Element
CaptionsBanner(CaptionsBannerProps)
一个组件,用于显示带有用户图标、displayName 和字幕文本的 CaptionsBanner。
function CaptionsBanner(props: CaptionsBannerProps): Element
参数
- props
- CaptionsBannerProps
返回
Element
CaptionsSettingsModal(CaptionsSettingsModalProps)
用于设置口语的组件
function CaptionsSettingsModal(props: CaptionsSettingsModalProps): Element
参数
返回
Element
ChatClientProvider(ChatClientProviderProps)
此包中的聊天组件必须用 ChatClientProvider包装。
function ChatClientProvider(props: ChatClientProviderProps): Element
参数
- props
- ChatClientProviderProps
返回
Element
ChatComposite(ChatCompositeProps)
聊天体验的可自定义 UI 复合。
function ChatComposite(props: ChatCompositeProps): Element
参数
- props
- ChatCompositeProps
返回
Element
注解
聊天复合最小宽度和高度分别为 17.5rem 和 20rem(280px 和 320px),默认 rem 为 16px)
ChatThreadClientProvider(ChatThreadClientProviderProps)
存储 <xref:React.Context>的 <xref:%40azure%2Fcommunication-chat%23ChatThreadClient>。
此包中的聊天组件必须用 ChatThreadClientProvider包装。
function ChatThreadClientProvider(props: ChatThreadClientProviderProps): Element
参数
返回
Element
ControlBar(ControlBarProps)
用于调用控件的各种按钮的容器。
将此库中的各种调用控件按钮(例如,CameraButton)或你自己的 ControlBarButton 实例直接用于。
function ControlBar(props: ControlBarProps): Element
参数
- props
- ControlBarProps
返回
Element
ControlBarButton(ControlBarButtonProps)
ControlBar的默认按钮样式。
使用此组件可创建自定义按钮,这些按钮的样式与其他 UI 库提供的按钮相同。
function ControlBarButton(props: ControlBarButtonProps): Element
参数
- props
- ControlBarButtonProps
返回
Element
DevicesButton(DevicesButtonProps)
用于打开控制设备选项的菜单的按钮。
可与 ControlBar一起使用。
function DevicesButton(props: DevicesButtonProps): Element
参数
- props
- DevicesButtonProps
返回
Element
Dialpad(DialpadProps)
允许用户通过单击拨号盘/使用键盘输入电话号码的组件它将返回空组件以进行稳定构建
function Dialpad(props: DialpadProps): Element
参数
- props
- DialpadProps
返回
Element
EndCallButton(EndCallButtonProps)
用于结束正在进行的呼叫的按钮。
可与 ControlBar一起使用。
function EndCallButton(props: EndCallButtonProps): Element
参数
- props
- EndCallButtonProps
返回
Element
ErrorBar(ErrorBarProps)
用于在 UI 上显示错误消息的组件。 可以显示的所有字符串都接受为 字符串,以便本地化字符串。 activeErrorMessages选择了活动错误。
此组件在内部跟踪用户关闭。
- 具有关联时间戳的错误:如果在关闭后发生错误,则再次在 UI 上显示该错误。
- 没有时间戳的错误:在错误从属性中消失之前,错误将被消除。 如果错误递归,则显示在 UI 中。
使用 <xref:%40fluentui%2Freact%23MessageBar> UI 元素。
function ErrorBar(props: ErrorBarProps): Element
参数
- props
- ErrorBarProps
返回
Element
FluentThemeProvider(FluentThemeProviderProps)
提供程序,用于在此库的 react 组件中应用 Fluent 主题。
function FluentThemeProvider(props: FluentThemeProviderProps): Element
参数
- props
- FluentThemeProviderProps
返回
Element
注解
此库中的组件主要由 Fluent UI、控件、混合 v8 和 v9 控件组成。 此提供程序处理应用提供给基础 Fluent UI 控件的任何主题。 *
GridLayout(GridLayoutProps)
用于在通话中布置音频/视频参与者磁贴的组件。
function GridLayout(props: GridLayoutProps): Element
参数
- props
- GridLayoutProps
返回
Element
HoldButton(HoldButtonProps)
用于保持或恢复正在进行的呼叫的按钮。
可与 ControlBar 一起使用
function HoldButton(props: HoldButtonProps): Element
参数
- props
- HoldButtonProps
hold (保持) 按钮的属性。
返回
Element
ImageOverlay(ImageOverlayProps)
组件,用于渲染选定图像的全屏模式。
function ImageOverlay(props: ImageOverlayProps): Element
参数
- props
- ImageOverlayProps
返回
Element
IncomingCallNotification(IncomingCallNotificationProps)
一个 Notification 组件,用于表示对最终用户的传入调用。 允许用户接受或拒绝来电。
function IncomingCallNotification(props: IncomingCallNotificationProps): Element
参数
返回
Element
IncomingCallStack(IncomingCallStackProps)
用于管理多个传入呼叫的包装器
function IncomingCallStack(props: IncomingCallStackProps): Element
参数
- props
- IncomingCallStackProps
<xref:IncomingCallManagerProps>
返回
Element
LocalizationProvider(LocalizationProviderProps)
提供程序为此库的 react 组件提供本地化字符串。
function LocalizationProvider(props: LocalizationProviderProps): Element
参数
返回
Element
注解
如果未使用此提供程序,则默认情况下会提供英语(美国)的本地化字符串。
MessageStatusIndicator(MessageStatusIndicatorProps)
显示已发送消息状态的组件。
添加对应于消息状态的图标和工具提示。
function MessageStatusIndicator(props: MessageStatusIndicatorProps): Element
参数
返回
Element
MessageThread(MessageThreadProps)
MessageThread 使你能够轻松创建一个组件来呈现聊天消息、处理新旧消息的滚动行为以及自定义 & 聊天线程中的控件的图标。
function MessageThread(props: MessageThreadProps): Element
参数
- props
- MessageThreadProps
MessageThreadProps 类型
用户至少需要提供聊天消息和 userId 才能呈现 MessageThread 组件。
用户还可以通过传入自己的虚拟形象、MessageThread 图标、MessageStatusIndicator、JumpToNewMessageButton 以及这些控件的行为来自定义 LoadPreviousMessagesButton。
MessageThread 内部使用 Chat 来自 @fluentui-contrib/chat的元件。 您可以 在此处查看有关这些组件的详细信息。
返回
Element
MicrophoneButton(MicrophoneButtonProps)
用于打开/关闭麦克风的按钮。
可与 ControlBar一起使用。
function MicrophoneButton(props: MicrophoneButtonProps): Element
参数
- props
- MicrophoneButtonProps
返回
Element
Notification(NotificationProps)
用于在 UI 上显示通知消息的组件。
function Notification(props: NotificationProps): Element
参数
- props
- NotificationProps
返回
Element
NotificationStack(NotificationStackProps)
用于在 UI 上显示通知的组件。 可以显示的所有字符串都接受为 字符串,以便本地化字符串。 活动通知由 activeNotifications 选择。
此组件在内部跟踪用户关闭。
- 具有关联时间戳的通知:如果在关闭后发生通知,则会再次显示在 UI 上。
- 没有时间戳的通知:通知将被关闭,直到它从 prop 中消失。 如果通知再次出现,则会显示在 UI 中。
function NotificationStack(props: NotificationStackProps): Element
参数
- props
- NotificationStackProps
返回
Element
ParticipantItem(ParticipantItemProps)
用于呈现呼叫或聊天参与者的组件。
显示参与者的头像、displayName 和状态以及可选图标和上下文菜单。
function ParticipantItem(props: ParticipantItemProps): Element
参数
- props
- ParticipantItemProps
返回
Element
ParticipantList(ParticipantListProps)
用于呈现所有呼叫或聊天参与者的组件。
默认情况下,每个参与者都呈现 ParticipantItem。 请参阅要重写 <xref:ParticipantListProps.onRenderParticipant>。
function ParticipantList(props: ParticipantListProps): Element
参数
- props
- ParticipantListProps
返回
Element
ParticipantsButton(ParticipantsButtonProps)
用于显示包含通话或聊天参与者的菜单的按钮。
可与 ControlBar一起使用。
此按钮包含通过其属性 menuProps定义的下拉菜单项。 默认情况下,它可以将包含完整列表的远程参与者数显示为子菜单,以及将所有参与者设为静音的选项,以及复制呼叫邀请 URL 的复制到剪贴板按钮。
可以完全重新定义此 menuProps,其属性的类型 IContextualMenuProps。
function ParticipantsButton(props: ParticipantsButtonProps): Element
参数
- props
- ParticipantsButtonProps
返回
Element
RaiseHandButton(RaiseHandButtonProps)
用于启动/停止屏幕共享的按钮。
可与 ControlBar一起使用。
function RaiseHandButton(props: RaiseHandButtonProps): Element
参数
- props
- RaiseHandButtonProps
返回
Element
ReactionButton(ReactionButtonProps)
用于发送回应的按钮。
可与 ControlBar一起使用。
function ReactionButton(props: ReactionButtonProps): Element
参数
- props
- ReactionButtonProps
返回
Element
RealTimeText(RealTimeTextProps)
用于显示单行 RealTimeText 的组件
function RealTimeText(props: RealTimeTextProps): Element
参数
- props
- RealTimeTextProps
返回
Element
RealTimeTextModal(RealTimeTextModalProps)
realTimeText 模态框的组件
function RealTimeTextModal(props: RealTimeTextModalProps): Element
参数
- props
- RealTimeTextModalProps
返回
Element
ScreenShareButton(ScreenShareButtonProps)
用于启动/停止屏幕共享的按钮。
可与 ControlBar一起使用。
function ScreenShareButton(props: ScreenShareButtonProps): Element
参数
- props
- ScreenShareButtonProps
返回
Element
SendBox(SendBoxProps)
用于键入和发送消息的组件。
支持在用户开始输入文本时发送键入通知。 支持文本输入字段下方的可选消息。
function SendBox(props: SendBoxProps): Element
参数
- props
- SendBoxProps
返回
Element
StartCaptionsButton(StartCaptionsButtonProps)
用于开始或停止字幕的按钮
可与 ControlBar 一起使用
function StartCaptionsButton(props: StartCaptionsButtonProps): Element
参数
- props
- StartCaptionsButtonProps
属性。
返回
Element
StartRealTimeTextButton(StartRealTimeTextButtonProps)
一个按钮,用于根据辅助功能要求启动 RealTimeText,实时文本一旦打开就无法关闭
可与 ControlBar 一起使用
function StartRealTimeTextButton(props: StartRealTimeTextButtonProps): Element
参数
启动 RealTimeText 按钮的属性。
返回
Element
StreamMedia(StreamMediaProps)
用于将包含视频流的 HTMLElement 转换为 JSX 元素的实用工具组件。
用于将无外设调用 API 返回的 HTMLElement 转换为可呈现为 VideoTile的组件。
function StreamMedia(props: StreamMediaProps): Element
参数
- props
- StreamMediaProps
返回
Element
TypingIndicator(TypingIndicatorProps)
在聊天线程中的一个或多个参与者键入时通知本地用户的组件。
function TypingIndicator(props: TypingIndicatorProps): Element
参数
- props
- TypingIndicatorProps
返回
Element
VideoGallery(VideoGalleryProps)
VideoGallery 表示特定呼叫的视频磁贴布局。 它为本地用户以及已加入呼叫的每个远程参与者显示 VideoTile。
function VideoGallery(props: VideoGalleryProps): Element
参数
- props
- VideoGalleryProps
返回
Element
VideoTile(VideoTileProps)
用于为单个呼叫参与者呈现视频流的组件。
与 VideoGallery中的 GridLayout 一起使用。
function VideoTile(props: VideoTileProps): Element
参数
- props
- VideoTileProps
返回
Element
createAzureCommunicationCallAdapter(AzureCommunicationCallAdapterArgs)
创建 Azure 通信服务支持的 CallAdapter。
这是此库提供 CallAdapter 的默认实现。
注意:displayName 最多可以包含 256 个字符。
function createAzureCommunicationCallAdapter(args: AzureCommunicationCallAdapterArgs): Promise<CallAdapter>
参数
返回
Promise<CallAdapter>
createAzureCommunicationCallAdapter(AzureCommunicationOutboundCallAdapterArgs)
创建 Azure 通信服务支持的 CallAdapter。
这是此库提供 CallAdapter 的默认实现。
注意:displayName 最多可以包含 256 个字符。
function createAzureCommunicationCallAdapter(args: AzureCommunicationOutboundCallAdapterArgs): Promise<CallAdapter>
参数
返回
Promise<CallAdapter>
createAzureCommunicationCallAdapterFromClient(StatefulCallClient, CallAgent, CommunicationIdentifier[], CommonCallAdapterOptions)
使用提供的 StatefulCallClient创建 CallAdapter。
如果要保留对 StatefulCallClient的引用,则很有用。 请考虑为更简单的 API 使用 createAzureCommunicationCallAdapter。
function createAzureCommunicationCallAdapterFromClient(callClient: StatefulCallClient, callAgent: CallAgent, targetCallees: CommunicationIdentifier[], options?: CommonCallAdapterOptions): Promise<CallAdapter>
参数
- callClient
- StatefulCallClient
- callAgent
- CallAgent
- targetCallees
- options
- CommonCallAdapterOptions
返回
Promise<CallAdapter>
createAzureCommunicationCallAdapterFromClient(StatefulCallClient, CallAgent, CallAdapterLocator, CommonCallAdapterOptions)
使用提供的 StatefulCallClient创建 CallAdapter。
如果要保留对 StatefulCallClient的引用,则很有用。 请考虑为更简单的 API 使用 createAzureCommunicationCallAdapter。
function createAzureCommunicationCallAdapterFromClient(callClient: StatefulCallClient, callAgent: CallAgent, locator: CallAdapterLocator, options?: CommonCallAdapterOptions): Promise<CallAdapter>
参数
- callClient
- StatefulCallClient
- callAgent
- CallAgent
- locator
- CallAdapterLocator
- options
- CommonCallAdapterOptions
返回
Promise<CallAdapter>
createAzureCommunicationCallWithChatAdapter(AzureCommunicationCallWithChatAdapterArgs)
创建 Azure 通信服务支持的 CallWithChatAdapter,以插入 CallWithChatComposite。
function createAzureCommunicationCallWithChatAdapter(__namedParameters: AzureCommunicationCallWithChatAdapterArgs): Promise<CallWithChatAdapter>
参数
- __namedParameters
- AzureCommunicationCallWithChatAdapterArgs
返回
Promise<CallWithChatAdapter>
createAzureCommunicationCallWithChatAdapterFromClients(AzureCommunicationCallWithChatAdapterFromClientArgs)
使用提供的 StatefulChatClient 和 StatefulCallClient创建 CallWithChatAdapter。
如果要保留对 StatefulChatClient 和 StatefulCallClient的引用,则很有用。 请注意,chatThreadClient 必须由 StatefulChatClient 通过 chatClient.getChatThreadClient(chatThreadId) API 创建。 请考虑为更简单的 API 使用 createAzureCommunicationCallWithChatAdapter。
function createAzureCommunicationCallWithChatAdapterFromClients(__namedParameters: AzureCommunicationCallWithChatAdapterFromClientArgs): Promise<CallWithChatAdapter>
参数
- __namedParameters
- AzureCommunicationCallWithChatAdapterFromClientArgs
返回
Promise<CallWithChatAdapter>
createAzureCommunicationChatAdapter(AzureCommunicationChatAdapterArgs)
创建由 Azure 通信服务支持的 ChatAdapter。
这是此库提供 ChatAdapter 的默认实现。
function createAzureCommunicationChatAdapter(__namedParameters: AzureCommunicationChatAdapterArgs): Promise<ChatAdapter>
参数
- __namedParameters
- AzureCommunicationChatAdapterArgs
返回
Promise<ChatAdapter>
createAzureCommunicationChatAdapterFromClient(StatefulChatClient, ChatThreadClient, ChatAdapterOptions)
使用提供的 StatefulChatClient创建 ChatAdapter。
如果要保留对 StatefulChatClient的引用,则很有用。 请考虑为更简单的 API 使用 createAzureCommunicationChatAdapter。
function createAzureCommunicationChatAdapterFromClient(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient, chatAdapterOptions?: ChatAdapterOptions): Promise<ChatAdapter>
参数
- chatClient
- StatefulChatClient
- chatThreadClient
- ChatThreadClient
- chatAdapterOptions
- ChatAdapterOptions
返回
Promise<ChatAdapter>
createDefaultCallingHandlers(StatefulCallClient, undefined | CallAgent, undefined | StatefulDeviceManager, undefined | Call, CallingHandlersOptions)
为团队呼叫创建 CallHandlers 的默认实现。
实现利用从此库导出的提供程序的自定义组件时非常有用。
function createDefaultCallingHandlers(callClient: StatefulCallClient, callAgent: undefined | CallAgent, deviceManager: undefined | StatefulDeviceManager, call: undefined | Call, options?: CallingHandlersOptions): CallingHandlers
参数
- callClient
- StatefulCallClient
- callAgent
-
undefined | CallAgent
- deviceManager
-
undefined | StatefulDeviceManager
- call
-
undefined | Call
- options
- CallingHandlersOptions
返回
createDefaultChatHandlers(StatefulChatClient, ChatThreadClient)
创建 ChatHandlers的默认实现。
实现利用从此库导出的提供程序的自定义组件时非常有用。
返回的对象被备忘录化,以避免在用作 React 组件属性时重新呈现。
function createDefaultChatHandlers(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient): ChatHandlers
参数
- chatClient
- StatefulChatClient
- chatThreadClient
- ChatThreadClient
返回
createDefaultTeamsCallingHandlers(StatefulCallClient, TeamsCallAgent, StatefulDeviceManager, TeamsCall, { onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>, onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency> })
为 teams 呼叫创建 TeamsCallingHandlers 的默认实现。
实现利用从此库导出的提供程序的自定义组件时非常有用。
function createDefaultTeamsCallingHandlers(callClient: StatefulCallClient, callAgent?: TeamsCallAgent, deviceManager?: StatefulDeviceManager, call?: TeamsCall, options?: { onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>, onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency> }): TeamsCallingHandlers
参数
- callClient
- StatefulCallClient
- callAgent
- TeamsCallAgent
- deviceManager
- StatefulDeviceManager
- call
- TeamsCall
- options
-
{ onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>, onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency> }
返回
createStatefulCallClient(StatefulCallClientArgs, StatefulCallClientOptions)
通过使用 ProxyCallClient 代理 CallClient <xref:%40azure%2Fcommunication-calling%23CallClient> 来创建 StatefulCallClient <xref:ProxyCallClient>,然后允许以声明性方式访问状态。
请务必使用从 StatefulCallClient 获取的 <xref:%40azure%2Fcommunication-calling%23DeviceManager> 和 <xref:%40azure%2Fcommunication-calling%23CallAgent> 和 <xref:%40azure%2Fcommunication-calling%23Call>(等),以便正确代理其状态更改。
function createStatefulCallClient(args: StatefulCallClientArgs, options?: StatefulCallClientOptions): StatefulCallClient
参数
返回
createStatefulChatClient(StatefulChatClientArgs, StatefulChatClientOptions)
通过使用 ProxyChatClient 代理 ChatClient 创建有状态 ChatClient StatefulChatClient <xref:ProxyChatClient>,然后允许以声明性方式访问状态。
function createStatefulChatClient(args: StatefulChatClientArgs, options?: StatefulChatClientOptions): StatefulChatClient
参数
- options
- StatefulChatClientOptions
返回
createTeamsCallAdapter(TeamsCallAdapterArgs)
function createTeamsCallAdapter(args: TeamsCallAdapterArgs): Promise<TeamsCallAdapter>
参数
- args
- TeamsCallAdapterArgs
返回
Promise<TeamsCallAdapter>
createTeamsCallAdapterFromClient(StatefulCallClient, TeamsCallAgent, CallAdapterLocator, CommonCallAdapterOptions)
使用提供的 StatefulCallClient 创建 TeamsCallAdapter。
如果要保留对 StatefulCallClient的引用,则很有用。 请考虑为更简单的 API 使用 createAzureCommunicationCallAdapter。
function createTeamsCallAdapterFromClient(callClient: StatefulCallClient, callAgent: TeamsCallAgent, locator: CallAdapterLocator, options?: CommonCallAdapterOptions): Promise<TeamsCallAdapter>
参数
- callClient
- StatefulCallClient
- callAgent
- TeamsCallAgent
- locator
- CallAdapterLocator
- options
- CommonCallAdapterOptions
返回
Promise<TeamsCallAdapter>
fromFlatCommunicationIdentifier(string)
到FlatCommunicationIdentifier的反向作。
function fromFlatCommunicationIdentifier(id: string): CommunicationIdentifier
参数
- id
-
string
返回
getCallingSelector<Component>(Component)
获取指定组件的选择器。
实现利用从此库导出的提供程序的自定义组件时非常有用。
function getCallingSelector<Component>(component: Component): GetCallingSelector<Component>
参数
- component
-
Component
返回
GetCallingSelector<Component>
getChatSelector<Component>(Component)
获取指定组件的选择器。
实现利用从此库导出的提供程序的自定义组件时非常有用。
function getChatSelector<Component>(component: Component): GetChatSelector<Component>
参数
- component
-
Component
返回
GetChatSelector<Component>
loadCallComposite(CallCompositeLoaderProps, HTMLElement)
Loader 函数,用于可在应用程序中使用的 CallComposite。 此函数会将 CallComposite 加载到提供的 HTML 元素中。 最好的用例是在不是基于 React 的 Node UI 框架中。
function loadCallComposite(loaderArgs: CallCompositeLoaderProps, htmlElement: HTMLElement): Promise<undefined | CallAdapter>
参数
- loaderArgs
- CallCompositeLoaderProps
- htmlElement
-
HTMLElement
返回
Promise<undefined | CallAdapter>
loadCallWithChatComposite(CallWithChatCompositeLoaderProps, HTMLElement)
可在应用程序中使用的 CallWithChatComposite 的 props。 此函数会将 CallWithChatComposite 加载到提供的 HTML 元素中。 最好的用例是在不是基于 React 的 Node UI 框架中。
function loadCallWithChatComposite(loaderArgs: CallWithChatCompositeLoaderProps, htmlElement: HTMLElement): Promise<undefined | CallWithChatAdapter>
参数
- loaderArgs
- CallWithChatCompositeLoaderProps
- htmlElement
-
HTMLElement
返回
Promise<undefined | CallWithChatAdapter>
loadChatComposite(ChatCompositeLoaderProps, HTMLElement)
Loader 函数。 此函数会将 ChatComposite 加载到提供的 HTML 元素中。 最好的用例是在不是基于 React 的 Node UI 框架中。
function loadChatComposite(loaderArgs: ChatCompositeLoaderProps, htmlElement: HTMLElement): Promise<undefined | ChatAdapter>
参数
- loaderArgs
- ChatCompositeLoaderProps
- htmlElement
-
HTMLElement
返回
Promise<undefined | ChatAdapter>
loadOutboundCallComposite(OutboundCallCompositeLoaderProps, HTMLElement)
Loader 函数。 此函数会将 CallComposite 加载到提供的 HTML 元素中以进行出站调用。 最好的用例是在不是基于 React 的 Node UI 框架中。
function loadOutboundCallComposite(loaderArgs: OutboundCallCompositeLoaderProps, htmlElement: HTMLElement): Promise<undefined | CallAdapter>
参数
- loaderArgs
- OutboundCallCompositeLoaderProps
- htmlElement
-
HTMLElement
返回
Promise<undefined | CallAdapter>
onResolveDeepNoiseSuppressionDependency()
使用延迟加载的视频背景效果的依赖项解析。
function onResolveDeepNoiseSuppressionDependency(): Promise<DeepNoiseSuppressionEffectDependency>
返回
Promise<DeepNoiseSuppressionEffectDependency>
onResolveDeepNoiseSuppressionDependencyLazy()
使用延迟加载的视频背景效果的依赖项解析。
function onResolveDeepNoiseSuppressionDependencyLazy(): Promise<DeepNoiseSuppressionEffectDependency>
返回
Promise<DeepNoiseSuppressionEffectDependency>
onResolveVideoEffectDependency()
视频背景效果的依赖项解析。
function onResolveVideoEffectDependency(): Promise<VideoBackgroundEffectsDependency>
返回
Promise<VideoBackgroundEffectsDependency>
onResolveVideoEffectDependencyLazy()
使用延迟加载的视频背景效果的依赖项解析。
function onResolveVideoEffectDependencyLazy(): Promise<VideoBackgroundEffectsDependency>
返回
Promise<VideoBackgroundEffectsDependency>
toFlatCommunicationIdentifier(CommunicationIdentifier)
<xref:%40azure%2Fcommunication-common%23CommunicationIdentifier>的字符串表示形式。
CommunicationIdentifier 的此字符串表示形式保证为唯一通信用户稳定。 因此
- 它可用于在外部数据库中保留用户的标识。
- 它可用作 Map 中的键,以存储用户的数据。
function toFlatCommunicationIdentifier(identifier: CommunicationIdentifier): string
参数
- identifier
- CommunicationIdentifier
返回
string
useAzureCommunicationCallAdapter(Partial<AzureCommunicationCallAdapterArgs | AzureCommunicationOutboundCallAdapterArgs>, (adapter: CallAdapter) => Promise<CallAdapter>, (adapter: CallAdapter) => Promise<void>)
一个自定义 React 挂钩,用于简化 CallAdapter的创建。
类似于 createAzureCommunicationCallAdapter,但需在内部异步创建适配器。
允许未定义参数,以便可以遵循挂钩规则,并在创建参数时传入参数。 仅当定义所有参数时,才会创建适配器。
请注意,必须记录参数,以避免在每个呈现上重新创建适配器。 有关典型使用示例,请参阅情景手册。
function useAzureCommunicationCallAdapter(args: Partial<AzureCommunicationCallAdapterArgs | AzureCommunicationOutboundCallAdapterArgs>, afterCreate?: (adapter: CallAdapter) => Promise<CallAdapter>, beforeDispose?: (adapter: CallAdapter) => Promise<void>): undefined | CallAdapter
参数
- afterCreate
-
(adapter: CallAdapter) => Promise<CallAdapter>
- beforeDispose
-
(adapter: CallAdapter) => Promise<void>
返回
undefined | CallAdapter
useAzureCommunicationCallWithChatAdapter(Partial<AzureCommunicationCallWithChatAdapterArgs>, (adapter: CallWithChatAdapter) => Promise<CallWithChatAdapter>, (adapter: CallWithChatAdapter) => Promise<void>)
一个自定义 React 挂钩,用于简化 CallWithChatAdapter的创建。
类似于 createAzureCommunicationCallWithChatAdapter,但需在内部异步创建适配器。
允许未定义参数,以便可以遵循挂钩规则,并在创建参数时传入参数。 仅当定义所有参数时,才会创建适配器。
请注意,必须记录参数,以避免在每个呈现上重新创建适配器。 有关典型使用示例,请参阅情景手册。
function useAzureCommunicationCallWithChatAdapter(args: Partial<AzureCommunicationCallWithChatAdapterArgs>, afterCreate?: (adapter: CallWithChatAdapter) => Promise<CallWithChatAdapter>, beforeDispose?: (adapter: CallWithChatAdapter) => Promise<void>): undefined | CallWithChatAdapter
参数
- args
- afterCreate
-
(adapter: CallWithChatAdapter) => Promise<CallWithChatAdapter>
- beforeDispose
-
(adapter: CallWithChatAdapter) => Promise<void>
返回
undefined | CallWithChatAdapter
useAzureCommunicationChatAdapter(Partial<AzureCommunicationChatAdapterArgs>, (adapter: ChatAdapter) => Promise<ChatAdapter>, (adapter: ChatAdapter) => Promise<void>)
一个自定义 React 挂钩,用于简化 ChatAdapter的创建。
类似于 createAzureCommunicationChatAdapter,但需在内部处理适配器的异步创建。
允许未定义参数,以便可以遵循挂钩规则,并在创建参数时传入参数。 仅当定义所有参数时,才会创建适配器。
请注意,必须记录参数,以避免在每个呈现上重新创建适配器。 有关典型使用示例,请参阅情景手册。
function useAzureCommunicationChatAdapter(args: Partial<AzureCommunicationChatAdapterArgs>, afterCreate?: (adapter: ChatAdapter) => Promise<ChatAdapter>, beforeDispose?: (adapter: ChatAdapter) => Promise<void>): undefined | ChatAdapter
参数
- args
-
Partial<AzureCommunicationChatAdapterArgs>
- afterCreate
-
(adapter: ChatAdapter) => Promise<ChatAdapter>
- beforeDispose
-
(adapter: ChatAdapter) => Promise<void>
返回
undefined | ChatAdapter
useCall()
挂钩从提供程序获取 <xref:%40azure%2Fcommunication-calling%23Call>。
实现利用从此库导出的提供程序的自定义组件时非常有用。
以前必须使用 CallProvider 和 Call 对象才能使用此挂钩
function useCall(): undefined | Call
返回
undefined | Call
useCallAgent()
挂钩从提供程序获取 <xref:%40azure%2Fcommunication-calling%23CallAgent>。
实现利用从此库导出的提供程序的自定义组件时非常有用。
function useCallAgent(): undefined | CallAgent
返回
undefined | CallAgent
useCallClient()
挂钩从提供程序获取 StatefulCallClient。
实现利用从此库导出的提供程序的自定义组件时非常有用。
function useCallClient(): StatefulCallClient
返回
useChatClient()
挂钩从提供程序获取 StatefulChatClient。
实现利用从此库导出的提供程序的自定义组件时非常有用。
function useChatClient(): StatefulChatClient
返回
useChatThreadClient()
挂钩从提供程序获取 <xref:%40azure%2Fcommunication-chat%23ChatThreadClient>。
实现利用从此库导出的提供程序的自定义组件时非常有用。
function useChatThreadClient(): ChatThreadClient
返回
useDeviceManager()
挂钩从提供程序获取 StatefulDeviceManager。
实现利用从此库导出的提供程序的自定义组件时非常有用。
function useDeviceManager(): undefined | StatefulDeviceManager
返回
undefined | StatefulDeviceManager
usePropsFor<Component>(Component, "chat" | "calling")
从此库获取 React 组件所需的所有挂钩的主要挂钩。
若要调用此挂钩,组件需要包装在这些提供程序下:
对于聊天组件:ChatClientProvider 和 ChatThreadClientProvider。
对于呼叫组件:CallClientProvider、CallAgentProvider 和 CallAgentProvider。
组件的最直接用法如下所示:
示例
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>
参数
- component
-
Component
- type
-
"chat" | "calling"
返回
ComponentProps<Component>
useSelector<ParamT>(ParamT, (ParamT extends Selector ? Parameters<ParamT>[1] : undefined), "chat" | "calling")
挂钩以获取指定组件的选择器。
实现利用从此库导出的提供程序的自定义组件时非常有用。
function useSelector<ParamT>(selector: ParamT, selectorProps?: (ParamT extends Selector ? Parameters<ParamT>[1] : undefined), type?: "chat" | "calling"): (ParamT extends Selector ? ReturnType<ParamT> : undefined)
参数
- selector
-
ParamT
- selectorProps
-
(ParamT extends Selector ? Parameters<ParamT>[1] : undefined)
- type
-
"chat" | "calling"
返回
(ParamT extends Selector ? ReturnType<ParamT> : undefined)
useTeamsCall()
挂钩从提供程序获取 <xref:%40azure%2Fcommunication-calling%23TeamsCall>。
实现利用从此库导出的提供程序的自定义组件时非常有用。
您必须之前将 CallProvider 与 TeamsCall 对象一起使用才能使用此挂钩
function useTeamsCall(): undefined | TeamsCall
返回
undefined | TeamsCall
useTeamsCallAdapter(Partial<TeamsCallAdapterArgs>, (adapter: TeamsCallAdapter) => Promise<TeamsCallAdapter>, (adapter: TeamsCallAdapter) => Promise<void>)
自定义 React 挂钩,用于简化 TeamsCallAdapter 的创建。
与 <xref:createTeamsAzureCommunicationCallAdapter>类似,但负责在内部异步创建适配器。
允许未定义参数,以便可以遵循挂钩规则,并在创建参数时传入参数。 仅当定义所有参数时,才会创建适配器。
请注意,必须记录参数,以避免在每个呈现上重新创建适配器。 有关典型使用示例,请参阅情景手册。
function useTeamsCallAdapter(args: Partial<TeamsCallAdapterArgs>, afterCreate?: (adapter: TeamsCallAdapter) => Promise<TeamsCallAdapter>, beforeDispose?: (adapter: TeamsCallAdapter) => Promise<void>): undefined | TeamsCallAdapter
参数
- args
-
Partial<TeamsCallAdapterArgs>
- afterCreate
-
(adapter: TeamsCallAdapter) => Promise<TeamsCallAdapter>
- beforeDispose
-
(adapter: TeamsCallAdapter) => Promise<void>
返回
undefined | TeamsCallAdapter
useTeamsCallAgent()
挂钩从提供程序获取 <xref:%40azure%2Fcommunication-calling%23TeamsCallAgent>。
实现利用从此库导出的提供程序的自定义组件时非常有用。
function useTeamsCallAgent(): undefined | TeamsCallAgent
返回
undefined | TeamsCallAgent
useTheme()
用于访问主题的 React 挂钩
function useTheme(): Theme
返回
Theme