@capgo/camera-preview 7.6.0 → 7.6.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -454,12 +454,9 @@ extension CameraController {
|
|
|
454
454
|
// Configure video gravity and frame based on aspect ratio
|
|
455
455
|
if let aspectRatio = requestedAspectRatio {
|
|
456
456
|
// Calculate the frame based on requested aspect ratio
|
|
457
|
-
let frame = calculateAspectRatioFrame(for: aspectRatio, in: view.bounds)
|
|
458
|
-
previewLayer.frame = frame
|
|
459
457
|
previewLayer.videoGravity = .resizeAspectFill
|
|
460
458
|
} else {
|
|
461
459
|
// No specific aspect ratio requested - fill the entire view
|
|
462
|
-
previewLayer.frame = view.bounds
|
|
463
460
|
previewLayer.videoGravity = .resizeAspect
|
|
464
461
|
}
|
|
465
462
|
|