Packagecom.distriqt.extension.scanner
Classpublic class CameraOptions
InheritanceCameraOptions Inheritance Object

Camera options for the scanner



Public Properties
 PropertyDefined By
  camera : String = rear
Select either the front or rear camera to use for the scanner.
CameraOptions
  refocusInterval : Number = 0
A refocus interval, allowing you to force a refocus on a periodic interval.
CameraOptions
  torchMode : String = auto
Select the mode to use for the flash.
CameraOptions
Public Methods
 MethodDefined By
  
Constructor
CameraOptions
  
setCamera(camera:String):CameraOptions
Sets the camera device to use for this scanning session
CameraOptions
  
setRefocusInterval(refocusInterval:Number):CameraOptions
Sets the refocus interval
CameraOptions
  
setTorchMode(torchMode:String):CameraOptions
Sets the torch mode to use
CameraOptions
Public Constants
 ConstantDefined By
  CAMERA_FRONT : String = front
[static] Selects the front facing camera if available
CameraOptions
  CAMERA_REAR : String = rear
[static] Selects the default / rear camera for the scanner
CameraOptions
  TORCH_AUTO : String = auto
[static] If a flash is available, the device will enable torch mode if the scene is dark at scanner start.
CameraOptions
  TORCH_OFF : String = off
[static] Disables the flash/torch mode.
CameraOptions
  TORCH_ON : String = on
[static] If a flash is available, turns the flash mode to torch.
CameraOptions
Property Detail
cameraproperty
public var camera:String = rear

Select either the front or rear camera to use for the scanner. Defaults to the rear / default device camera. Supported:

See also

CAMERA_FRONT
CAMERA_REAR
setCamera()
refocusIntervalproperty 
public var refocusInterval:Number = 0

A refocus interval, allowing you to force a refocus on a periodic interval. This is useful if you find your codes aren't being scanned quick enough by the extension. A value of 0 means that the normal camera autofocus is used. Supported on:

See also

torchModeproperty 
public var torchMode:String = auto

Select the mode to use for the flash. This will default to auto where the device will turn the flash to torch mode if required. If the device doesn't have a flash then this option will be ignored. eg front camera on an iPhone Supported:

See also

TORCH_ON
TORCH_OFF
TORCH_AUTO
setTorchMode()
Constructor Detail
CameraOptions()Constructor
public function CameraOptions()

Constructor

Method Detail
setCamera()method
public function setCamera(camera:String):CameraOptions

Sets the camera device to use for this scanning session

Parameters

camera:String — The camera device

Returns
CameraOptionsCameraOptions instance for chaining calls

See also

setRefocusInterval()method 
public function setRefocusInterval(refocusInterval:Number):CameraOptions

Sets the refocus interval

Parameters

refocusInterval:Number — The refocus interval

Returns
CameraOptionsCameraOptions instance for chaining calls

See also

setTorchMode()method 
public function setTorchMode(torchMode:String):CameraOptions

Sets the torch mode to use

Parameters

torchMode:String — The torch mode

Returns
CameraOptionsCameraOptions instance for chaining calls

See also

Constant Detail
CAMERA_FRONTConstant
public static const CAMERA_FRONT:String = front

Selects the front facing camera if available

CAMERA_REARConstant 
public static const CAMERA_REAR:String = rear

Selects the default / rear camera for the scanner

TORCH_AUTOConstant 
public static const TORCH_AUTO:String = auto

If a flash is available, the device will enable torch mode if the scene is dark at scanner start.

TORCH_OFFConstant 
public static const TORCH_OFF:String = off

Disables the flash/torch mode.

TORCH_ONConstant 
public static const TORCH_ON:String = on

If a flash is available, turns the flash mode to torch.