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
Navaron Bracke
2024-04-08 12:23:13 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6f7ed0a6e038ee34d18d5cce22908483431a1fc0
6f7ed0a6
1 parent
caf6afa7
handle undefined facing mode on web
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
lib/src/web/media_track_constraints_delegate.dart
lib/src/web/media_track_constraints_delegate.dart
View file @
6f7ed0a
...
...
@@ -21,13 +21,20 @@ final class MediaTrackConstraintsDelegate {
return
null
;
}
final
MediaTrackCapabilities
capabilities
=
track
.
getCapabilities
();
final
MediaTrackSettings
settings
=
track
.
getSettings
();
if
(
capabilities
.
facingMode
.
toDart
.
isEmpty
)
{
return
MediaTrackSettings
(
width:
settings
.
width
,
height:
settings
.
height
,
);
}
return
MediaTrackSettings
(
width:
settings
.
width
,
height:
settings
.
height
,
facingMode:
settings
.
facingMode
,
aspectRatio:
settings
.
aspectRatio
,
);
}
}
...
...
Please
register
or
login
to post a comment