SelectFrameRateByIndex Method
Description
Selects the framerate of the current selected souce by the index.
| ActiveX Edition | Plug-in Edition | Mac Edition |
|---|---|---|
| Since V8.0 | Since V8.0 | Not Supported |
Syntax
Boolean ObjectName. SelectFrameRateByIndex(Long Index)
Parameters
Long Index: The framerate index of current 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
Before Setting the framerate index , check the FrameRateListCount property to get the total framerate count in the list and make sure your index is meaningful and correct.
Get the setting result by calling the FrameRate property;
See also
GetFrameRateByIndex() method, FrameRateListCount property, FrameRate property
Sample
A JavaScript sample is provided.
<script language="javascript">
function btnSelectFrameRateByIndex_onclick() {
listcount = Webcam.FrameRateListCount;
alert(listcount);
Webcam.SelectFrameRateByIndex(listcount-1);
framerate = Webcam.GetFrameRateByIndex(listcount-2);
alert(Webcam.FrameRate);
}
</script>
