Name

camera

Synopsis

LZX: camera
JavaScript: camera
Type: Class
Access: public
Topic: Extensions.Audio-Video
Declared in: lps/components/extensions/av/camera.lzx

Superclass Chain

node (LzNode) » mediadevice » camera

Known Subclasses

Details

Properties (6)

bandwidth
<attribute name="bandwidth" value="16384" />
public var bandwidth;
Camera bandwidth (in bytes per second).
favorsize
<attribute name="favorsize" value="false" />
public var favorsize;
Often several capture modes are available per camera device. These modes will allow capturing at a specific size (width/height) and framerate. If you specify both fps and width and height for this camera, this attribute will control which capturing mode for the camera device will be used.
fps
<attribute name="fps" value="null" />
public var fps;
The number of frames per second that will be captured by the camera.
height
<attribute name="height" value="null" />
public var height;
The height (resolution) that will be captured by the camera.
picturequality
<attribute name="picturequality" value="0" />
public var picturequality;
Camera picture quality: a value between 0 and 1, where 1 represents the highest quality (no compression). When 0 is passed, this indicates to use highest quality that fits into the available bandwidth
width
<attribute name="width" value="null" />
public var width;
The width (resolution) that will be captured by the camera.

Methods (5)

destroy()
<method name="destroy" />
public function destroy();
getCameraNames()
<method name="getCameraNames" />
public function getCameraNames();
Get the names of the cameras. Returns an array of strings. This might take a while to run, since it has to scan the devices.
setMode()
<method name="setMode" args="width, height, fps, favorsize" />
public function setMode(width, height, fps, favorsize);
setMode(width, height, fps, favorsize) width, height, fps: number favorsize: A Boolean value that specifies how to manipulate the width, height, and frame rate if the camera does not have a native mode that meets the specified requirements. The default is true, which means that maintaining capture size is favored; using this parameter selects the mode that most closely matches width and height values, even if doing so adversely affects performance by reducing the frame rate. To maximize frame rate at the expense of camera height and width, pass false for the favorSize parameter. This parameter is optional. The parameters are cached in the attributes width, height, fps and favorsize. TODO: If those attributes are not null, then call setMode automatically after initializing camera. Otherwise read values from camera and set attributes.
setQuality()
<method name="setQuality" args="bandwidth, picturequality" />
public function setQuality(bandwidth, picturequality);
setQuality(bandwidth, picturequality"); bandwidth: in byte per second, default value: 16384 picturequality: number from 0 to 1, default value: 0 0 means also that picturequality will be changed if bandwidth is concerned. The parameters are cached in the attributes bandwidth and picturequality. TODO: If those attributes are set, then call setQuality automatically after initializing camera. Otherwise read values from camera and set attributes.
startDevice()
<method name="startDevice" />
public function startDevice();
Start the camera.

LZX Synopsis

<class name="camera" extends=" mediadevice ">
  <attribute name=" bandwidth " value="16384" />
  <attribute name=" favorsize " value="false" />
  <attribute name=" fps " value="null" />
  <attribute name=" height " value="null" />
  <attribute name=" picturequality " value="0" />
  <attribute name=" width " value="null" />
  <method name=" destroy " />
  <method name=" getCameraNames " />
  <method name=" setMode " args="width, height, fps, favorsize" />
  <method name=" setQuality " args="bandwidth, picturequality" />
  <method name=" startDevice " />
</class>

JavaScript Synopsis

public camera extends  mediadevice  {
  public var bandwidth ;
  public var favorsize ;
  public var fps ;
  public var height ;
  public var picturequality ;
  public var width ;
  prototype public function destroy ();
  prototype public function getCameraNames ();
  prototype public function setMode (width, height, fps, favorsize);
  prototype public function setQuality (bandwidth, picturequality);
  prototype public function startDevice ();
}