Catch-all commit for outstanding pre-existing local changes. Mixes several themes that would normally be split: - Rename: UxPlugin → XPlugin across iOS, macOS, Android registrants. - New top-level packages under lib/src/: anim/ (animated values, panes, sheets, dock, measured), core/ (Emitter, ReactiveBuilder scaffolding, presenter/widget/value/dispose primitives), navi/ (Screen/ScreenStack/Router/hero/transitions), reactive/. - Edits across existing plugins (clipboard, crash, file, gallery, keyboard, scanner, sensor, url) to align with the new core. - Test updates and CHANGELOG/README touches accompanying the above.
17 lines
696 B
Swift
17 lines
696 B
Swift
import AVFoundation
|
|
|
|
/// Per-platform shim for applying capture-time rotation to an
|
|
/// `AVCaptureConnection`. On iOS the connection's `videoOrientation`
|
|
/// genuinely rotates the sample buffers / captured photo; on macOS
|
|
/// it appears to rotate stills but not preview/data-output, AND
|
|
/// desktop cameras are physically landscape so any rotation skews
|
|
/// the result. The macOS counterpart in
|
|
/// `macos/Classes/Camera/AVCaptureConnection+macOS.swift` is a no-op.
|
|
extension AVCaptureConnection {
|
|
func applyXCaptureOrientation(_ orientation: DeviceOrientationFlutter) {
|
|
if isVideoOrientationSupported {
|
|
videoOrientation = orientation.avVideoOrientation
|
|
}
|
|
}
|
|
}
|