getKeyIndex method
Get the key index for the encryptors of the participant. @param identity the identity of the participant, if null, use local participant. @return the key index and -1 if not found
Implementation
Future<int> getKeyIndex(String? participantIdentity) async {
participantIdentity ??= _room?.localParticipant?.identity;
for (var item in _frameCryptors.entries) {
if (item.key.keys.first == participantIdentity) {
return await item.value.keyIndex;
}
}
return -1;
}