Skip to content

isE2EESimulcastSupported() returns undefined` for an unrecognized User-Agent, silently disabling simulcast on E2EE calls #2026

Description

@drewwells

Describe the bug

What I'm expecting

The ability to make calls between two element X iOS apps running on iPhones. The user-agent this app uses is not recognized by this library: Element X/26.07.4 (iPhone Air; iOS 26.5.2; Scale/1.00)

We could could change this app to fail open when not recognizing a user agent. The guard exists to work around a specific, long-fixed WebKit bug https://bugs.webkit.org/show_bug.cgi?id=257803, so I think it's safe to enable simulcast by default now rather than disabling by default and having the current behavior of catching up to network bandwidth.

export function isE2EESimulcastSupported() {
  const browser = getBrowser();
  if (!browser) {
    // Unknown UA (embedded webview, native wrapper). The guard below targets a
    // specific WebKit bug fixed in 17.2; don't punish clients we can't identify.
    return true;
  }
  
}

What happens instead

The phones provide only a single resolution even when multiple are supported. On network slowness, the video hangs then fast forwards to catch up

Reproduction

Both clients below joined the same room, with the same SDK
(2.19.2)
, same codec (VP8), same E2EE (GCM) and same 1280x720 capture.
Only the UA differs.

Have two clients join a call. One with an agent like this used in Element X

Element X/26.07.4 (iPhone Air; iOS 26.5.2; Scale/1.00)     <-- no regex matches

What the SFU recorded for the two publishers:

iOS 26.5.2 / WKWebView (custom UA)    simulcast: False
  layers (1): HIGH 1280x720@1700k

Mac OS X / Firefox 153.0              simulcast: True
  layers (3): LOW 320x180@160k rid=q, MEDIUM 640x360@450k rid=h, HIGH 1280x720@1700k rid=f

The iOS app only publishes a single SFU with no fallback

iPhone  video/VP8  bitrate med=1700000 max=1700000    <-- pinned, no fallback
Firefox video/VP8  bitrate med=450000  max=1700000    <-- SFU using the 450k layer

Logs

System Info

- livekit-client **2.19.2**
- livekit-server **1.13.4**
- Publisher: iOS 26.5.2 / 18.7.9, `WKWebView` with a custom UA (Element X 26.07.4)
- Comparison publisher: Firefox 153.0 / macOS

Severity

annoyance

Additional Information

No response

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