Participant Event Listener
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)
}
}
})
Content copied to clipboard
See also
Participant.removeEventListener()
Functions
Link copied to clipboard
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
Called when a new media stream is enabled for this participant.
Link copied to clipboard
Called when a media stream from this participant is paused.
Link copied to clipboard
Called when a previously paused media stream from this participant is resumed.