Live SDKs JavaScript v1
Live SDKs JavaScript
Live SDKs
JavaScript
Version 1

Manage media during a live event

Copy link

Once one of the hosts starts the live event by calling the startEvent() method, the state changes to ongoing. While the live event is ongoing, the hosts in the event can perform various actions to manage media such as turning on or off their audio and video, and switching the audio and video sources.

liveEvent.muteAudioInput();

// The user must be a host in order to control the media of the live event.
if (liveEvent.myRole !== LiveEventRole.HOST){
    return;
}

// Mute audio input.
liveEvent.muteAudioInput();

// Unmute audio input.
liveEvent.unmuteAudioInput()

// Start video.
liveEvent.startVideo();

// Stop video.
liveEvent.stopVideo();