encrypt
open override fun encrypt(sender: RtpSender, codec: String?, trackType: E2EETrackType?): Result<Unit>
Called once per outgoing track, right after the publisher adds its transceiver. The implementation is expected to install a frame encryptor on sender.
Return
Success when the frame encryptor was attached, or a failure that prevents the SDK from publishing this sender without encryption.
Parameters
sender
The sender carrying the local track.
codec
The negotiated codec, lowercased and without a MIME prefix (opus, vp8, av1), or null when the SDK cannot determine it. Not restricted to a fixed set; implementations that do not need a codec hint may ignore it.
trackType
Which kind of track this is, or null when it cannot be mapped.