Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Daniel Newton
2022-03-22 18:20:07 +1300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
317fea46ca5152fcf35595567757b3be4a045907
317fea46
1 parent
04db96fd
fix camerafacing conversion
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
lib/mobile_scanner_web_plugin.dart
lib/mobile_scanner_web_plugin.dart
View file @
317fea4
...
...
@@ -80,8 +80,9 @@ class MobileScannerWebPlugin {
Future
<
Map
>
_start
(
arguments
)
async
{
vidDiv
.
children
=
[
video
];
final
CameraFacing
cameraFacing
=
arguments
[
'facing'
]
??
CameraFacing
.
front
;
var
cameraFacing
=
CameraFacing
.
front
;
if
(
arguments
.
containsKey
(
'facing'
))
cameraFacing
=
CameraFacing
.
values
[
arguments
[
'facing'
]];
// See https://github.com/flutter/flutter/issues/41563
// ignore: UNDEFINED_PREFIXED_NAME
...
...
@@ -116,7 +117,6 @@ class MobileScannerWebPlugin {
_localStream
=
await
html
.
window
.
navigator
.
getUserMedia
(
video:
constraints
);
}
else
{
debugPrint
(
'no facingMode capabilities :('
);
_localStream
=
await
html
.
window
.
navigator
.
getUserMedia
(
video:
true
);
}
...
...
Please
register
or
login
to post a comment