Stage Host Controls
In a stage management-enabled meeting, a user with the permissions.host.canAcceptStageRequests permission set to true is
considered a host. The meeting.stage object in RealtimeKit's iOS Core SDK provides stage management APIs that allow hosts to
manage stage access requests, invite participants to the stage, and remove participants from the stage.
List of Stage Access Requests
You can retrieve the list of pending stage access requests by accessing the meeting.stage.accessRequests property. This property
provides a list of RtkRemoteParticipant objects who have requested stage access.
Note: If the local user is not a host, this property returns an empty list.
Grant Access
To accept stage access requests or allow a participant directly to the stage, use the grantAccess() method.
It takes a list of userIds of participants.
// Grant stage access to a single participant
let userId = meeting.stage.accessRequests[0].userId
meeting.stage.grantAccess(userIds: [userId])
// Grant stage access to all pending stage access requests
meeting.stage.grantAccess(userIds: meeting.stage.accessRequests.map { $0.userId })
Deny Access
To reject stage access requests, use the denyAccess() method. It takes a list of userIds of participants.
// Deny stage access request of a single participant
let userId = meeting.stage.accessRequests[0].userId
meeting.stage.denyAccess(userIds: [userId])
// Deny all pending stage access requests
meeting.stage.denyAccess(userIds: meeting.stage.accessRequests.map { $0.userId })
Kick Users
You can remove a participant from the stage by using the kick() method. It takes a list of userIds of participants.
// Kick a participant from stage
let userId = meeting.participants.active[0].userId
meeting.stage.kick(userIds: [userId])
Listening to Stage Access Requests
You can listen to incoming stage access requests or changes in the access requests list if you are a host. The SDK provides the
following callbacks to RtkStageEventListener:
extension WebinarViewModel: RtkStageEventListener {
func onNewStageAccessRequest(participant: RtkRemoteParticipant) {
// Called when a new stage access request is received from a participant.
}
func onStageAccessRequestsUpdated(accessRequests: [RtkRemoteParticipant]) {
// Called when the list of stage access requests is updated.
}
}
These APIs enable you to manage stage access requests and participants effectively in RealtimeKit meetings. Next, we'll explore the Stage APIs available to Viewer participants.