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
910 stars 199 forks source link

Sensor switching issue when running MultiCamera example on Samsung S23+ #396

Open MaximeBeasse opened 9 months ago

MaximeBeasse commented 9 months ago

Steps to Reproduce

Using CamerAwesome v2.0.0-dev.1: Run the Multi Camera example on an Samsung S23+ (I haven't tried any other android device, but it must be capable of multi camera).

Expected results

When clicking the "switch camera" button on the bottom left, it should switch the primary preview to the front camera's and the picture In Picture preview to the back camera's.

Actual results

When switching cameras, it seems to switch between two back sensors (there is a slight zoom when switching) instead of between a back and a front sensor. If I change the following (line 85)

Sensor.position(SensorPosition.back),
Sensor.position(SensorPosition.front),

to

Sensor.id("0"),
Sensor.id("1"),

it works as intended.

About your device

Brand Model OS
Samsung S23+ 13

Your flutter version

Run this in your command line flutter --version

Flutter 3.13.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ead455963c (7 days ago) • 2023-09-26 18:28:17 -0700
Engine • revision a794cf2681
Tools • Dart 3.1.3 • DevTools 2.25.0