Create a live event
The first step is to configure the live event by providing a LiveEventParams
object. You can provide some basic information related to the event such as the type of the live event, title, and the cover image that would show on the thumbnail. If not specified, the live event ID will show as the title and the thumbnail will show as black.
When creating a live event, you need to provide the hostType
to specify the type of a live event. The supported features of an event will vary depending on the live event type. The hostType
of the event can't be changed once the event is created. For instance, if you wish to transition from an audio-only event to an event with both audio and video, a brand new live event must be created.
Once you have configured the LiveEvent
object, you can create a live event by calling the createLiveEvent()
method. If the creation was successful, a liveEvent
instance is returned, the status of the live event changes to created
and an open channel will be available in which the host can chat.
To start a live event, you need a host for each live event. For users to enter the live event as a host, you need to provide the user ID of users to be candidates for the live event in the userIdsForHost
property. Up to ten users can be set as host candidates and only one user at a time can act as a host for the live event. When an incumbent host exits the live event, any other users specified in userIdsForHost
can enter the live event and act as a host.
In case the open channel isn’t available, call fetchOpenChannel()
to fetch the open channel.