BaseKeyProvider

open class BaseKeyProvider : KeyProvider

The key provider apps use: it holds the keys in memory until VideoSDK.setKeyProvider reads them.

Set the shared key first, then pass the provider — setKeyProvider snapshots it at that moment. Per-participant keys, including on a live room, go through VideoSDK.setParticipantKey; removeKey drops one.

val keys = BaseKeyProvider().apply { setSharedKey("my-room-secret") }
VideoSDK.setKeyProvider(keys)

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

The shared-room key as UTF-8 bytes, or null if setSharedKey was never called.

Functions

Link copied to clipboard
open override fun removeKey(participantId: String)

Drops participantId's key. On the provider passed to VideoSDK.setKeyProvider this is VideoSDK.setParticipantKey with a null key and takes effect mid-call; on any other provider it only forgets the stored key.

Link copied to clipboard
open override fun setSharedKey(key: String)

Sets one key for the whole room; while it is set, per-participant keys are ignored. Read when the provider is passed to VideoSDK.setKeyProvider, so set it before that call.