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 は state が ended の roomLeft イベントを発行します。
meeting.self.on("roomLeft", ({ state }) => { if (state === "ended") { // Update your UI to show that the meeting session has ended. }});
セッションが終了すると、全参加者がセッションから退出します。SDK は state が ended の roomLeft イベントを発行します。
meeting.self.on("roomLeft", ({ state }) => { if (state === "ended") { // Update your UI to show that the meeting session has ended. }});
セッションが終了すると、全参加者がセッションから退出します。SDK は state が ended の roomLeft イベントを発行します。
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 は state が ended の roomLeft イベントを発行します。
meeting.self.on("roomLeft", ({ state }) => { if (state === "ended") { // Update your UI to show that the meeting session has ended. }});