• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Part: VII Appendixes > The Camera Class

The Camera Class

Table A.17. Camera Methods
getCamera.get([index])Returns the video stream from the default camera or the camera specified by index. Returns null if no camera is available. (If more than one camera is installed, the user specifies the default camera in the Flash Player Camera Settings panel.)
setModemyCamera.setMode(width ,height ,fps [,favorSize ])Sets attributes of the camera capture mode, including height, width, and frames per second. favorSize is an optional Boolean value. To maximize frame rate at the expense of height and width, set favorSize to false. To favor maintaining height and width over frame rate, set favorSize to true.
SetMotionLevelmyCamera.setMotionLevel (sensitivity [,timeout ])sensitivity is an integer from 0 to 100 that specifies how much motion is required to invoke Camera.onActivity(true). The default is 50. timeout specifies how many milliseconds must elapse without motion before Camera.onActivity(false) is invoked. The default is 2000 (2 seconds).

Table A.18. Camera Attributes
myCamera.activityLevelThe amount of motion the camera is detecting, from 0 (none) to 100 (maximum). Prior to a myVideoObject.attachVideo() call, this is -1. Read-only.
myCamera.bandwidthThe maximum amount of bandwidth the current outgoing video feed can use, in bytes. Read-only.
myCamera.currentFpsThe rate at which the camera is capturing data, in frames per second. Read-only.
myCamera.fpsThe rate at which you would like the camera to capture data, in frames per second. Read-only.
myCamera.heightThe current capture height, in pixels. Read-only.
myCamera.indexThe index of the camera, as reflected in the array returned by Camera.names. Read-only.
myCamera.motionLevelThe amount of motion required to invoke Camera.onActivity(true). Read-only.
myCamera.motionTimeOutThe number of milliseconds between the time the camera stops detecting motion and the time Camera.onActivity(false) is invoked. Read-only.
myCamera.mutedA read-only Boolean value that specifies whether the user has allowed or denied access to the camera.
myCamera.nameThe name of the camera as specified by the camera hardware. Read-only.
Camera.namesA class property, an array of strings containing the names of all available video capture devices, including video cards and cameras. Read-only.
myCamera.qualityA number from 1 to 100 that specifies the current level of picture quality. More compression means lower quality: 1 is lowest quality, maximum compression. 100 is highest quality, no compression. Read-only.
myCamera.widthThe current capture width, in pixels. Read-only.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint