Skip to main content

Livestream Objects and 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: The peer ID of the user who requested to join the stage.
  2. userId: The user ID of the user who requested to join the stage.
  3. displayName: 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 control 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.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.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();