Participant

Represents a participant in a Meeting.

A Participant can be either a local participant (the current user) or a remote participant. Each participant has an id, display name, mode, and a set of media Streams (audio, video, screen-share).

Use addEventListener to listen for stream and state-change events on this participant.

Obtaining a Participant:

Code Example:


// Listen for stream events on a remote participant
participant.addEventListener(object : ParticipantEventListener() {
    override fun onStreamEnabled(stream: Stream) {
        if (stream.kind.equals("video", ignoreCase = true)) {
            // Attach video track to a VideoView
        }
    }

    override fun onStreamDisabled(stream: Stream) {
        if (stream.kind.equals("video", ignoreCase = true)) {
            // Detach video track
        }
    }
})

See also

Properties

Link copied to clipboard
The display name of this participant, set when joining the meeting.
Link copied to clipboard
val id: String
The unique identifier of this participant, assigned by the server.
Link copied to clipboard
Whether this participant is the local participant (current user).
Link copied to clipboard
Custom metadata associated with this participant as a JSON object.
Link copied to clipboard
The current mode of this participant (e.g.
Link copied to clipboard
The current video quality setting for this participant ("high", "med", or "low").
Link copied to clipboard
A map of all active media streams for this participant, keyed by stream ID.

Functions

Link copied to clipboard
This method can be used to register a ParticipantEventListener on this participant to receive callbacks for stream and state-change events.
Link copied to clipboard

fun captureImage(height: Int, width: Int, listener: TaskCompletionListener<String, String>)
This method can be used to capture a snapshot image from the local participant's webcam.
Link copied to clipboard
This method can be used to request a remote participant to disable their microphone.
Link copied to clipboard
This method can be used to request a remote participant to disable their webcam.
Link copied to clipboard
fun enableMic()
This method can be used to request a remote participant to enable their microphone.
Link copied to clipboard
This method can be used to request a remote participant to enable their webcam.
Link copied to clipboard
This method can be used to get the audio statistics for this participant.
Link copied to clipboard
This method can be used to get the screen-share statistics for this participant.
Link copied to clipboard
This method can be used to get the video statistics for this participant.
Link copied to clipboard
@Async
fun pin(type: String)
This method can be used to pin this participant's camera and/or screen-share stream.
Link copied to clipboard
fun remove()
This method can be used to remove a remote participant from the meeting.
Link copied to clipboard
This method can be used to remove all registered ParticipantEventListeners from this participant.
Link copied to clipboard
This method can be used to unregister a previously added ParticipantEventListener.
Link copied to clipboard
fun setViewPort(width: Int, height: Int)
This method can be used to set the viewport dimensions for adaptive video quality.
Link copied to clipboard
@Async
fun unpin(type: String)
This method can be used to unpin this participant's camera and/or screen-share stream.