Skip to main content

Pinning participants

The StreamVideo SDK has support for pinning users, both locally for the current user, and remotely for everyone in the call. Every user can pin as many participants on the call as they want, and those users will be shown first in the list of participants for that user. Pinning someone for everyone in the call requires the pinForEveryone capability. By default, the pinned users appear first in the streamCall.SortedParticipants array. The ones which are pinned remotely appear before the local ones. If there are several remotely pinned users, they are sorted by the pinning date (the most recent pins appear first).

Local pins

In order to pin a user locally:

streamCall.PinLocally(participant);

To unpin the user:

streamCall.UnpinLocally(participant);

In both examples, the participant is an object of type IStreamVideoCallParticipant.

To get all pinned participants:

foreach (var pinnedParticipant in streamCall.PinnedParticipants)
{
// Iterate through pinned participants
}

You can check if the participant is pinned either locally or remotely by:

var isPinned = streamCall.IsPinnedLocally(participant);

Or to distinguish whether the participant is pinned locally or remotely you can more specific versions:

var isPinnedLocally = streamCall.IsPinnedLocally(participant);
var isPinnedRemotely = streamCall.IsPinnedRemotely(participant);

Did you find this page helpful?