ParticipantEventListener

Abstract listener class for receiving participant-level events.

Override any of the callback methods in this class to handle specific participant events. Register the listener on a Participant instance using addEventListener.

All callbacks are invoked on the main (UI) thread.

Code Example:


participant.addEventListener(object : ParticipantEventListener() {
    override fun onStreamEnabled(stream: Stream) {
        if (stream.kind.equals("video", ignoreCase = true)) {
            val videoTrack = stream.track as VideoTrack
            videoTrack.addSink(videoView)
        }
    }

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

See also

Participant.removeEventListener()

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun onE2eeStateChanged(state: E2EEState, stream: Stream)
Called when the end-to-end encryption state changes for a stream from this participant.
Link copied to clipboard
Called when a media stream is disabled for this participant.
Link copied to clipboard
fun onStreamEnabled(stream: Stream)
Called when a new media stream is enabled for this participant.
Link copied to clipboard
fun onStreamPaused(kind: String, reason: String)
Called when a media stream from this participant is paused.
Link copied to clipboard
fun onStreamResumed(kind: String, reason: String)
Called when a previously paused media stream from this participant is resumed.