Skip to main content

Stage Host Controls

In a stage management-enabled meeting, a user with the permissions.host.canAcceptStageRequests permission as true is considered a host. The meeting.stage object in RealtimeKit's Android 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
val userId = meeting.stage.accessRequests[0].userId
meeting.stage.grantAccess(listOf(userId))

// Grant stage access to all pending stage access requests
meeting.stage.grantAccess(meeting.stage.accessRequests.map { it.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
val userId = meeting.stage.accessRequests[0].userId
meeting.stage.denyAccess(listOf(userId))

// Deny all pending stage access requests
meeting.stage.denyAccess(meeting.stage.accessRequests.map { it.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
val userId = meeting.participants.active[0].userId
meeting.stage.kick(listOf(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:

meeting.addStageEventListener(object : RtkStageEventListener {
override fun onNewStageAccessRequest(participant: RtkRemoteParticipant) {
// Called when a new stage access request is received from a participant.
}

override fun onStageAccessRequestsUpdated(accessRequests: List<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.