Addon.Webcam.GetResolution()

Description

Retrieves the resolutions supported by the current webcam.

Syntax

.Addon.Webcam.GetResolution();

Parameters

None

Return value

An object of the type <WebcamResolution> is returned which contains a list of all available resolutions. Methods available in the object are

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

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 _ResolutionList = DWObject.Addon.Webcam.GetResolution();

var count = _ResolutionList.GetCount();

for (i = 0; i < count; i++) {
	alert("Index: " + i + "; Resolution: " + _ResolutionList.Get(i));
}

alert("Current Resolution: " + _ResolutionList.GetCurrent());

See also

Addon.Webcam.SetResolution