Skip to main content
April 25, 2011
Question

Rotate RAW CAMERA (because its stuck sideways when in portrait(bug)) in air for android

  • April 25, 2011
  • 4 replies
  • 9295 views

I'm using the Flex Hero Pre-release 4.5 and this is Flex Mobile application for android.

I have a situation where the raw camera is being displayed on the screen and it's being transmitted in a netstream. Apparently right now in AIR for android if you’re simply using the raw camera in portrait it doesnt actually shoot the camera in portrait...it’s 90 degrees in the wrong direction. So, here’s a code snippet where i rotated the video and it looks great on the phone. however, i need to attach the cam to a netstream and send it...but it sends sideways video, and i dont really want to adjust it on the far end. and I can’t attach a video to a netstream...Anyone have any ideas what I could do rather than just waiting for an AIR update for this?

//i know i have width and height mixed up, its because im rotating it in a second and i dont want it to be stretched
                                nearVideo
= new Video(near_video.height,near_video.width);

var m:Matrix = new Matrix();
//rotate here
m
.rotate(Math.PI/2);
this.nearVideo.transform.matrix = m;
//repositioning it so it looks like its fitting in the container correctly
nearVideo
.x=near_video.width;
nearVideo
.y=(near_video.height-near_video.height);

if (Camera.isSupported)
{
nearCam
= Camera.getCamera();
}

nearCam
.setMode(near_video.height,near_video.width,10);
nearVideo
.attachCamera(nearCam);
near_video
.addChild(nearVideo);

//now its all great on screen...but when this comes up

sendStream
.attachCamera(nearCam);

//i’m sending sideways video...
This topic has been closed for replies.

4 replies

Inspiring
July 31, 2013

I dont know I''m checking back a month later to see if this is resolved..... this bug has probably existed long before this post was even created (April 26th, 2011).... Sad adobe, very sad

August 5, 2013

This Issue is a known limitation for mobile devices, documented @ http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Camera.html and it is not a Runtime Issue.

A bug is already logged for the same please refer: https://bugbase.adobe.com/index.cfm?event=bug&id=2881235 .

Inspiring
August 6, 2013

I understand it is a known limitation, that was not my point.

My point is that lots of people want this problem to be solved, and even according to the bug you linked:

"... we are working on this issue to improve camera future.

Thanks

Shuo

Adobe "

August 10, 2011

it would be nice to have that is all

Inspiring
June 4, 2012

I visited the link to the bug, but it says it's closed...  WRONG!!!  This issue STILL EXISTS!!   And on the iPhone, too... 

I'm running Flex 4.6 and iOS 5.1 on a 5th Generation iPod Touch and it's still there -- I get rotated video...  I've also tried it on my Droid Bionic, running Android 2.3.4 and the newest install of the AIR run-time available on the Marketplace -- same issue.

I'll try this rotation thing and see if that works...  I hope it won't screw up the QR-Codes I'm trying to read...

L.

Inspiring
August 13, 2012

+1

Participant
August 29, 2012

The issue still persists......I am dis-appointed......Can anybody tell me how this issue will be fixed?

Inspiring
April 11, 2012

Android 4.0 + AIR 3.2 still haven't this bug fixed.

April 27, 2011

Alright, well this isn't getting anywhere. I created a bug report, so if you're reading this and you're frustrated with the camera simply not working correctly in portrait please vote up the bug report and lets get the camera fixed! thanks!

http://bugs.adobe.com/jira/browse/SDK-30317