Added hasFlash()

This commit is contained in:
wootwoot1234 2015-11-03 15:31:10 -08:00
parent 000dc52fd7
commit f7e8a5ddda
1 changed files with 6 additions and 0 deletions

View File

@ -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;