Apparence-io / CamerAwesome

📸 Embedding a camera experience within your own app shouldn't be that hard. A flutter plugin to integrate awesome Android / iOS camera experience.
https://ApparenceKit.dev
MIT License
906 stars 199 forks source link

android camere preview issue #449

Open muxacarin opened 4 months ago

muxacarin commented 4 months ago

Steps to Reproduce

in CameraAwesomeBuilder.awesome set sensorConfig: SensorConfig.single(aspectRatio: CameraAspectRatios.ratio_1_1)

recode video

example code

class MainApp extends StatelessWidget {
  const MainApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: CameraAwesomeBuilder.awesome(
            sensorConfig:
                SensorConfig.single(aspectRatio: CameraAspectRatios.ratio_1_1),
            saveConfig: SaveConfig.video(
              pathBuilder: (sensors) async {
                return SingleCaptureRequest(
                    '/storage/emulated/0/Download/Video.mp4', sensors.first);
              },
              videoOptions: VideoOptions(
                enableAudio: false,
                quality: VideoRecordingQuality.lowest,
                ios: CupertinoVideoOptions(fps: 5),
              ),
            ),
            previewFit: CameraPreviewFit.contain,
          ),
        ),
      ),
    );
  }
}

Expected results

preview should 1:1

Actual results

preview is 4:3

recoded file is 1:1

About your device

Brand Model OS
android galaxy 8+ AOS 13 (LineageOS 20)

Your flutter version

Flutter 3.16.7 • channel stable • https://github.com/flutter/flutter.git Framework • revision ef1af02aea (7 weeks ago) • 2024-01-11 15:19:26 -0600 Engine • revision 4a585b7929 Tools • Dart 3.2.4 • DevTools 2.28.5