Skip to content

Comments

feat(ios): improved frame rendering#27

Draft
santhoshvai wants to merge 1 commit intomasterfrom
ios-render-improv
Draft

feat(ios): improved frame rendering#27
santhoshvai wants to merge 1 commit intomasterfrom
ios-render-improv

Conversation

@santhoshvai
Copy link
Member

@santhoshvai santhoshvai commented Feb 17, 2026

ref: GetStream/webrtc#70

Summary by CodeRabbit

  • Bug Fixes

    • Updated video rendering implementation for improved stability and compatibility.
    • Optimized frame buffer handling for WebRTC peer connections.
  • Chores

    • Updated WebRTC dependency to latest compatible version for bug fixes and performance improvements.

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

📝 Walkthrough

Walkthrough

The changes upgrade WebRTC video rendering infrastructure by migrating from RTCMTLVideoView to RTCVideoRenderingView with shared metal backend configuration, add frame buffer policy configuration in WebRTCModule initialization, and bump the StreamWebRTC dependency from 137.0.54 to 137.0.62.

Changes

Cohort / File(s) Summary
Video Rendering Migration
ios/RCTWebRTC/RTCVideoViewManager.m
Replaces RTCMTLVideoView with RTCVideoRenderingView, updates import header, and configures rendering backend to use shared metal during initialization.
WebRTC Configuration
ios/RCTWebRTC/WebRTCModule.m
Adds frame buffer policy configuration (RTCFrameBufferPolicyConvertWithPoolToNV12) during peer connection factory initialization.
Dependency Update
stream-react-native-webrtc.podspec
Updates StreamWebRTC dependency constraint from ~>137.0.54 to ~>137.0.62.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Whiskers twitch with rendering cheer,
Metal backend now shines crystal clear,
Frame buffers pool in perfect form,
Dependencies dance, upgraded and warm,
WebRTC hops to versions anew! 🎬

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'improved frame rendering' accurately reflects the main changes across all modified files: RTCVideoView now uses RTCVideoRenderingView with SharedMetal backend, WebRTCModule configures frame buffer policy to NV12, and StreamWebRTC dependency is updated—all contributing to improved frame rendering.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ios-render-improv

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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 and usage tips.

@santhoshvai santhoshvai marked this pull request as draft February 17, 2026 17:05
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@stream-react-native-webrtc.podspec`:
- Line 24: The podspec contains a broken CocoaPods dependency declaration
s.dependency 'StreamWebRTC', '~>137.0.62' which will cause pod install to fail
because StreamWebRTC isn't published as a standalone pod; remove that dependency
or replace it with a valid CocoaPods pod that vendors WebRTC (e.g., use the
StreamVideo pod that includes the vendored XCFramework). Update the podspec by
deleting the s.dependency 'StreamWebRTC' line and either rely on SPM for
StreamWebRTC or add/replace with s.dependency 'StreamVideo',
'<appropriate-version-that-includes-137.0.62>' (ensure the chosen StreamVideo
version actually vendors WebRTC 137.0.62).

s.dependency 'React-Core'
# WebRTC version from https://github.com/GetStream/stream-video-swift-webrtc releases
s.dependency 'StreamWebRTC', '~>137.0.54'
s.dependency 'StreamWebRTC', '~>137.0.62'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# Find and display the podspec file
find . -name "stream-react-native-webrtc.podspec" -type f

Repository: GetStream/react-native-webrtc

Length of output: 109


🏁 Script executed:

# Once found, check the content around line 24
cat -n stream-react-native-webrtc.podspec | sed -n '20,30p'

Repository: GetStream/react-native-webrtc

Length of output: 622


🌐 Web query:

StreamWebRTC 137.0.62 CocoaPods pod version

💡 Result:

There is no standalone CocoaPods pod named StreamWebRTC. Stream distributes StreamWebRTC primarily as a Swift Package (GetStream/stream-video-swift-webrtc). [2]

With CocoaPods, StreamWebRTC is consumed as a vendored XCFramework inside the StreamVideo pod, and the podspec’s prepare_command downloads a specific StreamWebRTC release zip from GitHub. For example, StreamVideo 1.41.0 downloads StreamWebRTC 137.0.54 (not 137.0.62). [1]

So, StreamWebRTC 137.0.62 has no “CocoaPods pod version” mapping—to use 137.0.62, you’d need either:

  • SwiftPM .exact("137.0.62") (if that tag exists in the repo), or
  • a StreamVideo podspec (or fork) whose prepare_command points at .../releases/download/137.0.62/StreamWebRTC.xcframework.zip. [3]

Sources:
[1] StreamVideo podspec showing vendored_frameworks + download URL in prepare_command (downloads 137.0.54)
[2] Stream’s WebRTC-for-Swift page describing StreamWebRTC as a Swift Package
[3] Swift Package Index page for StreamWebRTC (package versions)


🏁 Script executed:

# Check if StreamWebRTC is registered on CocoaPods at all
# Also check the full podspec to understand the dependency pattern
head -40 ./stream-react-native-webrtc.podspec

Repository: GetStream/react-native-webrtc

Length of output: 1359


🏁 Script executed:

# Check git history to see what the previous version was
git log --oneline -n 20 -- stream-react-native-webrtc.podspec | head -5
git show HEAD:stream-react-native-webrtc.podspec | grep -A2 -B2 "StreamWebRTC" || echo "Not found in HEAD"

Repository: GetStream/react-native-webrtc

Length of output: 403


🌐 Web query:

GetStream StreamWebRTC CocoaPods pod registry

💡 Result:

StreamWebRTC (GetStream’s prebuilt WebRTC XCFramework) is not published as a standalone CocoaPods pod in the CocoaPods trunk/registry (there’s no StreamWebRTC page on CocoaPods.org).

Instead, GetStream distributes it in two main ways:

  1. Via the StreamVideo CocoaPod (recommended if you’re using Stream Video).
    StreamVideo’s podspec vendors Frameworks/StreamWebRTC.xcframework and its prepare_command downloads StreamWebRTC.xcframework.zip from the GetStream/stream-video-swift-webrtc GitHub Releases page during pod install. [1]

  2. Via Swift Package Manager (SPM) as the StreamWebRTC package from GetStream/stream-video-swift-webrtc (also listed on Swift Package Registry sites). [2][3]

Sources: StreamVideo podspec (shows vendored StreamWebRTC.xcframework + download URL) [1], Stream’s iOS Video installation docs (SPM dependency example) [2], Swift Package Registry listing for GetStream/stream-video-swift-webrtc [3].


🏁 Script executed:

# Check git history for this line
git log -p --all -- stream-react-native-webrtc.podspec | grep -A5 -B5 "StreamWebRTC" | head -40

Repository: GetStream/react-native-webrtc

Length of output: 55


🏁 Script executed:

# Check if StreamVideo pod might be the correct dependency
git log --all --source --remotes -- stream-react-native-webrtc.podspec | head -20

Repository: GetStream/react-native-webrtc

Length of output: 689


🌐 Web query:

react-native-webrtc GetStream StreamWebRTC dependency CocoaPods pod install

💡 Result:

If you’re integrating GetStream Video in React Native, you generally should not use react-native-webrtc (community) on iOS—Stream’s SDK expects @stream-io/react-native-webrtc. Stream’s install docs explicitly list @stream-io/react-native-webrtc as the required peer dependency and then npx pod-install for iOS. [1]

What to do (iOS / CocoaPods)

  1. Use Stream’s WebRTC package (not react-native-webrtc)
yarn add `@stream-io/video-react-native-sdk`
yarn add `@stream-io/react-native-webrtc` react-native-svg `@react-native-community/netinfo`
npx pod-install

[1]

  1. Make sure your iOS deployment target is high enough
    If pod install fails with “could not find compatible versions for pod react-native-webrtc”, the common fix is raising:
platform :ios, '12.0'

(or higher) in ios/Podfile. [2]

  1. Match React Native version ↔︎ @stream-io/react-native-webrtc version
    Stream notes that @stream-io/react-native-webrtc >= 125.3.0 requires RN 0.73+; if you’re on older RN, pin @stream-io/react-native-webrtc@125.2.1. [1]

If you paste the exact pod install error output (the failing Pod + message), I can point to the specific Podfile change needed.

Sources:
[1] Stream Video React Native installation docs (peer deps + npx pod-install, RN version note) https://getstream.io/video/docs/react-native/setup/installation/react-native/
[2] Pod compatibility fix by raising iOS platform version for react-native-webrtc https://stackoverflow.com/questions/76089706/cocoapods-could-not-find-compatible-versions-for-pod-react-native-webrtc


🏁 Script executed:

# Check if there's a Podfile or other configuration that might set up private specs
find . -name "Podfile" -o -name ".podspec" | head -10

Repository: GetStream/react-native-webrtc

Length of output: 188


🏁 Script executed:

# Check the PR referenced in the comment to understand the intent
# Look at the full podspec for any clues about how StreamWebRTC should be accessed
cat -n stream-react-native-webrtc.podspec

Repository: GetStream/react-native-webrtc

Length of output: 1562


🌐 Web query:

GetStream/stream-video-swift-webrtc 137.0.62 CocoaPods podspec distribution

💡 Result:

GetStream/stream-video-swift-webrtc (product StreamWebRTC) is not distributed via CocoaPods (no published pod / trunk podspec). Stream documents it as a Swift Package Manager dependency that points to precompiled WebRTC XCFramework binaries hosted via the Git repo/tags (e.g., you select an exact version/tag like 137.0.62). [1], [2]

So for 137.0.62, you should consume it via SPM, not pod install. If you must use CocoaPods, you’ll need a different WebRTC binary pod/spec repo (not this GetStream package). [1], [3]

Sources:
[1] GetStream “WebRTC for Swift Developers” (SPM-only instructions) (getstream.io)
[2] Swift Package Index listing for GetStream/stream-video-swift-webrtc (SPM package/versions) (swiftpackageindex.com)
[3] CocoaPods Trunk / Specs distribution background (blog.cocoapods.org)

Citations:


Remove or replace the broken CocoaPods dependency on line 24.

StreamWebRTC is not published as a standalone CocoaPods pod. It is only available as a Swift Package Manager package or as a vendored XCFramework within the StreamVideo CocoaPods pod. The s.dependency 'StreamWebRTC', '~>137.0.62' declaration on line 24 will cause pod install to fail with "Unable to find a specification for StreamWebRTC".

To use StreamWebRTC 137.0.62, either:

  • Remove this dependency and use SPM instead for iOS WebRTC support, or
  • Replace it with a dependency on the StreamVideo pod (which vendors StreamWebRTC internally) and update the version to one that includes WebRTC 137.0.62
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@stream-react-native-webrtc.podspec` at line 24, The podspec contains a broken
CocoaPods dependency declaration s.dependency 'StreamWebRTC', '~>137.0.62' which
will cause pod install to fail because StreamWebRTC isn't published as a
standalone pod; remove that dependency or replace it with a valid CocoaPods pod
that vendors WebRTC (e.g., use the StreamVideo pod that includes the vendored
XCFramework). Update the podspec by deleting the s.dependency 'StreamWebRTC'
line and either rely on SPM for StreamWebRTC or add/replace with s.dependency
'StreamVideo', '<appropriate-version-that-includes-137.0.62>' (ensure the chosen
StreamVideo version actually vendors WebRTC 137.0.62).

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