setSharedKey
Sets the key used for every participant that has no per-user key, including your own outgoing media. Use this when everyone in the call shares one passphrase-derived key.
Safe to call during a call to rotate keys: write the new key to the next index, and peers that still hold the old index can decode frames that were already in flight.
Parameters
keyIndex
Slot to write to.
key
Raw key bytes, sized for algorithm — 16 bytes for AES-128-GCM, 32 for AES-256-GCM.