Live JavaScript v1
Live JavaScript
Live
JavaScript
Home
/
Live
/
JavaScript

Overview

Sendbird Live SDK for JavaScript offers a variety of functionalities for hosting and watching live events. As a live event's host, a user can create, share their media stream, and use the chat to communicate with other users watching the live event. Users can enter a live event as participants to watch the live event and use the chat to communicate with the live event's host as well as other users.


Live event

A live event on Sendbird Live can be in the following four states, which are created, ready, ongoing, and ended. At every state, a live event's host and participants can each perform a select number of actions pertaining to the live event.

List of live event states

StateHostParticipant

Created

Host has created the live event. They can enter and exit without ending the live event. In this state, the host can also start and stop streaming and configure media settings.

Participants can't enter the live event.

Ready

Host is ready for participants to join. They can enter and exit without ending the live event. In this status, the host can also start and stop streaming and view their own media stream.

Participants can enter the live event and use the chat, but can't receive the host's media stream yet.

Ongoing

Host can turn on or off media stream, update live event information, and exit without ending live event. When the host exits the live event, the host's media stream is suspended.

Participants can receive the host's media stream and use the chat. When the host exits the live event, participants are notified the host is temporarily unavailable. They can still send messages to the chat during this time.

Ended

Host has ended the live event.

Participants are notified that the live event has ended.


Host

A live event's host has the authority to create, enter, start, and end a live event as well as share their media stream during a live event. A host can exit without ending a live event. If the host doesn't return, one of the users selected to be a host can enter the live event as the new host to continue streaming.

The following is a list of functionalities available to a live event's host.

Functionalities for host

FunctionalityDescription

Create a live event

Creates a new live event.

Enter a live event

Enters a live event.

Check the settings of a live event

Configures media settings and can view media stream.

Change the state of a live event

Changes the live event state.

Start a live event

Starts a live event to allow participants to receive the host's media stream.

Display the host view

Allows the host to view their own media stream.

Manage media during a live event

Manages media settings during a live event.

End a live event

Ends a live event.

Leave the live event temporarily

Leaves without ending a live event.

Manage custom items

Manages additional information about a live event stored as custom items.


Participant

Users can watch a live event by entering the live event as participants. Participants can send messages to the chat and leave at anytime during the live event.

The following is a list of functionalities available to a live event's participants.

Functionalities for participant

FunctionalityDescription

List live events

Retrieves a list of all ongoing live events.

Enter a live event

Enters a live event.

Receive events on a live event

Participants can stay informed of any changes in a live event.

Leave a live event

Leaves a live event.