Using devices camera input in portrait

Hi,
I'm using the devices camera and I want to use it in my app and have the app in portrait. The problems is that when I get the camera while the app is in portrait the camera is always rotated wrong. The camera's rotation is fine when using landscape.
Does anyone have any solutions?
Here is my code:
package 
          import flash.display.MovieClip;
          import flash.media.Camera;
          import flash.media.Video;
          import flash.display.StageScaleMode;
          import flash.display.StageAlign;
          public class Main extends MovieClip
                    private var cam:Camera;
                    private var vid:Video;
                    public function Main()
                              stage.scaleMode = StageScaleMode.NO_SCALE;
                              stage.align = StageAlign.TOP_LEFT;
                              cam = Camera.getCamera();
                              trace(Camera.names);
                              cam.setMode(stage.fullScreenWidth, stage.fullScreenHeight, 30);
                              trace("cam.width = " + cam.width);
                              trace("cam.height = " + cam.height);
                              vid = new Video(cam.width, cam.height);
                              vid.attachCamera(cam);
                              addChildAt(vid, 0);

Depending on your situation, it is possible to put the Video inside a MovieClip (not sure if you can do it with DisplayObject) and just rotate the MovieClip however you want. If portrait is wrong while landscape is ok, then you'll probably need to listen for orientation events and handle accordingly. Good luck

Similar Messages

  • Barcode scanner using device camera (QuaggaJS)

    Hi,
    I'm revisiting an old project where I used the Lightswitch HTML client. My client has suggested that they maybe start using barcodes on their assets that they're storing information about in the db and have asked me about the use of the device camera for
    scanning barcodes.
    I've found a JS library called QuaggaJS (http://serratus.github.io/quaggaJS/) and wondered if anyone had come across it before either in a LS enviroment or other type of enviroment. Have you had any success
    in using it?
    If not, has anyone else implemented such a JS library for doing as my client requests?
    Any pointers or advice would be appreciated.
    Thanks,
    Paul.

    HI Paul,
    For this Barcode scanner issue, we discussed it before, and we can use build-in camera to Shoot and upload Photos, and use JavaScript program
    jsqrcode to decode the QR/barcode. 
    If you want to use JS library- QuaggaJS (http://serratus.github.io/quaggaJS/), you can also test it on your side.
    Resource available:
    https://social.msdn.microsoft.com/Forums/en-US/b01c0b99-4d53-4ec7-ba58-ccf2473b278c/lightswitch-htmlclient-and-barcode-scanningreading-from-a-mobile-phone?forum=lightswitch
    Hope it helps.
    Regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Using a devices camera and adding the image to the display list

    Hi,
    My students and I have not been able to make an AIR app that can take a picture using the devices camera and then add the image to the display list. We are able to open the devices camera and of course take a picture, but that's it.
    We've been using these two tutorials/examples:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/CameraUI.ht ml
    and
    http://tv.adobe.com/watch/adc-presents/input-for-mobile-devices-camera/
    I've uploaded our project: http://www.dayvid.com/professor/camera.zip
    Can someone help us out?
    Thanks!
    Below is the main document class:
    package  {
    import flash.desktop.NativeApplication;
    import flash.display.Loader;
    import flash.display.MovieClip;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.ErrorEvent;
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    import flash.events.MediaEvent;
    import flash.media.CameraUI;
    import flash.media.MediaPromise;
    import flash.media.MediaType;
    import flash.events.MouseEvent;
         public class Main extends MovieClip{
              private var deviceCameraApp:CameraUI = new CameraUI();
              private var imageLoader:Loader;
              public function Main()
                   this.stage.align = StageAlign.TOP_LEFT;
                   this.stage.scaleMode = StageScaleMode.NO_SCALE;
                                     camera_btn.addEventListener(MouseEvent.CLICK, cameraBtnClicked);
                          private function cameraBtnClicked(event:MouseEvent):void
                                    if( CameraUI.isSupported )
                                                      result_txt.text = "Initializing camera...";
                                                      deviceCameraApp.addEventListener( MediaEvent.COMPLETE, imageCaptured );
                                                      deviceCameraApp.addEventListener( Event.CANCEL, captureCanceled );
                                                      deviceCameraApp.addEventListener( ErrorEvent.ERROR, cameraError );
                                                      deviceCameraApp.launch( MediaType.IMAGE );
                   else
                                                      result_txt.text = "Camera interface is not supported.";
              private function imageCaptured( event:MediaEvent ):void
                   result_txt.text = "Media captured...";
                   var imagePromise:MediaPromise = event.data;
                   if( imagePromise.isAsync )
                    result_txt.text = "Asynchronous media promise.";
                    imageLoader = new Loader();
                    imageLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, asyncImageLoaded );
                    imageLoader.addEventListener( IOErrorEvent.IO_ERROR, cameraError );
                    imageLoader.loadFilePromise( imagePromise );
                   else
                    result_txt.text = "Synchronous media promise.";
                    imageLoader.loadFilePromise( imagePromise );
                    showMedia( imageLoader );
              private function captureCanceled( event:Event ):void
                   result_txt.text = "Media capture canceled.";
                   NativeApplication.nativeApplication.exit();
              private function asyncImageLoaded( event:Event ):void
                   result_txt.text = "Media loaded in memory.";
                   showMedia( imageLoader );   
              private function showMedia( loader:Loader ):void
                   this.addChild( loader );
              private function cameraError( error:ErrorEvent ):void
                   result_txt.text = "Error:" + error.text;
                   NativeApplication.nativeApplication.exit();

    Hi,
    Do I have to add the picture to the cameraroll in order to add it to the AIR apps display list?
    Both examples from Adobe claim that their examples work. Do they not?
    In the example, the event handler asyncImageLoaded is never called. The output text field shows -   result_txt.text = "Asynchronous media promise."; So the Event.COMPLETE is being added. But I don't think it's being dispatched.
    Any ideas?

  • I got lightning to usb camera adapter but get fault message on ipad mine "cannot use device" the connected usb device requires too much power

    I tried to use lightning to usb camera adapter but every time I plug it into my ipad mine it give cannot use device. the connected usb device requires too much power. how could I use this attachment.

    Or use the camera's SD card instead.
     Cheers, Tom

  • Error cannot use device the connected USB device requires too much power this error appeared  when I added my camera

    Error appeared when I connected my camera to iPad I used a camera connection device error  cannot use device t he connected USB device requires too much power
    Thanking you
    Wendy Banks

    Some cameras are designed to use the power suppled via USB when they're plugged into another device, usually a PC or laptop. The iPad does not supply sufficient power for a camera. The iPad Camera kit allows for either a camera to be plugged in only for the transfer of photos, not as a power sourse, or the removal of the SD Card from a camera so it can transfer photos as an alternative.

  • Using the Device Camera without CameraUI

    Hello,
    I am building an iOS Application with this code here: Flex Use the camera without cameraUI
    The Aim is to render some text in the picture. The picture of the Device Camera is projected onto the Screen with some Text as "Real-Time-Preview". Some Examples are here: http://ilovemyhoodapp.tumblr.com/
    The Problem is, that i only can access the VIDEO Camera of the Device but not the PHOTO Camera. If you are switching between the default cam Application in iOS there is a noticeable difference between the PHOTO and the VIDEO Camera/Format as you can see.
    In Video the Objects are kind of bigger/closer, so I like the PHOTO-Mode a lot more and want to use that for my app.
    Anybody can help here?
    Thanks in advance,
    Chris

    Hi
    For MSN have a look at aMSN http://www.macupdate.com/info.php/id/14200
    And Mercury http://www.macupdate.com/info.php/id/14970 For video.
    If your talking to PC's you might be better off trying Skype http://www.skype.com/download/skype/macosx/20beta.html and the PC needs Skype as well.
    Tony

  • I have a macmini on order, I wonder if I can pair the wireless apple keyboard and magic touchpad without using any other input devices, especially, since everything is brand new and not yet paired.

    I have a macmini on order, I wonder if I can pair the wireless apple keyboard and magic touchpad without using any other input devices, especially, since everything is brand new and not yet paired.

    You may just want to save yourself any possible issues
    by just hooking up a wired keyboard and mouse on first
    start up.  Any USB keyboard and mouse should work.
    There have been many that have had problems on first boot
    using the Bluetooth devices. 

  • Does anybodys iphone 4s get very hot when using devices such as camera?

    The side of my new iphone 4s get so hot on the top corner you cant keep you finger on it when using my camera. I know there is a problem with the battery but mine drops so fast it rarely lasts the day. Is their anything i can do now?

    neilfromgrays wrote:
    The side of my new iphone 4s get so hot on the top corner you cant keep you finger on it when using my camera. I know there is a problem with the battery but mine drops so fast it rarely lasts the day. Is their anything i can do now?
    It would not be uncommon for the 4S to get a LITTLE WARM while getting used with the screen on etc, but not to the point where it gets so hot that you cannot keep your finger on it.
    If you can easily replicate the problem and you got it from an Apple Store then I would make an appointment to have it looked at/replaced.
    If you got the 4S from elsewhere then I would get in contact with them and arrange for it to be looked at/replaced.

  • Using iPad2 Camera in DPS publication

    We are investigating the feasibility of creating an HTML stack that would appear mid-issue, that would allow users to take a picture with their camera and insert in to the layout. Was wondering if this is possible within the DPS environment?
    Much thanks!
    Stephen

    You can use the camera inside DPS publications on devices running iOS 6 or later. This is a built-in feature of HTML in iOS6. Earlier versions of the OS don't have support for this.
    To access the camera use something like this:
    <input type=file accept="video/*">  (for video files)
    <input type=file accept="image/*"> (for pictures)
    There isn't any way to get at the GPS in a DPS publication currently.
    Neil

  • Anyone using either Camera: Logitech / Microsoft?

    I am considering buying a webcam w/microphone for my PowerMac.
    I have looked at two:
    Logitech STX
    http://www.logitech.com/index.cfm/webcam_communications/webcams/devices/352&cl=u s,en
    and the
    Microsoft VX-3000
    http://www.microsoft.com/hardware/digitalcommunication/ProductDetails.aspx?pid=0 01&active_tab=systemRequirements
    Anyone using these cameras with success?
    I am used to my DIgital camera, but it keeps falling off the monitor
    Dwaine
    PowerMac Dual 2GHz G5   Mac OS X (10.4.9)  

    Hello Singitloud
    With 10.4.9, if you decide to buy a USB webcam, you will want a "UVC" camera. Which manufacturer's UVC cam is a matter of your choice, but be sure to look for a "UVC" model so you do not need to add additional drivers. You can find some more info in this post:
    http://discussions.apple.com/message.jspa?messageID=4266538#4266538
    If you plan to use your webcam with iMovie, too, you will want a Firewire model. iMovie (and other apps that require Firewire DV input) will not be able to use the USB cams, including the new UVC ones.
    There are a couple of currently available Firewire cams listed in this post by Defcom(UK) here:
    http://discussions.apple.com/click.jspa?searchID=-1&messageID=4684786
    Cheers,
    Jim
      Mac OS X (10.4.9)    G5 DP 1.8  External iSight

  • How can I use multiple cameras in Quartz Composer?

    Good morning, all. This is a quartz composer question, but I can't see a quartz-composer specific forum to ask it...
    As part of a school project at ACAD we are building a rig to record the output from three video cameras to build a panoramic video. I have played with Quartz Composer to do the melding of videos recorded with this setup into a single image, and it worked very well.
    However, to do so live is the intention for this project as well, so we can build the composite video for recording (the timing of three different cameras is a bit awkward) as well as line up the cameras without having to do so separately.
    In Quartz Composer, however, the video-in plugin only reads the camera model number, not the unique GUID as seen in the System Profiler, so three identical cameras will not be read properly... you can only choose the model number, not the specific id of the camera.
    Is this a bug in Quartz Composer? Is there some top-secret plugin that is hiding somewhere that will allow you to choose the individual camera id's as seen in the system profiler? (Cameras tested have been firewire handycams streamed live, and usb cameras. identical model numbers can't be chosen as individual cameras properly)
    Thanks muchly, and please shuffle this question to the proper forum as necessary.

    I am working on a project where I need the same functionality. But even though I'm using different webcams, and can clearly select them in the menu, still only one camera works at a time. Even if I run two separate patches, with two different camera inputs, only one of them works.
    If you find any solution to this problem, I would really appreciate if you could share it.

  • Since the recent update I can no longer use my camera connection kit on any of my iPad's. Any ideas to remedy this?

    Since updating my iPad  devices  (iPad 1,2 and iPad) with the latest iOS, I can no longer use the camera connection kit to load photos directly into my camera roll. Anybody have any ideas on remedying this problem?

    Open Disk Utility, select the External Hard Drives first icon in the list of Drives, click the Repair Disk button.
    Dennis

  • How to use Phone camera for live streaming rather than using WireCast camera in Live streaming using Azure Media Services

    Hi,
    am planning to develop a live streaming app using C# and xaml.
    I have gone through the below sample and am able to stream the live content using wireacst camera.
    Azure Media Services Live Streaming Sample
    But i want to use Phone camera to stream the live video rather using wirecast camera.
    How can i use that? How to get the published URL from the C# code, is there any API to get that?
    Anybody please help me
    Regards,
    Santhosh

    Hello,
    There are no in box components that will allow you to transmit captured video from a Windows Phone device to Azure Media Services. You will need to create you own implementation. You can do this by creating a custom Media Foundation sync that can plug into
    the MediaCapture element's pipeline. You will then need to modify the captured and compressed video to align to one of the two protocols that Azure Media services can use. At this time Azure Media services can use either Smooth Streaming or RTMP for ingestion.
    You will need to create your own packager (or find compatible packager code from a 3rd party) to package the MP4 encoded data into the necessary format.
    Here is an example of how to create a custom Media Foundation sync (please note you must write your Media Foundation components using C++ MoCOM. We do not support Media Foundation components written in managed languages):
    Real-time communication sample
    I hope this helps,
    James
    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

  • HT201302 When I travel with my SLR I like to transfer all photos to the iPad so that they are more easily edited and viewed by others, using the camera kit.  Occasionally I would like to export photos - I have not found a way to do this.  Can you help?

    I occasionally have the need to export photos from the iPad to an SD card (photos that were imported using the camera kit). This is useful for e.g. to print photos while travelling.  So far I have not found this functionality anywhere, including in any apps available on iTunes.  Can anyone help?

    The camera connection kit can only be used to import photo/video files from a camera, SD card or USB flash drive. You can't import other types of files. You can't export any type of files using the camera connection kit.
    Importing Personal Photos and videos from your iOS device to your computer.
    http://support.apple.com/kb/HT4083
    This may be of interest.
    Expand your iPad's storage capacity with HyperDrive
    http://www.macworld.com/article/1153935/hyperdrive.html
    On the road with a camera, an iPad, and a Hyperdrive
    http://www.macworld.com/article/1160231/ipadhyperdrive.html
     Cheers, Tom

  • How can I use USB camera with NI cRIO 9022, please see my strange problem.

    Hi,
            I would like to use a USB camera with NI cRIO 9022. I used the same USB camera with NI USB 6216 DAQ device and developed a VI(within a PROJECT and outside it). So, It is working fine with NI USB 6216 device when I use the Vision Assistant Express VI and gets detected in its Initialization Window.  Please see JPEG File 3 where I get NO ERROR.
            I am facing a problem when I want to use it with NI cRIO 9022. What exactly I am doing in this case is:
    1) Create a NEW PROJECT
    2) Add Targets and Devices(NI cRIO 9022)
    3) Use the Scan Interface mode
    4) Create a NEW VI under the cRIO 9022 device 
    5) Use a Timed Loop(Synchronized with Scan Engine) for continuous Data Acquisition and Sending from the Analog I/O modules.
    6) Use the Vision Assistant available through the NI Vision Acquisition 2010 Module(I get STUCK HERE! The Express VI opens the Initialization Window, but I don't see the USB camera like in JPEG File 3)
    I am facing difficulties with this HOST COMPUTER, cRIO implementation differences. On my host computer I have the software packages as shown in JPEG File 1, and on my cRIO 9022 as shown in JPEG File 2.
    Can someone guide me how to overcome this and get the USB camera detected when I am using NI cRIO 9022?
    NOTE: If this is a problem with software mismatches on HOST and NI cRIO 9022 device, please see JPEG Files 1 and 2 for available software and Host and cRIO 9022.
    Thanks.
    Amar.
    Attachments:
    Host Computer Image or Vision Acquisition Software Installed.JPG ‏91 KB
    IMAQ and dx Modules Installed on my NI cRIO 9022 hardware(No NI Vision Acquisition 2010 SP1).JPG ‏82 KB
    NI Vision Acquisition Express NO Error for NI cRIO 9022.JPG ‏48 KB

    When you select My Computer, you are running the program on the PC.  In this case, the camera works because it is connected to the PC.  The scan engine doesn't work because it needs to run on the cRIO, not the PC.
    When you create the program on the cRIO, you can use the scan engine because the program is on the cRIO.  You can't use the camera because it is back on the PC, and can't be found on the cRIO.
    The project is a wonderful tool, but it may be making the programming seem too simple.  It may not be clear to you that by moving a program to a different location (PC or cRIO), it is running in an entirely different environment on a totally different machine, even though it is just a little further down in the project.  You can't easily access the hardware on one machine while running the program on the other.
    So the summary is:  The camera is attached to the PC.  The scan engine runs on the cRIO.  Never the twain shall meet.
    Bruce
    Bruce Ammons
    Ammons Engineering

Maybe you are looking for

  • Separate user accounts after already used 2 ipod nanos in admin account

    My daughter purchased a nano a month ago and we downloaded the software. (Note: The kids already had their own user accounts before I downloaded the software.) When she set up her music in the library and plugged her ipod in she was in my admin accou

  • Create a derived column based on a value within the file name

    I am importing a CSV file which is easy enough, but I have an issue where I need to manufacture a couple of column values based on the filename of the input.  So this same process will import different types of records to the same table in sql server

  • Satellite C50-A-157 Sandisk USB won't work in Recovery Media Centre

    I can't get Sandisk Cruzer USB to work in Recovery Media Centre. Have tried formatting but no luck. I read on another Toshiba forum that Sandisk USBs don't work and that you have to use a different brand. Anyone know if that's true? Thanks

  • Importing Word - not finding all the styles

    I was asked to investigate the RoboHelp software for a client to convert one of their documents onto the web. RoboHelp is a great tool and seems to do everything to match my requirements. I just have one problem that I cannot seem to shake. Every tim

  • Trojan Virus Still a Threat! Now What Do I Do?

    I was feeling a bit of relief yesterday after reinstalling Snow Leopard and the Java update. BUT then this morning I read this: http://www.pcworld.com/article/253388/new_trojan_variant_can_install_without_pas sword.html#tk.hp_new Now what should I do