Commit f7d909e
committed
Fix camera initialization failure on Firefox Android
When VideoConstraints has no constraints, return true.toJS instead of an
empty object. Firefox Android rejects getUserMedia({video: {}}) with an
AbortError, but accepts {video: true}.
This fixes the camera initialization failure in availableCameras() on
Firefox Android while maintaining compatibility with other browsers.
Fixes flutter/flutter#XXXXX1 parent 5fc2fd7 commit f7d909e
1 file changed
+6
-2
lines changedLines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| |||
0 commit comments