LiveKit C++ Client SDK v1.1.0
Real-time audio/video/data SDK for C++
Loading...
Searching...
No Matches
livekit::E2EEManager Class Reference

E2EE manager for a connected room. More...

#include <e2ee.h>

Classes

class  FrameCryptor
 Frame-level cryptor controls for one participant. More...
 
class  KeyProvider
 Manages encryption keys used by the E2EE pipeline. More...
 

Public Member Functions

 E2EEManager (const E2EEManager &)=delete
 
E2EEManageroperator= (const E2EEManager &)=delete
 
 E2EEManager (E2EEManager &&) noexcept=delete
 
E2EEManageroperator= (E2EEManager &&) noexcept=delete
 
bool enabled () const
 Returns whether E2EE is currently enabled for this room at runtime.
 
void setEnabled (bool enabled)
 Enable or disable E2EE at runtime.
 
std::weak_ptr< KeyProviderkeyProvider ()
 Returns a weak reference to the key provider if E2EE was configured for the room; otherwise an expired weak_ptr.
 
std::weak_ptr< const KeyProviderkeyProvider () const
 
std::vector< E2EEManager::FrameCryptorframeCryptors () const
 Retrieves the current list of frame cryptors from the underlying runtime.
 

Protected Member Functions

 E2EEManager (std::uint64_t room_handle, const E2EEOptions &options)
 Internal constructor used by Room when E2EEOptions are provided.
 

Friends

class Room
 

Detailed Description

E2EE manager for a connected room.

Lifetime:

Enablement model:

  • If the Room was created with RoomOptions.e2ee set, the room will expose a non-null E2EEManager via Room::E2eeManager().
  • If the Room was created without E2EE options, Room::E2eeManager() may be null.

Key model:

  • Keys are managed via KeyProvider (shared-key or per-participant).
  • Providing a shared key up-front is convenient for shared-key E2EE, but is not required by the API shape (keys may be supplied later).

Member Function Documentation

◆ keyProvider()

std::weak_ptr< KeyProvider > livekit::E2EEManager::keyProvider ( )

Returns a weak reference to the key provider if E2EE was configured for the room; otherwise an expired weak_ptr.

The KeyProvider is owned by this E2EEManager (which is in turn owned by Room). Callers must lock() the returned weak_ptr before use and must not retain the resulting shared_ptr beyond the lifetime of the Room.

Returns
A weak_ptr to the KeyProvider, or an expired weak_ptr if E2EE was not configured.

◆ setEnabled()

void livekit::E2EEManager::setEnabled ( bool  enabled)

Enable or disable E2EE at runtime.

NOTE:

  • Enabling E2EE without having compatible keys set across participants will result in undecodable media (black video / silent audio).

The documentation for this class was generated from the following file: