Skip to main content
Version: 0.1.x

Pin Participants - Android

In any meeting with large number of participants, if you want to show only one or two participant(s) on main screen then you can pin that perticipants so that viewers can only focus upon that participants only.

This guide will provide an overview of how to pin or unpin any participants in a meeting.

note

pin() and unpin() functions will take string or null as an argument. Pin will be effective for both webcam and screenshare of that participant.

Suppose you want to pin or unpin only webcam of that participant then you can pass CAM, else if you want to pin or unpin only screenshare of that participant then you can pass SHARE.

You can also pass SHARE_AND_CAM if you want to pin or unpin both webcam and screenshare media of that user, or passing null or nothing as an argument will also work in the same way.

If any participant's webcam is pinned but not screenshare, then calling pin("SHARE") the new pinState of that participant will be { cam: true, share: true }.

Pin And Unpin a Participant

  // Pin both webcam and screenshare of that participant
meeting!!.participants[participantId].pin("SHARE_AND_CAM")

// Pin webcam of that participant
meeting!!.participants[participantId].pin("CAM")

// Pin screenshare of that participant
meeting!!.participants[participantId].pin("SHARE")

//
// Unpin both webcam and screenshare of that participant
meeting!!.participants[participantId].unpin("SHARE_AND_CAM");

// Unpin webcam of that participant
meeting!!.participants[participantId].unpin("CAM");

// Unpin screenshare of that participant
meeting!!.participants[participantId].unpin("SHARE");

onPinStateChanged Event

Whenever any participant got pinned or unpinned by any participant, onPinStateChanged event will be triggered.

 override fun onPinStateChanged(pinStateData: JSONObject?) {
Log.d("onPinStateChanged: ", pinStateData.getString("peerId")) // id of participant who were pinned
Log.d("onPinStateChanged: ", pinStateData.getJSONObject("state")) // { cam: true, share: true }
Log.d("onPinStateChanged: ", pinStateData.getString("pinnedBy")) // id of participant who pinned that participant
}

Got a Question? Ask us on discord