Skip to content

FCE-3592: mobile runs on ReactNativeDeviceManager, polyfill diet - #600

Open
MiloszFilimowski wants to merge 5 commits into
tsunami/13-mobile-injectionfrom
tsunami/14-mobile-native
Open

FCE-3592: mobile runs on ReactNativeDeviceManager, polyfill diet#600
MiloszFilimowski wants to merge 5 commits into
tsunami/13-mobile-injectionfrom
tsunami/14-mobile-native

Conversation

@MiloszFilimowski

@MiloszFilimowski MiloszFilimowski commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #599.

Description

  • ReactNativeDeviceManager hardened before going live: the fork rejects permission denials with a MediaStreamError (not an Error) named SecurityError, which classified as UNHANDLED_ERROR — now duck-typed to NotAllowedError. Permission warnings move off the navigator monkey-patch onto the acquisition path; displayMediaOptions constructor option; onDeviceChange is an honest no-op (deletes the FCE-3689 cast).
  • The mobile provider gets its own module: clientType: 'mobile' + a module-level native manager, no per-render ts-client allocation. No deviceManager prop exposed to apps.
  • webrtc-polyfill.tsglobals.ts: no registerGlobals() — only RTCPeerConnection, RTCIceCandidate, and MediaStream are set, from direct fork imports. Deleted: localStorage polyfill, overrides/getUserMedia, EventTarget global. Breaking for apps that used the removed globals (README note included).
  • Aligns the tsunami package version with the SDK and adds it to the bump script.

Motivation and Context

FCE-3592 follow-through: mobile runs on a native IDeviceManager instead of pretending to be a browser. Validated on the iOS simulator: boot, permission denial path, camera preview via RTCView, sandbox room join; Hermes eval confirmed the 11 removed globals are undefined and the 3 kept ones constructible. Mobile tests: 16 (classification, permission warnings, displayMediaOptions, createMediaStream, provider shape, globals).

Documentation impact

  • Documentation update required
  • Documentation updated (mobile-client README breaking-change note in this PR)
  • No documentation update required

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)

Fixes the real classification bug: react-native-webrtc rejects with a
MediaStreamError that is not an Error and names permission denial
SecurityError, which used to surface as UNHANDLED_ERROR. Permission warnings
move from the navigator.mediaDevices monkey-patch onto the actual acquisition
path. getDisplayMedia gains native screen-capture options; onDeviceChange
becomes an honest no-op (the fork never emits devicechange), deleting the
FCE-3689 cast workaround here.
FishjamProvider moves to its own module and declares what mobile is
(clientType 'mobile', ReactNativeDeviceManager) instead of constructing a
signalling client per render. Device acquisition no longer flows through the
fake navigator.mediaDevices.
… else dies

registerGlobals() is gone; globals.ts installs RTCPeerConnection (the
getConfiguration-caching subclass), RTCIceCandidate, and MediaStream from
direct fork imports — the exact set the legacy connection core resolves from
globals. The navigator.mediaDevices fake, the in-memory localStorage, the
EventTarget global, and the getUserMedia permission monkey-patch are deleted.
Breaking for apps that used the removed globals directly (README note).
…ript

tsunami sat at 0.0.0 while every other package tracks 0.29.0, and the release
script's package list omitted it entirely — so each release would have left it
further behind. It stays private:true; that flag is the remaining switch to
flip when it actually goes out.
…nfig

Import sorting, quote style, and no-shadow on the hoisted fake classes —
no behavior change.
@MiloszFilimowski MiloszFilimowski changed the title tsunami/14 mobile native FCE-3592: mobile runs on ReactNativeDeviceManager, polyfill diet Aug 11, 2026
@linear

linear Bot commented Aug 11, 2026

Copy link
Copy Markdown

FCE-3592

@MiloszFilimowski
MiloszFilimowski marked this pull request as ready for review August 11, 2026 09:35
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.

1 participant