SelectResolutionForCamByIndex Method
Description
Selects the resolution of the current camera souce by the index.
| ActiveX Edition | Plug-in Edition | Mac Edition |
|---|---|---|
| Since V8.0 | Since V8.0 | Not Supported |
Syntax
Boolean ObjectName. SelectResolutionForCamByIndex(Long Index)
Parameters
Long Index: The resolution index of current camera source. The index is 0-based.
Return value
Boolean.
TRUE indicates success. FALSE indicates failure.
When an error occurs and IfThrowException property is TRUE, an exception will be thrown.
When FALSE is returned or an exception is thrown, check ErrorCode property and ErrorString property for error information.
Remarks
This method is proveded for setting the resolution of the camera. Before setting the index , check the ResolutionForCamListCount property to get the total resolution count in the list and make sure your index is meaningful and correct.
Get the setting result by calling the ResolutionForCam property;
See also
GetResolutionForCamByIndex() method, ResolutionForCam property, ResolutionForCamListCount property
Sample
A JavaScript sample is provided.
<script language="javascript">
function btnSelectResolutionForCamByIndex_onclick() {
listnum = Webcam.ResolutionForCamListCount;
alert(listnum);
Webcam.SelectResolutionForCamByIndex (listnum-1);
resolution = Webcam.ResolutionForCam;
alert(resolution);
}
</script>
