Skip to main content

Manage Stage in Dyte's Meeting

In a meeting, both hosts and participants can manage the stage. This allows for seamless control and organization of the session.

Host stage management

In Dyte's meeting platform, hosts have the capability to request participants to join the stage. When a host sends a request to a participant, the participant will receive a callback in the DyteStageEventListener#onPresentRequestReceived() method. The participant can then choose to accept or decline the request using specific functions.

meeting.addStageEventsListener(object : DyteStageEventListener {
...
override fun onPresentRequestReceived() {
// when host requests any user to join stage, that user received this callback
}
...
})

To accept the request and join the stage, participants can utilize the following command:

meeting.stage.join()

Alternatively, if participants wish to decline the request and not join the stage, use the following command:

meeting.stage.cancelRequestAccess()

Participant stage management

Participants with the "Accept requests" setting enabled in the Preset can manage the stage in the webinar.

Access the list of requests

To access the list of requests received to join the stage, you can utilize the meeting.stage.accessRequests API. This provides you with the necessary information about the participants who have requested to join the stage.

meeting.stage.accessRequests

Listen to the incoming requests

Once you are in the meeting, you can register a listener in the meeting object to listen for incoming requests.

meeting.addStageEventsListener(object : DyteStageEventsListener {
override fun onPresentRequestReceived() {
// when host requests this user to join stage. Here one should give choice to either accept the request or decline it.
}

override fun onAddedToStage() {
// when this user is joined to stage
}

override fun onRemovedFromStage() {
// when this user is no longer on stage
}

override fun onPresentRequestAdded(participant: DyteStageParticipant) {
// when a user is requesting to join the stage
}

override fun onPresentRequestClosed(participant: DyteStageParticipant) {
// when a user who was trying to join stage leaves the call.
}

override fun onPresentRequestAccepted(participant: DyteStageParticipant) {
// when a join stage request is accepted by host
}

override fun onPresentRequestRejected(participant: DyteStageParticipant) {
// when a join stage request is denied by host
}

override fun onPresentRequestWithdrawn(participant: DyteStageParticipant) {
// when a user who was trying to join stage withdraws their request to join.
}
})

Accept stage requests

To accept a request to join the stage, call the following function, where ids represents the list of unique identifier of the request.

meeting.stage.grantAccess(ids: List<String>)
// to deny all stage requests
meeting.stage.grantAccessAll()

Reject stage requests

To reject a request, call the following function:

meeting.stage.denyAccess(ids: List<String>)
// to deny all stage requests
meeting.stage.denyAccessAll()
note

It's important to note that if a participant doesn't have the permission to perform these operations, the SDK will throw an UnsupportedOperationException

Withdraw stage request

To withdraw a request to join the stage, call the following function:

meeting.stage.cancelRequestAccess()