99
1010_ Below documentation is relevant for Interactive Livestream(LHLS) and Webinar(WebRTC) use cases._
1111
12- Instead of a traditional publish-subscribe model, where a user can publish their media and others can choose to subscribe, Dyte
13- comes with an optional managed configuration. In this managed configuration, a less privileged user can be configured with a
14- default behavior to not publish media. The user can then request permission to publish their media, which a privileged user can
12+ Instead of a traditional publish-subscribe model, where a user can publish their media and others can choose to subscribe, Dyte
13+ comes with an optional managed configuration. In this managed configuration, a less privileged user can be configured with a
14+ default behavior to not publish media. The user can then request permission to publish their media, which a privileged user can
1515choose to grant or deny.
1616
1717### Accessing the Stage APIs
@@ -21,27 +21,25 @@ permissions, and kicking participants from the stage. These APIs are accessible
2121
2222### Stage Status
2323
24- In meetings where stage management is enabled, a user's stage status can change within the values represented by the ` DyteStageStatus `
24+ In meetings where stage management is enabled, a user's stage status can change within the values represented by the ` StageStatus `
2525enum. These status values include:
2626
2727- ` ON_STAGE ` : Indicates that the user is currently on the stage and is allowed to publish media.
2828- ` OFF_STAGE ` : Indicates that the user is a viewer and is not on the stage. They can see and listen to those on stage.
29- - ` REQUESTED_TO_JOIN_STAGE ` : Indicates that the user has a pending request to join the stage. This status is assigned to the user
29+ - ` REQUESTED_TO_JOIN_STAGE ` : Indicates that the user has a pending request to join the stage. This status is assigned to the user
3030until the host accepts or rejects their request.
3131- ` ACCEPTED_TO_JOIN_STAGE ` : Indicates that the host has accepted the user's request to join the stage.
32- - ` REJECTED_TO_JOIN_STAGE ` : Indicates that the host has rejected the user's request to join the stage. The user can request again
33- to join from this status.
3432
35- The ` meeting.stage.status ` property provides the current stage status of the local user.
33+ The ` meeting.stage.stageStatus ` property provides the current stage status of the local user.
3634
3735### Viewers
3836
39- You can retrieve a list of off-stage participants (viewers) in a stage-enabled meeting by accessing the ` meeting.stage.viewers `
40- property. This property provides a list of ` DyteJoinedMeetingParticipant ` objects whose stage status is not ` ON_STAGE ` .
37+ You can retrieve a list of off-stage participants (viewers) in a stage-enabled meeting by accessing the ` meeting.stage.viewers `
38+ property. This property provides a list of ` DyteRemoteParticipant ` objects whose stage status is not ` ON_STAGE ` .
4139
4240### Joining the Stage
4341
44- To interact with peers and publish media, users can join the stage. This action is only possible if the user's preset allows them
42+ To interact with peers and publish media, users can join the stage. This action is only possible if the user's preset allows them
4543to publish media or if their request to join the stage has been accepted by a host (i.e., their stage status is ` ACCEPTED_TO_JOIN_STAGE ` ).
4644
4745``` kotlin
@@ -50,73 +48,62 @@ meeting.stage.join()
5048
5149### Leaving the Stage
5250
53- When users want to stop interacting with peers, they can leave the stage. This action stops their media from being published,
51+ When users want to stop interacting with peers, they can leave the stage. This action stops their media from being published,
5452and their audio and video are no longer received by others in the room.
5553
5654``` kotlin
5755meeting.stage.leave()
5856```
5957
58+ ## Error types
59+
60+ All the stage management APIs can throw an error of type ` StageError ` . The error type can be one of the following:
61+
62+ - StageDisabledForMeetingType: The meeting type does not support stage management.
63+ - PermissionDenied: The user does not have the required permissions to perform the operation.
64+ - ActionInvalidForStageStatus: The operation is invalid for the current stage status.
65+ - NoRequestToCancel: There is no pending request to cancel.
66+
6067### List of Stage Events
6168
62- The ` DyteStageEventListener ` interface provides callback methods for various stage events. Implement these callbacks to handle
69+ The ` DyteStageEventListener ` interface provides callback methods for various stage events. Implement these callbacks to handle
6370stage-related events in your application:
6471
6572``` kotlin
6673meeting.addStageEventsListener(object : DyteStageEventListener {
67- override fun onPresentRequestReceived () {
68- // Called when the local user's stage access request is accepted by the host,
69- // or when the local user, who is a viewer, is invited to the stage by the host.
74+ override fun onStageAccessRequestAccepted () {
75+ // Called when the local user is accepted to join the stage.
7076 }
7177
72- override fun onAddedToStage () {
73- // Called when the local user successfully joins the stage.
78+ override fun onStageAccessRequestRejected () {
79+ // Called when the local user's request to join the stage is rejected by the host .
7480 }
7581
7682 override fun onRemovedFromStage () {
7783 // Called when the local user is removed from the stage.
7884 }
7985
80- override fun onPresentRequestAdded (participant : DyteJoinedMeetingParticipant ) {
81- // Called when a participant requests to join the stage. Triggered only if the local user is a host.
82- }
83-
84- override fun onPresentRequestClosed (participant : DyteJoinedMeetingParticipant ) {
85- // Called when a participant with a pending stage access request leaves the meeting.
86- // Triggered only if the local user is a host.
87- }
88-
89- override fun onPresentRequestRejected (participant : DyteJoinedMeetingParticipant ) {
90- // Called when a participant's stage access request is denied by the host.
91- // Triggered only if the local user is a host.
92- }
93-
94- override fun onPresentRequestWithdrawn (participant : DyteJoinedMeetingParticipant ) {
95- // Called when a participant cancels their stage access request.
96- // Triggered only if the local user is a host.
97- }
98-
99- override fun onParticipantRemovedFromStage (participant : DyteJoinedMeetingParticipant ) {
100- // Called when a participant is removed from the stage by the host.
86+ override fun onNewStageAccessRequest (participant : DyteRemoteParticipant ) {
87+ // Called when a new stage access request is received from a participant.
10188 }
10289
103- override fun onStageRequestsUpdated (accessRequests : List <DyteJoinedMeetingParticipant >) {
90+ override fun onStageAccessRequestsUpdated (accessRequests : List <DyteRemoteParticipant >) {
10491 // Called when the list of stage access requests is updated.
10592 }
10693
107- override fun onParticipantStartedPresenting (participant : DyteJoinedMeetingParticipant ) {
108- // Called when a participant joins the stage.
109- }
110-
111- override fun onParticipantStoppedPresenting (participant : DyteJoinedMeetingParticipant ) {
112- // Called when a participant leaves the stage.
94+ override fun onStageStatusUpdated (oldStatus : StageStatus , newStatus : StageStatus ) {}
95+ // Called when the local user's stage status is updated.
11396 }
11497
115- override fun onStageStatusUpdated (stageStatus : DyteStageStatus ) {
116- // Called when the local user's stage status is updated.
98+ override fun onPeerStageStatusUpdated (
99+ participant : DyteRemoteParticipant ,
100+ oldStatus : StageStatus ,
101+ newStatus : StageStatus ,
102+ ) {
103+ // Called when a participant's stage status is updated.
117104 }
118105})
119- ```
106+ ```
120107
121108Next, we'll explore the Stage Management APIs for hosts, allowing them to manage stage requests, participants in Dyte meetings.
122109
0 commit comments