Skip to content
8 changes: 8 additions & 0 deletions LLSimpleCamera/LLSimpleCamera.m
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ - (void)start {
[self.session addOutput:self.stillImageOutput];
}

//if we had disabled the connection on capture, re-enable it
if (![self.captureVideoPreviewLayer.connection isEnabled]) {
[self.captureVideoPreviewLayer.connection setEnabled:YES];
}

[self.session startRunning];
}

Expand All @@ -201,6 +206,9 @@ -(void)capture:(void (^)(LLSimpleCamera *camera, UIImage *image, NSDictionary *m

[self.stillImageOutput captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler: ^(CMSampleBufferRef imageSampleBuffer, NSError *error)
{
//Stop capturing data to freeze the screen to indicate the pictrue has been taken
[self.captureVideoPreviewLayer.connection setEnabled:NO];

UIImage *image = nil;
NSDictionary *metadata = nil;

Expand Down