Package 

Interface E2EEManager


  • 
    public interface E2EEManager
    
                        

    Attaches end-to-end encryption to the media that flows through a call.

    The SDK ships StreamEncryptionManager as the default AES-GCM implementation. Integrators who need a different scheme (a different cipher, a regulator-mandated key hierarchy, a hardware keystore) implement this interface themselves and hand it to io.getstream.video.android.core.Call.setE2EEManager before joining. The SDK then never sees the key material or the crypto, it only tells the manager which senders and receivers exist.

    Key generation and key distribution are deliberately not part of this interface. Stream's infrastructure must stay isolated from that process, so it is the integrator's responsibility. Keys therefore live on the manager instance, not on the call: see StreamEncryptionManager.setSharedKey and StreamEncryptionManager.setKey for the default manager's surface, and give your own manager whichever key API suits your scheme.

    This mirrors the E2EEManager interface in the JavaScript SDK and StreamE2EEManager in the iOS SDK, so the same integration shape works across all three platforms.

    • Method Summary

      Modifier and Type Method Description
      abstract Result<Unit> encrypt(RtpSender sender, String codec, E2EETrackType trackType) Called once per outgoing track, right after the publisher adds its transceiver.
      abstract Result<Unit> decrypt(RtpReceiver receiver, String userId, E2EETrackType trackType) Called once per incoming track, when the subscriber learns which participant it belongs to.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • encrypt

         abstract Result<Unit> encrypt(RtpSender sender, String codec, E2EETrackType trackType)

        Called once per outgoing track, right after the publisher adds its transceiver. The implementation is expected to install a frame encryptor on sender.

        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.
        trackType - Which kind of track this is, or null when it cannot be mapped.
      • decrypt

         abstract Result<Unit> decrypt(RtpReceiver receiver, String userId, E2EETrackType trackType)

        Called once per incoming track, when the subscriber learns which participant it belongs to. The implementation is expected to install a frame decryptor on receiver.

        Parameters:
        receiver - The receiver carrying the remote track.
        userId - The user the track belongs to.
        trackType - Which kind of track this is, or null when it cannot be mapped.