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
2023-10-31 11:03:10 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cd020dd97ff76a64365b552db03fbe9e853cbac5
cd020dd9
1 parent
ab0d58d5
remove redundant prints
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
ios/Classes/MobileScanner.swift
ios/Classes/MobileScanner.swift
View file @
cd020dd
...
...
@@ -213,18 +213,21 @@ public class MobileScanner: NSObject, AVCaptureVideoDataOutputSampleBufferDelega
backgroundQueue
.
async
{
self
.
captureSession
.
startRunning
()
// Enable the torch if parameter is set and torch is available
// torch should be set after 'startRunning' is called
// Turn on the flashlight if requested,
// but after the capture session started.
do
{
try
self
.
toggleTorch
(
torch
)
}
catch
{
print
(
"Failed to set initial torch state."
)
// If the torch does not turn on,
// continue with the capture session anyway.
}
do
{
try
self
.
resetScale
()
}
catch
{
print
(
"Failed to reset zoom scale"
)
// If the zoom scale could not be reset,
// continue with the capture session anyway.
}
if
let
device
=
self
.
device
{
...
...
Please
register
or
login
to post a comment