Question

In my AS3 Flex Mobile application for Android, I am using camera and it is being automatically rotated 90 degrees before I even done any video rotation by myself, it seems like it's a known bug in AIR. But I was wondering if anyone found a solution since it's really pretty important feature for mobile application developer.

I've tried to do some rotation manually in my code, but it is only fixes the view on my display, but still sends the wrong video to the receiver.

If any code is required I will add the snippets

Please let me know.

No correct solution

OTHER TIPS

As you mentioned, this is a known bug with AIR. It is not consistent, either. On some devices, it is in the correct orientation but in some (and all iOS devices, I believe, though I haven't fully tested that), it is rotated as you are seeing. For example, it was always oriented correctly on my Nexus 4 and on my Nexus 5, but a friends Moto X is rotated incorrectly.

Unfortunately, I don't believe there is anything you can do short of having the user do a calibration (i.e. overlay a straight line and tell them to place it horizontally and click a button) and rotating the camera display and any images you take with the display.

That being said, if you are using the camera to take photos, I highly recommend using CameraUI instead, which is the native implementation.

I've faced the same issue today but i'm developping in Java, not with AIR so i don't know if it the same, for me the solution was to add this line before starting the recording.

            mMediaRecorder.setOrientationHint(90);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top