Camera class

Specifies a camera on the client machine.

The DeviceManager object dispatches a devicesDetected event. This event object (defined by the DeviceStatusEvent class) includes a cameras property that is an array of Camera objects. It also includes a selectedCamera object, which is a Camera object.

The DevicePanel object dispatches a devicesSelected event (defined by the DeviceEvent class), which includes a camera property, which is a Camera object.

The Publisher object dispatches deviceInactive and invalidDeviceName events (defined by the DeviceEvent class), which each include a camera property, which is a Camera object.

For a code example that uses the Camera object, see DeviceManager Example.

Camera properties

The Camera object has the following properties:

name (String) — The name identifying the camera.

status (String) — The status of the the camera: either "active", "inactive", "invalid", or "unknown". If the value is "unknown", the user has not granted permission to use the camera (in the Flash Player Settings dialog box). The value is set to "invalid" for a Camera object that is the camera property of the invalidDeviceName event.

Note: Camera properties should only be used as read-only entities. The results of using JavaScript to directly change the values of Camera properties will be unpredictable.

IRC Live Chat

Have a quick question? Chat with TokBox Support on IRC. Join chat