Packagecom.diadraw.extensions.camera
Classpublic class CameraSettings
InheritanceCameraSettings Inheritance Object

A convenience class for setting up the camera.



Public Properties
 PropertyDefined By
  cameraName : String
Determines which camera is running.
CameraSettings
  frameRate : Number
Determines the camera frame rate in frames per second.
CameraSettings
  resolutionPreset : String
Determines the resolution with which the camera is providing frames.
CameraSettings
Public Methods
 MethodDefined By
  
CameraSettings(_resolutionPreset:String, _fps:Number, _cameraName:String)
Constructor.
CameraSettings
Public Constants
 ConstantDefined By
  CAMERA_BACK : String = CAMERA_BACK
[static] The camera on the back of the device will be used.
CameraSettings
  CAMERA_FRONT : String = CAMERA_FRONT
[static] The camera on the front of the device will be used.
CameraSettings
  DEFAULT_CAMERA_NAME : String = CAMERA_BACK
[static] Default settings: if you don't provide a camera (front or back), this one will be used.
CameraSettings
  DEFAULT_MAX_FPS : Number = 30
[static] Default settings: if you don't provide a maximum frame rate (frames per second), the camera will be run with this value.
CameraSettings
  DEFAULT_MIN_FPS : Number = 5
[static] Default settings: if you don't provide a minimum frame rate (frames per second), the camera will be run with this value.
CameraSettings
  DEFAULT_PREVIEW_FPS : Number = 20
[static] Default settings: if you don't provide a preview frame rate (frames per second), this one will be used.
CameraSettings
  DEFAULT_RESOLUTION_PRESET : String = Preset640x480
[static] Default settings: if you don't provide a resolution, the camera will be run with this one.
CameraSettings
  ExposureModeAutoExpose : Number = 1
[static] Exposure mode: The device performs an auto-expose operation and reverts to locked.
CameraSettings
  ExposureModeContinuousAutoExposure : Number = 2
[static] Exposure mode: The device continuously monitors exposure levels and auto exposes when neccessary.
CameraSettings
  ExposureModeLocked : Number = 0
[static] Exposure mode: The exposure mode is fixed.
CameraSettings
  FocusModeAutoFocus : Number = 1
[static] Focus mode: The camera does a single scan focus then reverts to locked.
CameraSettings
  FocusModeContinuousAutoFocus : Number = 2
[static] Focus mode: The camera continuously auto-focuses as needed.
CameraSettings
  FocusModeLocked : Number = 0
[static] Focus mode: The focal length is fixed.
CameraSettings
  TorchModeAuto : Number = 2
[static] Torch mode: The torch will be turned on or off as needed.
CameraSettings
  TorchModeOff : Number = 0
[static] Torch mode: The torch is off.
CameraSettings
  TorchModeOn : Number = 1
[static] Torch mode: The torch is on.
CameraSettings
  WhiteBalanceModeAutoWhiteBalance : Number = 1
[static] White balance mode: The device performs an auto white balance operation now.
CameraSettings
  WhiteBalanceModeContinuousAutoWhiteBalance : Number = 2
[static] White balance mode: The device continuously monitors white balance and adjusts when necessary.
CameraSettings
  WhiteBalanceModeLocked : Number = 0
[static] White balance mode: The white balance setting is locked.
CameraSettings
Property Detail
cameraNameproperty
cameraName:String

Determines which camera is running.


Implementation
    public function get cameraName():String
    public function set cameraName(value:String):void

See also

CAMERA_FRONT
CAMERA_BACK
frameRateproperty 
frameRate:Number

Determines the camera frame rate in frames per second.


Implementation
    public function get frameRate():Number
    public function set frameRate(value:Number):void
resolutionPresetproperty 
resolutionPreset:String

Determines the resolution with which the camera is providing frames.


Implementation
    public function get resolutionPreset():String
    public function set resolutionPreset(value:String):void

See also

Constructor Detail
CameraSettings()Constructor
public function CameraSettings(_resolutionPreset:String, _fps:Number, _cameraName:String)

Constructor. Creates an instance of CameraSettings and initializes it with a resolution preset, frame rate and camera.

Parameters
_resolutionPreset:String (default = NaN) — The resolution preset to be used with the camera. Use one of the values in CameraSettingsAndroid or CameraSettingsiOS.
 
_fps:Number (default = NaN) — The frame rate in frames per second with which the camera should be run.
 
_cameraName:String (default = NaN) — Which camera should be used: front or back. Use CameraSettings.CAMERA_FRONT or CameraSettings.CAMERA_BACK.

See also

Constant Detail
CAMERA_BACKConstant
public static const CAMERA_BACK:String = CAMERA_BACK

The camera on the back of the device will be used.

CAMERA_FRONTConstant 
public static const CAMERA_FRONT:String = CAMERA_FRONT

The camera on the front of the device will be used.

DEFAULT_CAMERA_NAMEConstant 
public static const DEFAULT_CAMERA_NAME:String = CAMERA_BACK

Default settings: if you don't provide a camera (front or back), this one will be used.

DEFAULT_MAX_FPSConstant 
public static const DEFAULT_MAX_FPS:Number = 30

Default settings: if you don't provide a maximum frame rate (frames per second), the camera will be run with this value.

DEFAULT_MIN_FPSConstant 
public static const DEFAULT_MIN_FPS:Number = 5

Default settings: if you don't provide a minimum frame rate (frames per second), the camera will be run with this value.

DEFAULT_PREVIEW_FPSConstant 
public static const DEFAULT_PREVIEW_FPS:Number = 20

Default settings: if you don't provide a preview frame rate (frames per second), this one will be used.

DEFAULT_RESOLUTION_PRESETConstant 
public static const DEFAULT_RESOLUTION_PRESET:String = Preset640x480

Default settings: if you don't provide a resolution, the camera will be run with this one.

ExposureModeAutoExposeConstant 
public static const ExposureModeAutoExpose:Number = 1

Exposure mode: The device performs an auto-expose operation and reverts to locked.

ExposureModeContinuousAutoExposureConstant 
public static const ExposureModeContinuousAutoExposure:Number = 2

Exposure mode: The device continuously monitors exposure levels and auto exposes when neccessary.

ExposureModeLockedConstant 
public static const ExposureModeLocked:Number = 0

Exposure mode: The exposure mode is fixed.

FocusModeAutoFocusConstant 
public static const FocusModeAutoFocus:Number = 1

Focus mode: The camera does a single scan focus then reverts to locked.

FocusModeContinuousAutoFocusConstant 
public static const FocusModeContinuousAutoFocus:Number = 2

Focus mode: The camera continuously auto-focuses as needed.

FocusModeLockedConstant 
public static const FocusModeLocked:Number = 0

Focus mode: The focal length is fixed.

TorchModeAutoConstant 
public static const TorchModeAuto:Number = 2

Torch mode: The torch will be turned on or off as needed.

TorchModeOffConstant 
public static const TorchModeOff:Number = 0

Torch mode: The torch is off.

TorchModeOnConstant 
public static const TorchModeOn:Number = 1

Torch mode: The torch is on.

WhiteBalanceModeAutoWhiteBalanceConstant 
public static const WhiteBalanceModeAutoWhiteBalance:Number = 1

White balance mode: The device performs an auto white balance operation now.

WhiteBalanceModeContinuousAutoWhiteBalanceConstant 
public static const WhiteBalanceModeContinuousAutoWhiteBalance:Number = 2

White balance mode: The device continuously monitors white balance and adjusts when necessary.

WhiteBalanceModeLockedConstant 
public static const WhiteBalanceModeLocked:Number = 0

White balance mode: The white balance setting is locked.