add commitConfiguration to stopSession

This commit is contained in:
stantoncbradley 2016-06-05 12:40:32 -07:00
parent b2d9fa904b
commit 5ba2d3e40d
1 changed files with 15 additions and 14 deletions

View File

@ -415,6 +415,7 @@ RCT_EXPORT_METHOD(hasFlash:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRej
#endif
dispatch_async(self.sessionQueue, ^{
[self.previewLayer removeFromSuperlayer];
[self.session commitConfiguration];
[self.session stopRunning];
for(AVCaptureInput *input in self.session.inputs) {
[self.session removeInput:input];