Showing
1 changed file
with
7 additions
and
0 deletions
| @@ -204,6 +204,13 @@ public class MobileScanner: NSObject, AVCaptureVideoDataOutputSampleBufferDelega | @@ -204,6 +204,13 @@ public class MobileScanner: NSObject, AVCaptureVideoDataOutputSampleBufferDelega | ||
| 204 | } catch { | 204 | } catch { |
| 205 | print("Failed to set initial torch state.") | 205 | print("Failed to set initial torch state.") |
| 206 | } | 206 | } |
| 207 | + | ||
| 208 | + do { | ||
| 209 | + try resetScale() | ||
| 210 | + } catch { | ||
| 211 | + print("Failed to reset zoom scale") | ||
| 212 | + } | ||
| 213 | + | ||
| 207 | let dimensions = CMVideoFormatDescriptionGetDimensions(device.activeFormat.formatDescription) | 214 | let dimensions = CMVideoFormatDescriptionGetDimensions(device.activeFormat.formatDescription) |
| 208 | 215 | ||
| 209 | return MobileScannerStartParameters(width: Double(dimensions.height), height: Double(dimensions.width), hasTorch: device.hasTorch, textureId: textureId) | 216 | return MobileScannerStartParameters(width: Double(dimensions.height), height: Double(dimensions.width), hasTorch: device.hasTorch, textureId: textureId) |
-
Please register or login to post a comment