Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Fixed iPhone / iPod scanning issue
Browse files Browse the repository at this point in the history
An issue was recognised where iPhones and iPods were unable to scan large Code39 barcodes (#65).

Changing `AVCaptureSessionPresetMedium` to `AVCaptureSessionPresetHigh` seems to solve this issue.
  • Loading branch information
Oli Mortimer committed Aug 28, 2015
1 parent f72bc48 commit c92bc8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ios/CDVBarcodeScanner.mm
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,11 @@ - (NSString*)setUpCaptureSession {

[output setSampleBufferDelegate:self queue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0)];

if (![captureSession canSetSessionPreset:AVCaptureSessionPresetMedium]) {
return @"unable to preset medium quality video capture";
if (![captureSession canSetSessionPreset:AVCaptureSessionPresetHigh]) {
return @"unable to preset high quality video capture";
}

captureSession.sessionPreset = AVCaptureSessionPresetMedium;
captureSession.sessionPreset = AVCaptureSessionPresetHigh;

if ([captureSession canAddInput:input]) {
[captureSession addInput:input];
Expand Down

0 comments on commit c92bc8a

Please sign in to comment.