fix(ios): guard video orientation when cameraMode is enabled (fixes #367)#369
Conversation
Prevent crashes when starting preview with video mode enabled by checking isVideoOrientationSupported before setting orientation on AVCaptureConnection. Also accept enableVideoMode on iOS to match the public TypeScript API. Fixes #367 Co-authored-by: Cursor <cursoragent@cursor.com>
Beta npm buildMaintainers can publish this PR to npm for fast testing. Comment The workflow will:
Security note: beta publish is only enabled for branches inside this repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📝 WalkthroughWalkthroughIntroduces private ChangesiOS orientation crash fix, enableVideoMode alias, and positioning docs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
Summary
AVCaptureConnection.videoOrientationassignments withisVideoOrientationSupportedto prevent iOS crashes when attachingAVCaptureMovieFileOutputduring preview startupenableVideoModeon iOS (with backward-compatible support for legacycameraMode) so the public TypeScript API matches native behaviorTest plan
bun run verify:webbun run lintenableVideoMode: trueand confirm no crashcameraMode: trueand confirm no crashFixes #367
Made with Cursor
Summary by CodeRabbit
New Features
enableVideoModeas an alternative option for configuring camera video mode settings.Bug Fixes
Documentation
positioningoption documentation to reflect platform support for both Android and iOS.