Live Android v1
Live Android
Live
Android
Home
/
Live
/
Android
/
SDK

Manage media during a live event

Once the host starts the live event by calling the startEvent() method, 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() { /* it: SendbirdException */
   if (it != null) {
       return
   }
}

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

// Mute audio input.
liveEvent.muteAudioInput() { /* it: SendbirdException */
   if (it != null) {
       return
   }
}

// Unmute audio input.
liveEvent.unmuteAudioInput() { /* it: SendbirdException */
   if (it != null) {
       return
   }
}

// Start video.
liveEvent.startVideo() { /* it: SendbirdException */
   if (it != null) {
       return
   }
}

// Stop video.
liveEvent.stopVideo() { /* it: SendbirdException */
   if (it != null) {
       return
   }
}

// Switch to a different camera.
liveEvent.switchCamera() { /* it: SendbirdException */
   if (it != null) {
       return
   }
}