encrypt abstract method

Future<void> encrypt(
  1. RTCRtpSender sender, {
  2. String? codec,
  3. E2eeTrackType? trackType,
})

Encrypts everything sender publishes from now on.

Attach this right after addTransceiver, before the first frame is encoded, otherwise the opening frames leave in cleartext.

codec is an exact lowercase pin — opus, vp8, vp9 or h264. Passing null reads the codec from each frame instead.

trackType groups replay windows. Pass E2eeTrackType.screenShare explicitly so a screen share and a camera from the same user do not share one window; null lets native pick audio vs video from the sender.

Implementation

Future<void> encrypt(
  RTCRtpSender sender, {
  String? codec,
  E2eeTrackType? trackType,
});