Add mirrorStream support to ParticipantVideo for video mirroring#1665
Add mirrorStream support to ParticipantVideo for video mirroring#1665rahul-lohra wants to merge 3 commits intodevelopfrom
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
WalkthroughA Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
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-video-android-ui-compose/src/main/kotlin/io/getstream/video/android/compose/ui/components/call/renderer/ParticipantVideo.kt`:
- Around line 268-271: The memoized `mirror` state uses remember with keys
(cameraDirection, mirrorStream) but reads `me?.sessionId` and
`participant.sessionId`, causing stale values when `me` changes; instead remove
the remember/mutableStateOf and compute `mirror` as a derived (immutable) value
directly from `mirrorStream`, `cameraDirection`, `me?.sessionId`, and
`participant.sessionId` (i.e., replace the remembered mutableState logic around
`mirror` with a plain val expression that uses those symbols).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ea5c9d74-bd58-4a1e-b216-c9e16570c816
📒 Files selected for processing (3)
demo-app/src/main/kotlin/io/getstream/video/android/ui/call/CallScreen.ktstream-video-android-ui-compose/api/stream-video-android-ui-compose.apistream-video-android-ui-compose/src/main/kotlin/io/getstream/video/android/compose/ui/components/call/renderer/ParticipantVideo.kt
SDK Size Comparison 📏
|
|



Goal
We currently do not provide any API to mirror participant video streams. This limitation was raised in Stream Video Android Issue #1657
Mirroring is a common requirement, especially for:
Implementation
This PR introduces a new parameter
mirrorStreaminParticipantVideo, allowing developers to control horizontal mirroring of the rendered video stream.The mirroring is applied at the rendering layer using the underlying WebRTC renderer, ensuring minimal performance overhead.
Usage
Notes
🎨 UI Changes
None
Testing
Join a video call with 2 people, see that the other user is not mirrored
Summary by CodeRabbit