Packagesekati.media
Classpublic class CameraDevice
InheritanceCameraDevice Inheritance CoreSprite Inheritance flash.display.Sprite
ImplementsIDevice

CameraDevice provides a Camera control DisplayObject to the API.

See also

sekati.events.DeviceEvent
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/Camera.html


Public Properties
 PropertyDefined by
  activityLevel : Number
[read-only] The amount of activity the device is detecting.
CameraDevice
  bandwidth : int
he maximum amount of bandwidth the outgoing video feed can use, in bytes per second.
CameraDevice
  camera : Camera
[read-only] The attached camera driver instance.
CameraDevice
  currentFPS : Number
[read-only] The rate at which the camera is capturing data, in frames per second.
CameraDevice
  deviceIndex : int
[read-only] The index of the currently connected Camera device driver.
CameraDevice
  deviceName : String
[read-only] The name of the currently connected Camera device driver.
CameraDevice
  devices : Array
[read-only] The list of names of the available Camera device drivers.
CameraDevice
 Inheritedenabled : Boolean
Boolean stub property which subclasses implement to control core behavor availability such as interactivity, liquidity, drag-drop functionality.
CoreSprite
  fps : int
The devices current Frames Per Second.
CameraDevice
 InheritedinteractiveMode : Boolean
Specifies the mouse cursors modal state in the object as an interactive target via: buttonMode, mouseChildren & tabChildren.
CoreSprite
  loopback : Boolean
Indicates whether a local view of what the camera is capturing is compressed and decompressed (true), as it would be for live transmission using Flash Media Server, or uncompressed (false).
CameraDevice
  motionLevel : int
The amount of motion required to invoke the activity event.
CameraDevice
  muted : Boolean
[read-only] Indicates whether the user has denied access to the device (true) or allowed access (false) in the Flash Player Privacy dialog box.
CameraDevice
  quality : int
The picture quality, determined by the amount of compression applied to each video frame.
CameraDevice
 Inheritedscale : Number
The scale value.
CoreSprite
  timeout : int
The number of milliseconds which must elapse without activity to invoke the activity event.
CameraDevice
  video : Video
[read-only] The attached camera driver's Video instance.
CameraDevice
  videoHeight : int
The Video output height (note this is different than the CameraDevice.height).
CameraDevice
  videoWidth : int
The Video output width (note this is different than the CameraDevice.width).
CameraDevice
Public Methods
 MethodDefined by
  
CameraDevice(width:int = 320, height:int = 240, motionLevel:int = 50, fps:int = 15, timeout:int = 2000, bandwidth:int = 16384, quality:int = 0, autoPoll:Boolean = true)
CameraDevice Constructor
CameraDevice
 Inherited
addChildren(... args):void
Add multiple child DisplayObject's.
CoreSprite
  
destroy():void
Clean up after thy self.
CameraDevice
  
pollDevice():void
Poll the Camera device for a connection.
CameraDevice
 Inherited
toString():String
Return reflective output.
CoreSprite
Protected Methods
 MethodDefined by
  
activityHandler(e:ActivityEvent):void
Responds to camera activity.
CameraDevice
  
Connect the Camera to a Video stream.
CameraDevice
 Inherited
invalidate():void
Request a redraw, use for deferred rendering.
CoreSprite
 Inherited
offStage(e:Event = null):void
Stub: Sprite has been removed from stage.
CoreSprite
 Inherited
onStage(e:Event = null):void
Stub: Sprite has been added to stage.
CoreSprite
  
promptDevice():void
Graceful degradation: a Camera is available but the user either clicked deny or the device is busy.
CameraDevice
  
statusHandler(e:StatusEvent):void
Respond to camera status.
CameraDevice
Property detail
activityLevelproperty
activityLevel:Number  [read-only]

The amount of activity the device is detecting. Ranges from 0 (no activity detected) to 100 (a large amount of activity detected).

Implementation
    public function get activityLevel():Number
bandwidthproperty 
bandwidth:int  [read-write]

he maximum amount of bandwidth the outgoing video feed can use, in bytes per second. To specify that Flash Player video can use as much bandwidth as needed to maintain the value of quality, pass 0 for bandwidth.

Implementation
    public function get bandwidth():int
    public function set bandwidth(value:int):void
cameraproperty 
camera:Camera  [read-only]

The attached camera driver instance.

Implementation
    public function get camera():Camera
currentFPSproperty 
currentFPS:Number  [read-only]

The rate at which the camera is capturing data, in frames per second.

Implementation
    public function get currentFPS():Number
deviceIndexproperty 
deviceIndex:int  [read-only]

The index of the currently connected Camera device driver.

Implementation
    public function get deviceIndex():int
deviceNameproperty 
deviceName:String  [read-only]

The name of the currently connected Camera device driver.

Implementation
    public function get deviceName():String
devicesproperty 
devices:Array  [read-only]

The list of names of the available Camera device drivers.

Implementation
    public function get devices():Array
fpsproperty 
fps:int  [read-write]

The devices current Frames Per Second.

Implementation
    public function get fps():int
    public function set fps(value:int):void
loopbackproperty 
loopback:Boolean  [read-write]

Indicates whether a local view of what the camera is capturing is compressed and decompressed (true), as it would be for live transmission using Flash Media Server, or uncompressed (false).

Implementation
    public function get loopback():Boolean
    public function set loopback(value:Boolean):void
motionLevelproperty 
motionLevel:int  [read-write]

The amount of motion required to invoke the activity event.

Implementation
    public function get motionLevel():int
    public function set motionLevel(value:int):void
mutedproperty 
muted:Boolean  [read-only]

Indicates whether the user has denied access to the device (true) or allowed access (false) in the Flash Player Privacy dialog box.

Implementation
    public function get muted():Boolean
qualityproperty 
quality:int  [read-write]

The picture quality, determined by the amount of compression applied to each video frame. Ranges from 1 (lowest quality, max compression) to 100 (high quality, no compression). For variable picture quality, adjusted as needed to avoid exceeding bandwidth, pass 0.

Implementation
    public function get quality():int
    public function set quality(value:int):void
timeoutproperty 
timeout:int  [read-write]

The number of milliseconds which must elapse without activity to invoke the activity event.

Implementation
    public function get timeout():int
    public function set timeout(value:int):void
videoproperty 
video:Video  [read-only]

The attached camera driver's Video instance.

Implementation
    public function get video():Video
videoHeightproperty 
videoHeight:int  [read-write]

The Video output height (note this is different than the CameraDevice.height).

Implementation
    public function get videoHeight():int
    public function set videoHeight(value:int):void
videoWidthproperty 
videoWidth:int  [read-write]

The Video output width (note this is different than the CameraDevice.width).

Implementation
    public function get videoWidth():int
    public function set videoWidth(value:int):void
Constructor detail
CameraDevice()constructor
public function CameraDevice(width:int = 320, height:int = 240, motionLevel:int = 50, fps:int = 15, timeout:int = 2000, bandwidth:int = 16384, quality:int = 0, autoPoll:Boolean = true)

CameraDevice Constructor

Parameters
width:int (default = 320) — The requested capture width, in pixels.
 
height:int (default = 240) — The requested capture width, in pixels.
 
motionLevel:int (default = 50) — The amount of motion required to dispatch the activity event. Ranges from 0 - 100 (Flash Player defaults to 50, however 25 is more accurate for body motion. Note: the lower the value the greater the bandwidth usage in a NetStream).
 
fps:int (default = 15) — The requested rate at which the camera should capture data, in frames per second.
 
timeout:int (default = 2000) — How many milliseconds must elapse without activity before a activity event is dispatched.
 
bandwidth:int (default = 16384) — The maximum amount of bandwidth the outgoing video feed can use, in bytes per second. To specify that Flash Player video can use as much bandwidth as needed to maintain the value of quality, pass 0 for bandwidth.
 
quality:int (default = 0) — The picture quality, determined by the amount of compression applied to each video frame. Ranges from 1 (lowest quality, max compression) to 100 (high quality, no compression). For variable picture quality, adjusted as needed to avoid exceeding bandwidth, pass 0.
 
autoPoll:Boolean (default = true) — Determines whether the device is auto-polled for (true) or not (false).
Method detail
activityHandler()method
protected function activityHandler(e:ActivityEvent):void

Responds to camera activity.

Parameters
e:ActivityEvent
connectDevice()method 
protected function connectDevice():void

Connect the Camera to a Video stream.

destroy()method 
public override function destroy():void

Clean up after thy self.

pollDevice()method 
public function pollDevice():void

Poll the Camera device for a connection.

promptDevice()method 
protected function promptDevice():void

Graceful degradation: a Camera is available but the user either clicked deny or the device is busy.

statusHandler()method 
protected function statusHandler(e:StatusEvent):void

Respond to camera status.

Parameters
e:StatusEvent