|
|
# Camera
|
|
|
|
|
|
```swift
|
|
|
Camera.authorize()
|
|
|
|
|
|
Camera.setup(camera: AVCaptureDevicePosition = .front)
|
|
|
|
|
|
Camera.start(sampleDelegate: AVCaptureVideoDataOutputSampleBufferDelegate?, completion: (Camera.SetupResult) -> Void)
|
|
|
|
|
|
Camera.stop()
|
|
|
|
|
|
Camera.snapStillImage(completion: (UIImage?) -> Void)
|
|
|
|
|
|
Camera.resumeInterruptedSession(completion: (Bool) -> Void)
|
|
|
|
|
|
Camera.focusAndExpose(focusMode: AVCaptureFocusMode, exposureMode: AVCaptureExposureMode, devicePoint: CGPoint, monitorSubjectAreaChange: Bool)
|
|
|
|
|
|
Camera.setFlashMode(flashMode: AVCaptureFlashMode, device: AVCaptureDevice)
|
|
|
|
|
|
Camera.getDevice(mediaType: String, preferredPosition: AVCaptureDevicePosition) -> AVCaptureDevice?
|
|
|
```
|
|
|
|
|
|
## Notifications
|
|
|
|
|
|
### StillImageTakenNotification
|
|
|
|
|
|
### SessionChangedRunningNotification
|
|
|
|
|
|
```swift
|
|
|
isSessionRunning: Bool
|
|
|
```
|
|
|
|
|
|
### AvailableNotification
|
|
|
|
|
|
```swift
|
|
|
available: Bool
|
|
|
```
|
|
|
|
|
|
### InterruptedNotification
|
|
|
|
|
|
```swift
|
|
|
interrupted: Bool
|
|
|
``` |