setSharedKey method
Sets a shared encryption key for all participants.
The engine reads the shared key at join. Changing it during a call does
not re-key the running session; it takes effect on the next join. To
rotate keys mid-call, use per-participant keys with VideoSDK.setParticipantKey and no
shared key: once set, the shared key takes precedence over them and
cannot be removed.
- This method configures a shared key provider that uses the same encryption key across all participants in the room.
Parameters
key: A UTF-8 string representing the shared encryption key.
Example
await customKeyProvider.setSharedKey('shared-secret-key');
Throws
- ArgumentError — when
keyis empty.
Implementation
@override
Future<void> setSharedKey(String key) => _setSharedKey(key);