getCameraList()

Description

Gets a list of available camera Data Sources.

Syntax

DCSObject.camera.getCameraList();

Parameters

None

Return value

<string[]> An array of strings containing all camera names e.g. ["HD WebCam", "HP webcam 123", "USB video driver", "Integrated Camera"]

Remarks

If it fails to get the camera list, it turns null.

Example

 var arySource = DCSObject.camera.getCameraList();
 for (var i = 0; i < arySource.length; i++) {
     //Get camera source names and put them in a drop-down box
     document.getElementById("source").options.add(new Option(arySource[i]));
 }

See also

.camera.selectCamera()