Documentation Index Fetch the complete documentation index at: https://cloudflaredoc.ubitools.com/realtime/llms.txt Use this file to discover all available pages before exploring further.
本站为社区维护的非官方中文翻译,与 Cloudflare, Inc. 无关联。本站不提供账户登录,请勿在任何非官方站点输入您的 Cloudflare 账户信息。官方文档:developers.cloudflare.com
const canEndSession = meeting.self.permissions.kickParticipant === true;if (!canEndSession) { // Disable the "End meeting/session" control in your UI. // You can also show a message to explain why the action is not available.}
const canEndSession = meeting.self.permissions.kickParticipant === true;if (!canEndSession) { // Disable the "End meeting/session" control in your UI. // You can also show a message to explain why the action is not available.}
const canEndSession = meeting.self.permissions.kickParticipant === true;if (!canEndSession) { // Disable the "End meeting/session" control in your UI. // You can also show a message to explain why the action is not available.}
val canEndSession = meeting.localUser.permissions.host.canKickParticipantif (!canEndSession) { // Disable the "End meeting/session" control in your UI. // You can also show a message to explain why the action is not available.}
let canEndSession = meeting.localUser.permissions.host.canKickParticipantif !canEndSession { // Disable the "End meeting/session" control in your UI. // You can also show a message to explain why the action is not available.}
const canEndSession = meeting.self.permissions.kickParticipant === true;if (!canEndSession) { // Disable the "End meeting/session" control in your UI. // You can also show a message to explain why the action is not available.}
try { await meeting.participants.kickAll();} catch (err) { if (err?.code === 1201) { // The participant does not have permission to end the session. // Update your UI to indicate that the action is not allowed. return; } throw err;}
try { await meeting.participants.kickAll();} catch (err) { if (err?.code === 1201) { // The participant does not have permission to end the session. // Update your UI to indicate that the action is not allowed. return; } throw err;}
try { await meeting.participants.kickAll();} catch (err) { if (err?.code === 1201) { // The participant does not have permission to end the session. // Update your UI to indicate that the action is not allowed. return; } throw err;}
如果参与者不具备所需的权限,kickAll() 将返回 HostError。
val error: HostError? = meeting.participants.kickAll()if (error != null) { when (error) { is HostError.KickPermissionDenied -> { // The participant does not have permission to end the session. // Update your UI to indicate that the action is not allowed. } }} else { // Successfully initiated session end}
如果参与者不具备所需的权限,kickAll() 将返回 HostError。
let error: HostError? = meeting.participants.kickAll()if let error = error { switch error { case .kickPermissionDenied: // The participant does not have permission to end the session. // Update your UI to indicate that the action is not allowed. break default: break }} else { // Successfully initiated session end}
try { await meeting.participants.kickAll();} catch (err) { if (err?.code === 1201) { // The participant does not have permission to end the session. // Update your UI to indicate that the action is not allowed. return; } throw err;}
监听会话结束事件。
当会话结束时,所有参与者都会离开会话。SDK 会触发 roomLeft 事件,且 state 设置为 ended。
meeting.self.on("roomLeft", ({ state }) => { if (state === "ended") { // Update your UI to show that the meeting session has ended. }});
当会话结束时,所有参与者都会离开会话。SDK 会触发 roomLeft 事件,且 state 设置为 ended。
meeting.self.on("roomLeft", ({ state }) => { if (state === "ended") { // Update your UI to show that the meeting session has ended. }});
当会话结束时,所有参与者都会离开会话。SDK 会触发 roomLeft 事件,且 state 设置为 ended。
meeting.self.on("roomLeft", ({ state }) => { if (state === "ended") { // Update your UI to show that the meeting session has ended. }});
当会话结束时,所有参与者都会离开会话。您可以订阅事件监听器以处理会话结束。
meeting.addMeetingRoomEventListener(object : RtkMeetingRoomEventListener { override fun onMeetingEnded() { // Update your UI to show that the meeting session has ended. }})
当会话结束时,所有参与者都会离开会话。您可以订阅事件监听器以处理会话结束。
// Implement the delegate methodextension MeetingViewModel: RtkMeetingRoomEventListener { func onMeetingEnded() { // Update your UI to show that the meeting session has ended. }}meeting.addMeetingRoomEventListener(meetingRoomEventListener: self)
当会话结束时,所有参与者都会离开会话。SDK 会触发 roomLeft 事件,且 state 设置为 ended。
meeting.self.on("roomLeft", ({ state }) => { if (state === "ended") { // Update your UI to show that the meeting session has ended. }});