onStreamDisabled

Called when a media stream is disabled for this participant.

This callback is invoked when the participant turns off their microphone, webcam, or stops screen sharing. Use getKind to determine which stream was disabled.

Code Example:


override fun onStreamDisabled(stream: Stream) {
    if (stream.kind.equals("video", ignoreCase = true)) {
        val videoTrack = stream.track as VideoTrack
        videoTrack.removeSink(videoView)
    }
}

Parameters

stream

the Stream that was disabled

See also