Stage Access for Viewers
Viewer participants in a stage-enabled meeting are users whose preset permission for media production is set as CAN_REQUEST
.
The meeting.stage
object provides APIs for viewer participants to request stage access and withdraw their join stage request.
Request Access
To request access to the stage, you can call the requestAccess()
method:
meeting.stage.requestAccess()
When a host accepts the user's stage access request or allows the user directly to the stage, the SDK triggers the
onStageAccessRequestAccepted
callback and if the host rejects the request, the SDK triggers the onStageAccessRequestRejected
callback. You can listen to these events by adding a DyteStageEventListener
:
meeting.addStageEventListener(object : DyteStageEventListener {
override fun onStageAccessRequestAccepted() {
// Host accepted the join stage request or invited user directly to stage
}
override fun onStageAccessRequestRejected() {
// Host rejected the join stage request
}
})
You can then call the join()
method to finally join the stage.
Note: If the host has directly allowed the user to join the stage and they want to decline, you should use the leave()
method.
Cancel Access Request
To cancel or withdraw a pending stage access request, you can call the cancelRequestAccess()
method:
meeting.stage.cancelRequestAccess()