Skip to content

Comments

fix: prefer the async apply constraints for flip#1679

Merged
santhoshvai merged 4 commits intomainfrom
fix-ios-mirror
Feb 11, 2025
Merged

fix: prefer the async apply constraints for flip#1679
santhoshvai merged 4 commits intomainfrom
fix-ios-mirror

Conversation

@santhoshvai
Copy link
Member

Overview

This fixes the momentary mirror bug seen on iOS

@santhoshvai santhoshvai merged commit 8c246cc into main Feb 11, 2025
15 checks passed
@santhoshvai santhoshvai deleted the fix-ios-mirror branch February 11, 2025 16:06
oliverlaz added a commit that referenced this pull request May 7, 2025
While optimizing the `camera.flip()` API in #1679, we introduced a
regression that led to `camera.flip()` throwing a `NotReadableError` on
devices with limited hardware capabilities.
Some devices are unable to provide two `MediaStream` instances at the
same time.

### 📝 Implementation notes
We want to preserve the `camera.flip()` optimizations as they allow
significantly faster direction change.
We always attempt to perform a fast direction change, but if it fails,
we fall back to:
`stop()` -> `flip()` -> `start()` flow, which is slower, but it works.

🎫 Ticket: https://linear.app/stream/issue/REACT-367/
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