Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f7d909e
Fix camera initialization failure on Firefox Android
romeo4934 Nov 1, 2025
c65c2d4
[camera_web] Fix camera initialization failure on Firefox Android
romeo4934 Nov 1, 2025
3fd8b2e
Merge branch 'fix-camera-web-firefox-android' of https://github.com/r…
romeo4934 Nov 1, 2025
90a4fa2
[camera_web] Add test for empty VideoConstraints serialization
romeo4934 Nov 1, 2025
ecf097d
Fix dart formatting in camera_options_test.dart
romeo4934 Nov 2, 2025
5575f61
Fix version to 0.3.5+1 (patch) instead of 0.3.6 (minor)
romeo4934 Nov 5, 2025
09740ac
Merge branch 'main' into fix-camera-web-firefox-android
romeo4934 Nov 5, 2025
6e0aa23
upd
romeo4934 Nov 11, 2025
b0e415a
Merge branch 'fix-camera-web-firefox-android' of https://github.com/r…
romeo4934 Nov 11, 2025
3410f4e
Merge branch 'main' into fix-camera-web-firefox-android
romeo4934 Nov 12, 2025
f83b7a0
Merge branch 'main' into fix-camera-web-firefox-android
romeo4934 Nov 13, 2025
e0835d3
Merge branch 'main' into fix-camera-web-firefox-android
romeo4934 Nov 15, 2025
637c459
Merge branch 'main' into fix-camera-web-firefox-android
romeo4934 Nov 18, 2025
2657fa9
Merge branch 'main' into fix-camera-web-firefox-android
romeo4934 Nov 20, 2025
36f748c
Merge branch 'main' into fix-camera-web-firefox-android
romeo4934 Nov 21, 2025
e739caa
Merge branch 'main' into fix-camera-web-firefox-android
romeo4934 Nov 25, 2025
f6e7cf1
Merge branch 'main' into fix-camera-web-firefox-android
romeo4934 Nov 26, 2025
6d3437b
Type removal
stuartmorgan-g Dec 1, 2025
49422e7
Type removal
stuartmorgan-g Dec 1, 2025
7ae206d
Re-bump version
stuartmorgan-g Dec 1, 2025
caa8b15
Update CHANGELOG.md for version bump
stuartmorgan-g Dec 1, 2025
752c5b5
Merge branch 'main' into fix-camera-web-firefox-android
stuartmorgan-g Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/camera/camera_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## NEXT
## 0.3.6

* Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.
* Fixes camera initialization failure on Firefox Android by using `{video: true}` instead of `{video: {}}` when no video constraints are specified.

## 0.3.5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,16 @@ class VideoConstraints {
// TODO(dit): package:web has a class for this. Use it instead of jsify and toJson.
/// Convert `this` to something that can be used on the browser.
JSAny toMediaStreamConstraints() {
return <String, Object>{
final Map<String, Object> constraints = <String, Object>{
if (width != null) 'width': width!.toJson(),
if (height != null) 'height': height!.toJson(),
if (facingMode != null) 'facingMode': facingMode!.toJson(),
if (deviceId != null) 'deviceId': <String, Object>{'exact': deviceId!},
}.jsify()!;
};

// Return true instead of empty object for better browser compatibility.
// Firefox Android rejects getUserMedia({video: {}}) but accepts {video: true}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this bug documented anywhere that we can link to for context?

return constraints.isEmpty ? true.toJS : constraints.jsify()!;
}

@override
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_web
description: A Flutter plugin for getting information about and controlling the camera on Web.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_web
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.3.5
version: 0.3.6

environment:
sdk: ^3.7.0
Expand Down