Skip to content

feat(client): upgrade webrtc-adapter to v9.0.6 - #2475

Merged
oliverlaz merged 1 commit into
mainfrom
feat/webrtc-adapter-v9
Sep 30, 2026
Merged

oliverlaz merged 1 commit into
mainfrom
feat/webrtc-adapter-v9

Conversation

@oliverlaz

@oliverlaz oliverlaz commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

💡 Overview

Upgrades webrtc-adapter in @stream-io/video-client from ^8.2.4 to ^9.0.6 (latest). On current browsers the new version mostly stops patching things browsers now do natively, so impact on our SDKs is low.

📝 Implementation notes

How we use it: a single side-effect import in packages/client/index.ts. We never use its exports, so the v9 type change (shimGetStats removed from the typings) doesn't affect us. In Node and React Native the adapter detects no browser and is a no-op (unchanged, verified with 9.0.6).

What changed (8.2.4 → 9.0.6), effective diff is 9 files, +98/−78:

  • 9.0 breaking: legacy callback-style Chrome getStats shim removed. No exposure, we only use the promise API.
  • 9.0 breaking: Chrome getDisplayMedia shim removed. No exposure, it was never applied automatically.
  • Chromium is now detected via navigator.userAgentData (v90+) before the UA string. Same result for Chrome/Edge/Opera/Brave/Electron.
  • Chrome shims skip themselves on modern versions: getUserMedia (64+), pc.getStats(track) routing (67+), ontrack / negotiation-needed (103+), SCTP / max message size (103+), data channel send (149+).
  • Firefox: sendEncodings / getParameters / createOffer / createAnswer shims skipped on 110+ (native simulcast encodings); getStats shim skipped on 151+.
  • Safari shims unchanged.

Verified in Chrome 152 (loopback harness, 8.2.4 vs 9.0.6):

  • pc.getStats(track) returns the same stat set for subscriber and publisher (8.2.4 filtered via its own shim, 9.x uses the native selector). Codec/transport/candidate-pair entries used for RTT are still present.
  • Error semantics unchanged: foreign track, track after replaceTrack(null) and closed-PC-with-selector all reject with InvalidAccessError; simulcast rids stay q,h,f.
  • Patched surface drops from 16 RTCPeerConnection members plus getUserMedia to 5 legacy stream-API methods. getUserMedia errors now come straight from the browser (modern Chrome already uses spec names).
  • Client unit tests (1302 passed, 1 skipped), typecheck and production build pass with 9.0.6 resolved.

Not verified: Firefox and Safari live (reasoned from source), React Native on device (adapter is a no-op there). A quick manual call in Firefox (simulcast publish + stats) and Safari before release is recommended.

🎫 Ticket: https://linear.app/stream/issue/REACT-1194

📑 Docs: N/A

Summary by CodeRabbit

  • Chores
    • Updated an internal dependency. No user-facing changes are noted.

Bump webrtc-adapter from ^8.2.4 to ^9.0.6. The v9 breaking changes
(legacy callback-style Chrome getStats shim and Chrome getDisplayMedia
shim removed) don't affect the SDK, which only side-effect imports the
adapter. Most shims now opt out on modern Chrome and Firefox, so far
less of the WebRTC surface is patched.

Ticket: REACT-1194
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c20c2e20-fbaf-4d8d-b761-6b81ae1e675f

📥 Commits

Reviewing files that changed from the base of the PR and between b8788fb and 6366f36.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • packages/client/package.json

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The client package dependency range for webrtc-adapter changed from ^8.2.4 to ^9.0.6.

Changes

Client dependency

Layer / File(s) Summary
Update adapter dependency range
packages/client/package.json
The declared webrtc-adapter version range changed from ^8.2.4 to ^9.0.6.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 6366f

The upgrade does not break the SDK’s use of the removed Chrome shims; no actionable merge-blocking risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to 6366f

The change affects 1 system.

Changed systems: packages/client

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — packages/client (library) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in packages/client/package.json: The webrtc-adapter dependency range changed from ^8.2.4 to ^9.0.6.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description includes the required Overview and Implementation notes sections. It explains the dependency upgrade, usage, compatibility impact, validation results, known verification gaps, ticket, …
Title check ✅ Passed The title clearly and concisely identifies the main change: upgrading the client package's webrtc-adapter dependency to version 9.0.6.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Bundle size

Built package output. Sizes in KB; delta vs main@8131e5b.

No main baseline available yet - showing absolute sizes only.

Package Unminified Minified Δ min vs main
@stream-io/video-client 805.2 KB 282.9 KB n/a
@stream-io/video-react-bindings 29.6 KB 10.0 KB n/a
@stream-io/video-react-sdk 376.9 KB 229.2 KB n/a
↳ install total (+ client + react-bindings) 1211.8 KB 522.2 KB n/a
@stream-io/video-react-sdk (embedded) (cjs) 219.0 KB 127.0 KB n/a
@stream-io/video-react-native-sdk 455.8 KB 207.2 KB n/a
↳ install total (+ client + react-bindings) 1290.6 KB 500.2 KB n/a
@stream-io/audio-filters-web (cjs) 4867.0 KB 4822.4 KB n/a
@stream-io/noise-cancellation-react-native 3.5 KB 1.0 KB n/a
@stream-io/react-native-callingx 15.5 KB 7.1 KB n/a
@stream-io/video-filters-react-native 2.1 KB 0.8 KB n/a
@stream-io/video-filters-web 122.4 KB 68.6 KB n/a

@oliverlaz
oliverlaz merged commit b36dd27 into main Sep 30, 2026
22 checks passed
@oliverlaz
oliverlaz deleted the feat/webrtc-adapter-v9 branch September 30, 2026 12:45
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.

2 participants