Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

LCCS Webcam component rotated by 90 degrees

Avatar

Former Community Member

Hi,

I am currently developing an Android project implementing the webcam component of LCCS.When i test it on my laptop as an AIR application,it works normally.When i port it into my Android device,the camera image is rotated by 90 degrees to the left,regardless whether its in Portrait or Landscape mode.Any one knows why?Please advice.Thanks

Regards,

Tan

3 Replies

Avatar

Employee

I noticed that too. We'll try to get it fixes for the next sdk release (and if it is an easy fix we'll publish a swc earlier)

Sent from my iPhone

Avatar

Employee

Actually I did some more digging and I think this is a "feature"

Turns out that for mysterious reasons (that have to do with the native APIs) the mobile FlashPlayer always returns video as if in landscape mode. It's even documented here (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Camera.html) :

"A Camera instance captures video in landscape aspect ratio. On devices that can change the screen orientation, such as mobile phones, a Video object attached to the camera will only show upright video in a landscape-aspect orientation. Thus, mobile apps should use a landscape orientation when displaying video and should not auto-rotate."

I am not sure of what is/will be implemented for the front-facing camera (where the "natural" orientation is portrait - the front facing camera should be supported already in iOS so you can test that on an iPhone).

Anyway, just to make sure I wrote a simple ActionScript only mobile application (no LCCS involved) that displays the current camera, and then just for the fun of it I added auto-rotation. I am not sure I agree that an application that uses the camera and the video object should only support portrait mode, again especially when using the front-facing camera so at some point we may think about adding some support for rotating the video object in the WebCamSubscriber (maybe you'll have to call a "rotate" method when you detect the orientation change). For now you can try adding some of my code to your application (you may need to subclass the WebCamSubscriber in order to access the internal Video object). I have attached the file.