Skip to content

Simplify enabling E2EE with Session API#1053

Open
hiroshihorie wants to merge 4 commits intomainfrom
hiroshi/simplify-session-encryption
Open

Simplify enabling E2EE with Session API#1053
hiroshihorie wants to merge 4 commits intomainfrom
hiroshi/simplify-session-encryption

Conversation

@hiroshihorie
Copy link
Copy Markdown
Member

No description provided.

@hiroshihorie hiroshihorie marked this pull request as ready for review April 14, 2026 12:14
Copy link
Copy Markdown

@1egoman 1egoman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally makes sense to me, I'm not a flutter expert though so it would be good to also get a review from somebody who is.

Comment on lines 87 to +105
SessionOptions({
Room? room,
this.preConnectAudio = true,
this.agentConnectTimeout = const Duration(seconds: 20),
}) : room = room ?? Room();
this.encryption,
}) : isRoomProvided = room != null,
room = room ?? Room() {
_validateEncryptionConfiguration();
}

SessionOptions._({
required this.room,
required this.isRoomProvided,
required this.preConnectAudio,
required this.agentConnectTimeout,
this.encryption,
}) {
_validateEncryptionConfiguration();
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a bad / nonsensical suggestion as I am not too familiar with typical flutter patterns, but would be worthwhile to get all session initialization (constructor and alternate constructor paths like the copyWith static method) going through the same core _ static method for initialization?

Copy link
Copy Markdown
Contributor

@xianshijing-lk xianshijing-lk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one question and look good to me

// Restart: the E2EE manager already exists from a previous session.
// Re-enable in case it was toggled off, before connect publishes
// any tracks.
await room.setE2EEEnabled(true);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curiously, do we need to pass the encryption over to the room in this case ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants