CameraManager icon indicating copy to clipboard operation
CameraManager copied to clipboard

Landscape Left and Right Orientation Issue

Open tikamsingh opened this issue 4 years ago • 5 comments

Please help to support orientation perfectlly. I am getting issue in orientations

tikamsingh avatar Aug 06 '21 10:08 tikamsingh

I can see same issue.

daliborristic883 avatar Sep 24 '21 09:09 daliborristic883

@daliborristic883 How to solve the issue?

yangfan1233 avatar Mar 15 '22 09:03 yangfan1233

Same here the preview layer is halved and the view rotates.

Any solution?

joopvanduin avatar Jul 08 '22 12:07 joopvanduin

I am facing same issue but found the solution after so many days. The main issue of the orientation is in the CameraManager.swift file (Custom or cocoapod file), and you have to do changes in this file. If you are using cocoapod of the CameraManager then you have to unlock this file to do changes. Here is the solution of the landscape left and landscape right orientation issue :

In CameraManager.swift file, there is one function named "_videoOrientation", you will see switch case of deviceOrientation and in case .landscapeLeft: it will return .landscapeRight and also case .landscapeRight: it will return .landscapeLeft

So, the issue is here, you need to do below changes in those cases, and the changes are : case .landscapeLeft: return .landscapeLeft case .landscapeRight: return .landscapeRight

after you done with changes, you will check the orientation issue is fixed.

Guys, hope you will get the solution from this. 👍 Happy coding.. 😊

hiteshcmarix avatar Jul 18 '22 07:07 hiteshcmarix

Thanks @hiteshcmarix !

manuels-bts avatar Jan 26 '23 18:01 manuels-bts