{"id":22257659,"url":"https://github.com/shakurocom/videocamera","last_synced_at":"2025-10-13T12:31:06.219Z","repository":{"id":65433457,"uuid":"530961908","full_name":"shakurocom/VideoCamera","owner":"shakurocom","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-28T05:50:19.000Z","size":1348,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T06:28:15.629Z","etag":null,"topics":["camera","capture-video","component","swift","uikit","video","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shakurocom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-31T06:31:36.000Z","updated_at":"2024-12-31T07:28:03.000Z","dependencies_parsed_at":"2024-12-03T08:11:41.279Z","dependency_job_id":"537a2b02-941e-451d-915f-b893ef4a4fdd","html_url":"https://github.com/shakurocom/VideoCamera","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakurocom%2FVideoCamera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakurocom%2FVideoCamera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakurocom%2FVideoCamera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakurocom%2FVideoCamera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shakurocom","download_url":"https://codeload.github.com/shakurocom/VideoCamera/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236345677,"owners_count":19134307,"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":["camera","capture-video","component","swift","uikit","video","xcode"],"created_at":"2024-12-03T08:11:37.189Z","updated_at":"2025-10-13T12:31:06.214Z","avatar_url":"https://github.com/shakurocom.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Shakuro VideoCamera](Resources/title_image.png)\n\u003cbr\u003e\u003cbr\u003e\n# VideoCamera\n![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)\n![Platform](https://img.shields.io/badge/platform-iOS-lightgrey.svg)\n![License MIT](https://img.shields.io/badge/license-MIT-green.svg)\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [License](#license)\n\nWrapper around AVFoundation camera. Works with several data outputs, such as metadata, video data, still image capture.\n\n## Requirements\n\n- iOS 15.0+\n- Xcode 16.0+\n- Swift 5.0+\n\n## Installation\n\n### CocoaPods\n\nTo integrate VideoCamera into your Xcode project with CocoaPods, specify it in your `Podfile`:\n\n```ruby\npod 'Shakuro.VideoCamera'\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n### Manually\n\nIf you prefer not to use CocoaPods, you can integrate Shakuro.VideoCamera simply by copying it to your project.\n\n## Usage\n\nEach `VideoCamera` must be provided with `VideoCameraConfiguration` structure. Go though it's extensive array of settings. For a simple setup of back-facing camera, that provides only video data preview without ability to get still images:\n\n```swift\nprivate var camera: VideoCamera?\n\noverride func viewDidLoad() {\n    super.viewDidLoad()\n    \n    // ...\n    \n    var cameraConfig = VideoCameraConfiguration()\n    cameraConfig.cameraDelegate = self\n    cameraConfig.captureSessionPreset = .high\n    cameraConfig.capturePhotoEnabled = false\n    cameraConfig.videoFeedDelegate = self\n    cameraConfig.simulatedImage = UIImage(named: \"card_backside.png\")?.cgImage\n    let videoCamera = VideoCameraFactory.createCamera(configuration: cameraConfig)\n    camera = videoCamera\n    \n    // ...\n}\n```\n\nTo display camera preview, one of the simplest ways is to prepare container view in storyboard and than add camera's preview to it:\n\n```swift\n@IBOutlet private var cameraPreviewContainerView: UIView!\n\noverride func viewDidLoad() {\n    super.viewDidLoad()\n    \n    // setup camera (see above)\n\n    let preview = videoCamera.previewView\n    preview.translatesAutoresizingMaskIntoConstraints = true\n    preview.autoresizingMask = [UIViewAutoresizing.flexibleHeight, UIViewAutoresizing.flexibleWidth]\n    preview.frame = cameraPreviewContainerView.bounds\n    cameraPreviewContainerView.insertSubview(preview, at: 0)\n    \n    // ...\n}\n```\n\nChanges of camera's properties are observed via delegate:\n\n```swift\nextension MyViewController: VideoCameraDelegate {\n\n    func videoCamera(_ videoCamera: VideoCamera, error: Error) {\n        // display/process error\n    }\n\n    func videoCameraInitialized(_ videoCamera: VideoCamera, errors: [VideoCameraError]) {\n        // update UI - such as flash button (with actual state of camera)\n    }\n\n    func videoCamera(_ videoCamera: VideoCamera, flashModeForPhotoDidChanged newValue: AVCaptureDevice.FlashMode) {\n        // update flash button\n    }\n    \n    // ... other delegate functions\n    \n}\n```\n\nHave a look at the [VideoCamera_Example](https://github.com/shakurocom/VideoCamera/tree/master/VideoCamera_Example)\n\n## License\n\nShakuro.VideoCamera is released under the MIT license. [See LICENSE](https://github.com/shakurocom/VideoCamera/blob/master/LICENSE.md) for details.\n\n## Give it a try and reach us\n\nExplore our expertise in \u003ca href=\"https://shakuro.com/services/native-mobile-development/?utm_source=github\u0026utm_medium=repository\u0026utm_campaign=video-camera\"\u003eNative Mobile Development\u003c/a\u003e and \u003ca href=\"https://shakuro.com/services/ios-dev/?utm_source=github\u0026utm_medium=repository\u0026utm_campaign=video-camera\"\u003eiOS Development\u003c/a\u003e.\u003c/p\u003e\n\nIf you need professional assistance with your mobile or web project, feel free to \u003ca href=\"https://shakuro.com/get-in-touch/?utm_source=github\u0026utm_medium=repository\u0026utm_campaign=video-camera\"\u003econtact our team\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakurocom%2Fvideocamera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshakurocom%2Fvideocamera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakurocom%2Fvideocamera/lists"}