Added hasFlash()
This commit is contained in:
parent
000dc52fd7
commit
f7e8a5ddda
|
@ -236,6 +236,12 @@ RCT_EXPORT_METHOD(stopCapture) {
|
|||
}
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(hasFlash:(RCTResponseSenderBlock) callback) {
|
||||
AVCaptureDevice *device = [self.videoCaptureDeviceInput device];
|
||||
BOOL available = device.hasFlash;
|
||||
callback(@[@(available)]);
|
||||
}
|
||||
|
||||
- (void)startSession {
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue