diff --git a/README.md b/README.md index 6ed201c..3076998 100644 --- a/README.md +++ b/README.md @@ -284,3 +284,7 @@ Note: If you are getting errors, double check that you have completed all of the - OpenALPR built from [OpenALPR-iOS](https://github.com/twelve17/openalpr-ios) - Project scaffold based on [react-native-camera](https://github.com/lwansbrough/react-native-camera) + +## Sponsors + +- [repocoin.io](https://repocoin.io) diff --git a/example/App.js b/example/App.js index 7633b7f..ab3af8d 100644 --- a/example/App.js +++ b/example/App.js @@ -317,7 +317,7 @@ export default class App extends Component { {plate} - {confidence ? confidence + '%' : ''} + {confidence ? (+confidence).toFixed(1) + '%' : ''} device.activeFormat.videoMaxZoomFactor) { + zoomFactor = device.activeFormat.videoMaxZoomFactor; + } else if (zoomFactor < 1) { + zoomFactor = 1.0f; + } + + NSDictionary *event = @{ + @"target": reactTag, + @"zoomFactor": [NSNumber numberWithDouble:zoomFactor], + @"velocity": [NSNumber numberWithDouble:velocity] + }; + + [self.bridge.eventDispatcher sendAppEventWithName:@"zoomChanged" body:event]; + + device.videoZoomFactor = zoomFactor; + [device unlockForConfiguration]; + } else { + NSLog(@"error: %@", error); + } +} + - (void)setCaptureQuality:(NSString *)quality { #if !(TARGET_IPHONE_SIMULATOR)