Skip to content

Feature Request: Align Opus RED behavior when E2EE is enabled #1898

Open

Description

@brainwith

Describe the problem

When E2EE is enabled in the JS SDK, Opus RED is forced off:

const req = new AddTrackRequest({
// get local track id for use during publishing
cid: track.mediaStreamTrack.id,
name: opts.name,
type: Track.kindToProto(track.kind),
muted: track.isMuted,
source: Track.sourceToProto(track.source),
disableDtx,
encryption: this.encryptionType,
stereo: isStereo,
disableRed: this.isE2EEEnabled || !(opts.red ?? true),
stream: opts?.stream,
backupCodecPolicy: opts?.backupCodecPolicy as BackupCodecPolicy,
audioFeatures,
});

Android/iOS do not seem to force RED off for E2EE:
Android: https://github.com/livekit/client-sdk-android/blob/8f7a8a6d129ab1dc23f2e22d998b7498f58d8955/livekit-android-sdk/src/main/java/io/livekit/android/room/participant/LocalParticipant.kt#L459-L470
iOS: https://github.com/livekit/client-sdk-swift/blob/d1114653257df97122b565f795888db360dffbc5/Sources/LiveKit/Participant/LocalParticipant.swift#L620-L643

This inconsistency is confusing for cross-platform apps.

Describe the proposed solution

Please either:

  • allow RED with E2EE in JS (if feasible), or
  • document why RED must be disabled with E2EE and apply the same behavior across SDKs.

Alternatives considered

Keep current behavior but clearly document per-SDK differences.

Importance

nice to have

Additional Information

Related PR: #858

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions