on Media Status Changed
Called when this participant turns their microphone, camera or screen share on or off, whether or not this device receives it. Fired on the main thread.
In a room joined with createRoom(autoConsume = false) it is the cue to call Participant.consumeMicStreams or Participant.consumeWebcamStreams: onStreamEnabled only fires for media this device receives.
Code Example:
participant.addEventListener(object : ParticipantEventListener() {
override fun onMediaStatusChanged(participantId: String, kind: MediaType, newStatus: Boolean) {
if (kind == MediaType.VIDEO && newStatus) {
lifecycleScope.launch { participant.consumeWebcamStreams() }
}
}
})Content copied to clipboard
Parameters
participant Id
the participant whose media changed.
kind
which media changed.
new Status
true when it was turned on.