Setting Up Live Streaming

To see the live view the user will have to create a LiveStreamClient object. Which will initialize the live view and start the streaming to a player that can be fetched from the newly created object.


Initiating a Live Stream Connection

To create a LiveStreamClient you will need

  • device (required): The Device object of the camera you want to stream from.
  • streamType (optional): Whether to request the MAINSTREAM or SUBSTREAM resolution. Defaults to StreamType.MAINSTREAM.
  • autoDisconnectAfter (optional): Milliseconds of inactivity after which the stream auto-disconnects. Defaults to 0L (disabled).

You can create an object likewise:

val client = LiveStreamClient(
  device = device,
)

This site uses Just the Docs, a documentation theme for Jekyll.