feat: Implement exposure
(#2173)
* feat: Implement `exposure` (iOS) * Update Podfile.lock * Format * Expose exposure in format * Set exposure in Camera2 * fix: Fix exposure calculation * Add exposure docs
This commit is contained in:
@@ -285,6 +285,20 @@ extension CameraSession {
|
||||
device.videoZoomFactor = clamped
|
||||
}
|
||||
|
||||
// pragma MARK: Exposure
|
||||
|
||||
/**
|
||||
Configures exposure (`exposure`) as a bias that adjusts exposureTime and ISO.
|
||||
*/
|
||||
func configureExposure(configuration: CameraConfiguration, device: AVCaptureDevice) {
|
||||
guard let exposure = configuration.exposure else {
|
||||
return
|
||||
}
|
||||
|
||||
let clamped = max(min(exposure, device.maxExposureTargetBias), device.minExposureTargetBias)
|
||||
device.setExposureTargetBias(clamped)
|
||||
}
|
||||
|
||||
// pragma MARK: Audio
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user