Android Camera device changes orientation rather than facing back

I am using enumerateDevices to list the devices, and while changing the camera face from front to back, the orientation is changed. The front-facing camera changes the orientation rather than pointing to back facing camera. My list of devices are:

            "kind": "videoinput",
            "label": "Camera 0, Facing back, Orientation 90",
            "groupId": "",
            "deviceId": "0",
            "facing": "environment"
            "kind": "videoinput",
            "label": "Camera 1, Facing front, Orientation 270",
            "groupId": "",
            "deviceId": "1",
            "facing": "front"

On iOS, it works fine. Is there any fix to this issue?

Bit of an unusual issue.
So what you are saying, if you run the _switchCamera function on the active video stream it doesn’t change from the front camera to the back camera but instead just changes the front cameras orientation?

I am not using _switchCamera API; rather, I am trying to use the devices API to change camera orientation. This works fine on google devices like pixel and also on oneplus devices. But on xiaomi, the front camera is mirrored even though a correct device is returned from the response.

Back camera device info from xiaomi:

{"deviceId": "0", "facing": "environment", "groupId": "", "kind": "videoinput", "label": "Camera 0, Facing back, Orientation 90"}

Back camera device info from pixel XL:

{"deviceId": "0", "facing": "environment", "groupId": "", "kind": "videoinput", "label": "0"}

Do Xiaomi devices list the same outputs multiple times but with different orientations?
Bit of an unusual issue and hard to understand but looking at your pull request now.

Thanks for the contributions, should be resolved in v106.0.4 :+1: