Addon.Webcam.GetFrameRate()

Description

Retrieves the frame rates supported by the current webcam.

Syntax

.Addon.Webcam.GetFrameRate();

Return value

An object of the type <WebcamFrameRate> is returned which contains a list of all available frame rates. Methods available in the object are

Data Type Method Name Description
<int> GetCount() Returns the count of available frame rates.
<string> Get(int index) Returns a frame rate from the list.
<string> GetCurrent() Returns the current frame rate.

Remarks

The method should be called after Addon.Webcam.SelectSource. If there is only one data source available, it will be selected automatically.

Example

DWObject.Addon.Webcam.SelectSource(document.getElementById("source").options[document.getElementById("source").selectedIndex].text);
var _FrameRateList = DWObject.Addon.Webcam.GetFrameRate();
var count = _FrameRateList.GetCount();
for (i = 0; i < count; i++) {
    alert("Index: " + i + "; Frame Rate: " + _FrameRateList.Get(i));
}
alert("Current Frame Rate: " + _FrameRateList.GetCurrent());

See Also

Addon.Webcam.SetFrameRate()

Is this page helpful?

Leave a Reply

Your email address will not be published.