Repository navigation
feat(client): upgrade webrtc-adapter to v9.0.6 - #2475
Conversation
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
|
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 configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe client package dependency range for ChangesClient dependency
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Other Merge Risk: ⚪ Minimal · up to The upgrade does not break the SDK’s use of the removed Chrome shims; no actionable merge-blocking risk remains. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Bundle sizeBuilt package output. Sizes in KB; delta vs
|
💡 Overview
Upgrades
webrtc-adapterin@stream-io/video-clientfrom^8.2.4to^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 (shimGetStatsremoved 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:
getStatsshim removed. No exposure, we only use the promise API.getDisplayMediashim removed. No exposure, it was never applied automatically.navigator.userAgentData(v90+) before the UA string. Same result for Chrome/Edge/Opera/Brave/Electron.getUserMedia(64+),pc.getStats(track)routing (67+),ontrack/ negotiation-needed (103+), SCTP / max message size (103+), data channel send (149+).sendEncodings/getParameters/createOffer/createAnswershims skipped on 110+ (native simulcast encodings);getStatsshim skipped on 151+.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.replaceTrack(null)and closed-PC-with-selector all reject withInvalidAccessError; simulcast rids stayq,h,f.RTCPeerConnectionmembers plusgetUserMediato 5 legacy stream-API methods.getUserMediaerrors now come straight from the browser (modern Chrome already uses spec names).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