Skip to main content

Livestream objects & methods

DyteLivestream object obtained by dyteMobileClient.livestream method. The objects and methods it contains are defined below.

Objects​

roomName [String]​

The name of the room.

state [LiveStreamState]​

The current status of the livestream, possible values can be:

  • LiveStreamState.NONE
  • LiveStreamState.STARTING
  • LiveStreamState.STARTED
  • LiveStreamState.STOPPING
  • LiveStreamState.STOPPED
  • LiveStreamState.ERRORED

stage requests [List&ltDyteLiveStreamStageRequestPeer&gt]​

object accessed via dyteMobileClient.livestream.stageRequestPeers contains the list of requests to join the stage. Each request contains 3 properties:

  1. peerId: [String] The peerId of the user who requested to join the stage.
  2. userId: [String] The userId of the user who requested to join the stage.
  3. displayName: [String] The display name of the user who requested to join the stage.

liveStreamUrl [String]​

List of URL which can be used to consume livestream.

Host Controls Methods​

Dyte's stage management APIs allow hosts to receive and manage stage requests as well as leave and join the stage.

Accept request​

This method lets the host accept a request to join the stage. It takes the DyteLiveStreamStageRequestPeer.id as an argument whose request has to be accepted.

dyteMobileClient.livestream.acceptRequest(peer: peer.id);

Reject request​

This method lets the host reject a request to join the stage. It takes the DyteLiveStreamStageRequestPeer.id as an argument whose request has to be rejected.

dyteMobileClient.livestream.rejectRequest(peer: peer.id);

Accept all requests​

This method lets the host accept all the requests to join the stage.

dyteMobileClient.livestream.acceptAll();

Reject all requests​

This method lets the host reject all the requests to join the stage.

dyteMobileClient.livestream.rejectAll();