| [camera_web] Fix camera initialization failure on Firefox Android (#10341)
## Description
Fixes camera initialization failure on Firefox Android when no video constraints are specified.
Firefox Android rejects getUserMedia({video: {}}) with an AbortError, but accepts {video: true}. This PR modifies VideoConstraints.toMediaStreamConstraints() to return true.toJS instead of an empty object when no constraints are specified, improving browser compatibility.
## Related Issue
This fix addresses camera initialization failures on Firefox Android where the camera plugin would fail with a CameraException(cameraAbort) error.
Fixes https://github.com/flutter/flutter/issues/115892
## Testing
Tested on Firefox Android with camera initialization - camera now successfully initializes where it previously failed.
## Pre-Review Checklist
**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the gemini-code-assist bot 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.
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
--- | 5 个月前 |