HybridCamera

Video and photo camera for iOS

Github星跟蹤圖

version badge
Lang
platform
Carthage compatible
SwiftLint Sindre
codebeat badge
Build Status Reviewed by Hound

Features:, Description, -------------, -------------, Records video, ?, takes photos, ?, Flash on/off, ⚡, Front / Back camera, ↕️, Hold to record video, ✊, Tap to take photo, ?, Tap to focus / set exposure, ?, Pinch to zoom, ?, Looping video/photo preview, ?, Share button, ?, Programatic UI, ?, Doesn't stop Spotify, ?, Stores files in temporary, ?, Throw oriented code, ?, Persistent app authorisation, ?, Animated record button, ?, Callback based, ?, ### Why use this camera framework

  • High codebeat GPA
  • Low class scoped variable count (In order to better handle overall state)
  • Setup errors can be handled from the POV of the initiator
  • Operation errors is handled in the onCapture completion block
  • Callback based (as oppose to delegate based) More info
  • Easily styleable (The camera view is separate from the UI view)
  • No third-party libraries or Sugar
  • Entirely programatic (No storyboard)
  • Thoroughly documented (Artifacts and sideEffects etc)
  • Uses Sindre-lint style guide
  • Small footprint, only ~750 LOC (Lines of code)

Notes:

  • In order to keep things simple, The UI is CGRect based. Use your own Autolayout distro like SnapKit etc when adding additional UI

Install:

  • Carthage: github "eonist/HybridCamera" "master"
  • Manual: Open HybridCamera.xcodeproj
  • CocoaPod (Coming soon)

IMPORTANT: Make sure info.plist has these variables

Privacy - Microphone Usage Description   
Privacy - Camera Usage Description  
Privacy - Photo Library Additions Usage Description  

Example:

Example code:

self.view = HybridCamView()
view.camView.onPhotoCaptureComplete = { (image: UIImage?, url: URL?, error: Error?) in
   Swift.print("On photo capture complete \(url)")
}
hybridCamView.camView.onVideoCaptureComplete = { (url: URL?, error: Error?) in
   Swift.print("On Video capture complete \(url)")
}

Todo:

  • Add support for more orientation modes (Currently only supports portrait)
  • Add support for error resolution from the POV of initiating the camera
  • Make UI with AutoLayout ?
  • Make lib carthage support ✅
  • Fix AudioBug ✅
  • Fix FontCamera bug w/ IphoneX ✅
  • Add Spatial, Chaplin as an option to HybridCam ?
  • Add CI-Travis ?

Contributors:

主要指標

概覽
名稱與所有者eonist/HybridCamera
主編程語言Swift
編程語言Swift (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2018-06-12 21:31:44
推送於2024-07-21 11:26:56
最后一次提交2024-07-21 13:26:56
發布數0
用户参与
星數219
關注者數8
派生數34
提交數168
已啟用問題?
問題數39
打開的問題數17
拉請求數16
打開的拉請求數0
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?