Highlighted

Camera.getCamera() doesn't detect built-in camera in MacOS 10.9

New Here ,
Apr 24, 2014

Copy link to clipboard

Copied

Hi,

I am using AS3 with AIR 3.1 SDK to build a live-streaming application that should be run on Windows and MacOSX. Everything works well in Windows. But when running in MacOSX (I am using Mavericks 10.9) my application can not detect built-in camera (FaceTime HD Camera). It can only capture video from USB 2.0 webcam. I've tried to quit all browsers and pretty sure that nothing is using that built-in webcam, but Camera.getCamera() still returns null.

Here is some code of mine (very ordinary and works well on Windows):

public class MyCapture {

        // Constants and Variables

        public static var _cam:Camera;          // default camera

        [Bindable] public static var strResolution:String;

        public static function set cam(c:Camera):void {

            if (!c) trace("Warning: set null camera?!");

            _cam = c;

        }

        public static function get cam():Camera {

            if (!_cam) {

                _cam = Camera.getCamera();      // get default camera on current machine

            }

            if (_cam) {

                strResolution = _cam.width + " x " + _cam.height;

            } else {

                strResolution = "";

            }

            return _cam;

        }

}

Any help will be appreciate.

TOPICS
Performance issues

Views

425

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Camera.getCamera() doesn't detect built-in camera in MacOS 10.9

New Here ,
Apr 24, 2014

Copy link to clipboard

Copied

Hi,

I am using AS3 with AIR 3.1 SDK to build a live-streaming application that should be run on Windows and MacOSX. Everything works well in Windows. But when running in MacOSX (I am using Mavericks 10.9) my application can not detect built-in camera (FaceTime HD Camera). It can only capture video from USB 2.0 webcam. I've tried to quit all browsers and pretty sure that nothing is using that built-in webcam, but Camera.getCamera() still returns null.

Here is some code of mine (very ordinary and works well on Windows):

public class MyCapture {

        // Constants and Variables

        public static var _cam:Camera;          // default camera

        [Bindable] public static var strResolution:String;

        public static function set cam(c:Camera):void {

            if (!c) trace("Warning: set null camera?!");

            _cam = c;

        }

        public static function get cam():Camera {

            if (!_cam) {

                _cam = Camera.getCamera();      // get default camera on current machine

            }

            if (_cam) {

                strResolution = _cam.width + " x " + _cam.height;

            } else {

                strResolution = "";

            }

            return _cam;

        }

}

Any help will be appreciate.

TOPICS
Performance issues

Views

426

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 24, 2014 0
New Here ,
Sep 08, 2014

Copy link to clipboard

Copied

I have encountered the same issue. Makes it very difficult to debug when the issue is on the workstation you use to code. If I create a FlashBuilder app that runs in a browser, it finds the FaceTime HD camera just fine. When I set up an app for AIR, no dice. An answer to why this is happening would be nice.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2014 0
Adobe Employee ,
Sep 10, 2014

Copy link to clipboard

Copied

If you haven't already, could you try upgrading to AIR 15 and seeing if this still occurs?  We tested this scenario out last night and could not reproduce.

Thanks,

Chris

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 10, 2014 0