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

Manage media during a live event

Copy link

Once a host starts a live event by calling startEvent(), the state changes to ongoing. While the live event is ongoing, the host can perform various actions to manage media such as turning on or off their audio and video, and switching the audio and video source.

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();