SessionOptions constructor

SessionOptions({
  1. Room? room,
  2. E2EEOptions? encryption,
  3. bool preConnectAudio = true,
  4. Duration agentConnectTimeout = const Duration(seconds: 20),
})

Creates SessionOptions.

Pass encryption to configure end-to-end encryption on the internally created Room. Use E2EEOptions.sharedKey for the common shared-key case. For advanced setups (custom RoomOptions, per-participant keys), build a Room yourself and pass it via room instead.

Passing both room and encryption throws ArgumentError.

Implementation

SessionOptions({
  Room? room,
  E2EEOptions? encryption,
  this.preConnectAudio = true,
  this.agentConnectTimeout = const Duration(seconds: 20),
}) : room = _buildRoom(room, encryption);