Skip to content

Multi Stream Video Pinning

adamrangs edited this page Aug 24, 2022 · 1 revision

Multi-stream - Pin Stream

With the pin stream feature, you can pin any participant in the meeting and that stream will not change when the stream user speaks and it will also not get replaced with the user in the queue when the queue user speaks.

NOTE: The below new APIs are available from SDK version 3.6.0 onwards.

  • The pinning feature comes under Category-C APIs.
  • The pin stream will not come to the active speaker stage.

Typical Scenario

In a meeting with more than two participants, if you want to see the active speaker along with other joined participants, you can use multi-stream to achieve it.

How to Use

This is the continuation of New Multi Stream v3 wiki page.

1. setMediaStreamCategoryC

If a pinned stream for the participant with participantId already exists, update the stream with the specified parameters. Otherwise, add a pinned stream for this participantId.

    fun setMediaStreamCategoryC(participantId: String, quality: MediaStreamQuality)
enum MediaStreamQuality {
    case Undefined
    case LD  // 180p
    case SD  // 360p
    case HD  // 720p
    case FHD // 1080p
}

2. removeMediaStreamCategoryC

Remove the stream of pinned participant.

    fun removeMediaStreamCategoryC(participantId: String)

3. isMediaStreamsPinningSupported

Return True if the pinning is supported for the media streams.

    var isMediaStreamsPinningSupported : Boolean

4. OnMediaStreamInfoChanged Listener

We support different event types - MediaStreamChangeEventType. If any of the types changes concerning the stream, the event will get triggered.

 enum MediaStreamChangeEventType {
    case Size
    case Membership
    case Video
    case Audio
    case PinState
}

The client can register the info change listener to receive the event change.

/stream.setOnMediaStreamInfoChanged { type, info in
                    //type: MediaStreamChangeEventType
                    //info: MediaStreamChangeEventInfo
                }