跳转到内容
本站为社区维护的非官方中文翻译,与 Cloudflare, Inc. 无关联。本站不提供账户登录,请勿在任何非官方站点输入您的 Cloudflare 账户信息。官方文档:developers.cloudflare.com

RtkNotificationConfig

最后更新 查看 MarkdownAgent 设置

用于控制会议中通知行为的配置类。 管理参与者加入/离开事件、聊天消息和投票的声音及吐司(toast)通知。

属性

属性 类型 必填 默认值 描述
participantJoined RtkNotification ❌ RtkNotification() 参与者加入事件的通知设置
participantLeft RtkNotification ❌ RtkNotification() 参与者离开事件的通知设置
newChatArrived RtkNotification ❌ RtkNotification() 新聊天消息的通知设置
newPollArrived RtkNotification ❌ RtkNotification() 新投票事件的通知设置

RtkNotification 属性

每个 RtkNotification 实例包含以下属性:

属性 类型 必填 默认值 描述
playSound Bool ❌ true 是否播放通知声音
showToast Bool ❌ true 是否显示吐司(toast)通知

使用示例

基本用法

import RealtimeKitUI

let rtkUI = RealtimeKitUI(meetingInfo: meetingInfo)
// Access the default notification config
let notificationConfig = rtkUI.notification

自定义通知

import RealtimeKitUI

let rtkUI = RealtimeKitUI(meetingInfo: meetingInfo)

// Disable sound for participant join events
rtkUI.notification.participantJoined.playSound = false

// Disable toast for chat messages
rtkUI.notification.newChatArrived.showToast = false

这篇文档对您有帮助吗?