[camera] add custom path ouput to recording#11774
Conversation
…ple file saving functionality.
…icationSupportsIndirectInputEvents in Info.plist
…roject configuration and dependencies.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for a custom videoOutputPath to the startVideoRecording API across Android, iOS, Windows, and Web platforms. The changes include updates to the camera_platform_interface, native implementation logic for path validation, and a new interactive example app. Technical feedback identifies several improvement opportunities: the Android example should use path_provider instead of hardcoded paths, and the UI should be updated to reflect that content:// URIs are not supported. Additionally, the reviewer recommended properly managing TextEditingController lifecycles, using locale-aware string conversions in Java, fixing a potential logic error in the Swift path validation, and integrating the new demo into the existing example app structure rather than replacing the main entry point.
…urces/camera_avfoundation/DefaultCamera.swift Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…r/plugins/camera/Camera.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…o/flutter/plugins/camerax/RecorderProxyApi.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…eb support from video recording example
… and standardizing app entry point
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for a custom videoOutputPath in the startVideoRecording method across the Android, iOS, and Windows implementations of the camera plugin. The changes include updates to the platform interface, implementation of path validation logic on both Dart and native sides, and the addition of a new example demonstrating the feature. Feedback identifies that the web implementation currently ignores the new parameter and that the example UI documentation incorrectly suggests support for multiple file extensions despite the implementation strictly enforcing .mp4. Additionally, inconsistent SDK and Flutter version constraints were noted in the web package compared to other packages in the pull request.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for a custom video output path (videoOutputPath) to the startVideoRecording method across the Flutter camera plugin and its federated platform implementations (Android, iOS, and Windows). It includes platform-specific validation logic to ensure output paths are not directories, have valid parent directories, and end with the .mp4 extension. Additionally, a comprehensive video recording example app has been added to demonstrate this feature. Feedback on the changes highlights a type mismatch in the example app's validation helper, potential memory leaks from unhandled asynchronous initialization when widgets unmount, and a bug in the Windows path parsing logic when a parent directory contains a dot.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request adds support for a custom videoOutputPath to the startVideoRecording method across the federated camera packages, including Android, iOS, Web, and Windows implementations. It updates the platform interface, implements platform-specific path validation, adds unit and integration tests, and introduces a new video recording example app. The review feedback highlights three key improvements: ensuring the previous CameraController is properly disposed in the example app to prevent resource leaks, correcting path generation logic in the example app for Android and iOS, and deleting any pre-existing file at the destination path on iOS to prevent AVAssetWriter initialization failures.
…iter initialization failure by deleting existing files on iOS
…oss camera packages
This PR introduces the ability to save videos to custom locations, taking into account the limitations and behavior of each platform.
Due to platform-specific security restrictions and limitations:
/storage/emulated/0/Download/video.mp4without issues.On My iPhone -> Camera Example -> Movies.Closes flutter/flutter#91680
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2