{"id":1210,"url":"https://github.com/omergul/LLSimpleCamera","last_synced_at":"2025-07-30T20:32:46.458Z","repository":{"id":23445889,"uuid":"26809512","full_name":"omergul/LLSimpleCamera","owner":"omergul","description":"A simple, customizable camera control - video recorder for iOS.","archived":false,"fork":false,"pushed_at":"2017-12-15T10:45:34.000Z","size":455,"stargazers_count":1199,"open_issues_count":64,"forks_count":195,"subscribers_count":51,"default_branch":"master","last_synced_at":"2024-10-29T20:50:59.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omergul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-18T13:05:26.000Z","updated_at":"2024-10-16T23:12:06.000Z","dependencies_parsed_at":"2022-08-20T21:50:23.818Z","dependency_job_id":null,"html_url":"https://github.com/omergul/LLSimpleCamera","commit_stats":null,"previous_names":["omergul123/llsimplecamera"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omergul%2FLLSimpleCamera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omergul%2FLLSimpleCamera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omergul%2FLLSimpleCamera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omergul%2FLLSimpleCamera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omergul","download_url":"https://codeload.github.com/omergul/LLSimpleCamera/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228017954,"owners_count":17856841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:41.341Z","updated_at":"2024-12-04T20:31:05.062Z","avatar_url":"https://github.com/omergul.png","language":"Objective-C","funding_links":[],"categories":["Hardware"],"sub_categories":["Camera","Other free courses"],"readme":"# LLSimpleCamera: A simple customizable camera - video recorder control\n\n![Screenshot](https://raw.githubusercontent.com/omergul123/LLSimpleCamera/master/screenshot.png)\n\nLLSimpleCamera is a library for creating a customized camera - video recorder screens similar to snapchat's. You don't have to present the camera in a new view controller.\n\nYou can also use my [LLVideoEditor][1] library to easily edit recorded videos.\n\n###LLSimpleCamera:###\n* lets you easily capture photos and record videos\n* handles the position and flash of the camera\n* hides the nitty gritty details from the developer\n* doesn't have to be presented in a new modal view controller, simply can be embedded inside any of your VCs. (like Snapchat)\n\n\n###Version 5.0 notes:###\n- Better recording API\n- Improved reliability\n\n###Version 4.2 notes:###\nNew features:\n- zoom feature\n- white balance configuration\n- attaching to view controller improved\n\n###Version 4.1 notes:###\nMerged some PRs:\n- camera mirroring option\n- implementation of **- (instancetype)initWithCoder:(NSCoder *)aDecoder**\n\n###Version 4.0 notes:###\nThanks to the open source community, recently I have merged about 10 PR's to make this library much better and reliable. Also I did some cleanups which contains some breaking changes (sorry for that). Therefore I'm incrementing the major version.\n\n## Install\n\npod 'LLSimpleCamera', '~\u003e 4.1'\n\n## Example usage\n\nInitialize the LLSimpleCamera\n```objective-c\nCGRect screenRect = [[UIScreen mainScreen] bounds];\n\n// create camera with standard settings\nself.camera = [[LLSimpleCamera alloc] init];\n\n// camera with video recording capability\nself.camera =  [[LLSimpleCamera alloc] initWithVideoEnabled:YES];\n\n// camera with precise quality, position and video parameters.\nself.camera = [[LLSimpleCamera alloc] initWithQuality:AVCaptureSessionPresetHigh\n                                             position:LLCameraPositionRear\n                                         videoEnabled:YES];\n// attach to the view\n[self.camera attachToViewController:self withFrame:CGRectMake(0, 0, screenRect.size.width, screenRect.size.height)];\n\n```\n\nTo capture a photo:\n```objective-c\n// capture\n[self.camera capture:^(LLSimpleCamera *camera, UIImage *image, NSDictionary *metadata, NSError *error) {\n    if(!error) {    \n        // we should stop the camera, since we don't need it anymore. We will open a new vc.\n        // this very important, otherwise you may experience memory crashes\n        [camera stop];\n            \n        // show the image\n        ImageViewController *imageVC = [[ImageViewController alloc] initWithImage:image];\n        [self presentViewController:imageVC animated:NO completion:nil];\n       }\n}];\n```\n\nTo start recording a video:\n```objective-c\n// start recording\nNSURL *outputURL = [[[self applicationDocumentsDirectory] URLByAppendingPathComponent:@\"test1\"] URLByAppendingPathExtension:@\"mov\"];\n[self.camera startRecordingWithOutputUrl:outputURL didRecord:^(LLSimpleCamera *camera, NSURL *outputFileUrl, NSError *error) {\n    VideoViewController *vc = [[VideoViewController alloc] initWithVideoUrl:outputFileUrl];\n    [self.navigationController pushViewController:vc animated:YES];\n}];\n```\n\nTo stop recording the video:\n```objective-c\n[self.camera stopRecording];\n```\n\nChanging the focus layer and animation:\n```objective-c\n- (void)alterFocusBox:(CALayer *)layer animation:(CAAnimation *)animation;\n```\n\n## Adding the camera controls\n\nYou have to add your own camera controls (flash, camera switch etc). Simply add the controls to the view where LLSimpleCamera is attached to. You can see a full camera example in the example project. Download and try it on your device.\n\n## Stopping and restarting the camera\n\nYou should never forget to stop the camera either after the capture block is triggered, or inside somewhere **-viewWillDisappear** of the parent controller to make sure that the app doesn't use the camera when it is not needed. You can call **-start()** to reuse the camera. So it may be good idea to to place **-start()** inside **-viewWillAppear** or in another relevant method.\n\n## Contact\n\nÖmer Faruk Gül\n\n[Personal Site][2]\n\nomer@omerfarukgul.com\n\n## Version History\n\n#### Version 3.0.0\n - added video recording capability\n - class is heavily refactored \n\n#### Version 2.2.0\n- camera permissions are supported, if the permission is not given by the user, onError will be triggered.\n- camera flash methods are altered. Now you have to call **- (BOOL)updateFlashMode:(CameraFlash)cameraFlash;**\n- cameraFlash and cameraPosition property names are simplified to: **flash** and **position**.\n- added support for device orientation in case your vc orientation is locked but you want to use the device orientation no matter what.\n\n#### Version 2.1.1\n- freezing the screen just after the photo is taken for better user experience.\n\n#### Version 2.1.0\n- added an extra parameter exactSeenImage:(BOOL)exactSeenImage to -capture method to easily get the exact seen image on the screen instead of the raw uncropped image. The default value is NO.\n- fixed an orientation bug inside capture method.\n\n#### Version 2.0.0\nSome significant changes have been made at both internal structure and  api.\n- added tap to focus feature (it is fully customizable, if you don't like the default layer and animation)\n- removed delegates and added blocks\n- interface is significantly improved\n\n#### Version 1.1.1\n- fixed a potential crash scenario if -stop() is called multiple times\n\n#### Version 1.1.0\n- fixed a problem that sometimes caused a crash after capturing a photo.\n- improved code structure, didChangeDevice delegate is now also triggered for the first default device.\n\n[1]: http://github.com/omergul123/LLVideoEditor\n[2]: http://omerfarukgul.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomergul%2FLLSimpleCamera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomergul%2FLLSimpleCamera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomergul%2FLLSimpleCamera/lists"}