setE2eeEnabled method
Future<void>
setE2eeEnabled(
{ - required String targetId,
- required bool isEnabled,
- bool isForce = false,
})
override
Implementation
@override
Future<void> setE2eeEnabled({
required String targetId,
required bool isEnabled,
bool isForce = false,
}) async {
final RTCPeerConnection? peerConnection =
_subscribers[targetId]?.peerConnection;
if (peerConnection == null) return;
if (_subscribers[targetId]?.isE2eeEnabled == isEnabled && !isForce) {
return;
}
_subscribers[targetId]?.isE2eeEnabled = isEnabled;
await _frameCryptor.enableDecryption(
peerConnection: peerConnection,
codec: _subscribers[targetId]?.videoCodec ?? WebRTCCodec.h264,
enabled: isEnabled,
);
}