Package | com.distriqt.extension.scanner |
Class | public class CameraOptions |
Inheritance | CameraOptions Object |
Property | Defined 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 |
Method | Defined 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 |
Constant | Defined 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 |
camera | property |
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
refocusInterval | property |
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
torchMode | property |
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
CameraOptions | () | Constructor |
public function CameraOptions()
Constructor
setCamera | () | method |
public function setCamera(camera:String):CameraOptions
Sets the camera device to use for this scanning session
Parameters
camera:String — The camera device
|
CameraOptions — CameraOptions instance for chaining calls
|
See also
setRefocusInterval | () | method |
public function setRefocusInterval(refocusInterval:Number):CameraOptions
Sets the refocus interval
Parameters
refocusInterval:Number — The refocus interval
|
CameraOptions — CameraOptions 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
|
CameraOptions — CameraOptions instance for chaining calls
|
See also
CAMERA_FRONT | Constant |
public static const CAMERA_FRONT:String = front
Selects the front facing camera if available
CAMERA_REAR | Constant |
public static const CAMERA_REAR:String = rear
Selects the default / rear camera for the scanner
TORCH_AUTO | Constant |
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_OFF | Constant |
public static const TORCH_OFF:String = off
Disables the flash/torch mode.
TORCH_ON | Constant |
public static const TORCH_ON:String = on
If a flash is available, turns the flash mode to torch.