BaseKeyProvider class

Default implementation of KeyProviderBase used for end-to-end encryption.

Keys are pushed straight into the native Android/iOS engine, which attaches a frame cryptor to every sender and receiver on join — so set them before joining. A shared key covers the whole room and wins over per-participant keys; a participant with neither stays plaintext.

Example

final BaseKeyProvider customKeyProvider = BaseKeyProvider();

// Set a shared key for all participants
await customKeyProvider.setSharedKey('my-secure-key');

VideoSDK.setKeyProvider(customKeyProvider);

// Set a key for a specific participant
await VideoSDK.setParticipantKey('participantId', 'participant-secret-key');

Constructors

BaseKeyProvider()
Creates an empty key provider. Add the key with setSharedKey, then pass it to VideoSDK.setKeyProvider before joining.

Properties

runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

removeKey(String participantId) → Future<void>
Removes participantId's key. On the installed provider this is the same as VideoSDK.setParticipantKey(participantId, null); on any other provider it does nothing.
setSharedKey(String key) → Future<void>
Sets a shared encryption key for all participants.