Expand Minimize

VideoDeviceController.Zoom | zoom property

Applies to Windows and Windows Phone

Gets and sets the camera's zoom setting.

Syntax


var zoom = videoDeviceController.zoom;

Property value

Type: MediaDeviceControl

A MediaDeviceControl object that provides methods to get and set the zoom.

Remarks

Zoom is specified in millimeters.

Examples

The following example shows how to get the value of this property.


// Get the step size, minimum value, and maximum value of the zoom property to set 
// values on a slider control.

function setZoomSlider() {

    var videoDev = null;
    var bValue = null;

    var mediaDevice = new Windows.Media.Capture.MediaCapture();
    videoDev = mediaDevice.videoDeviceController;

    if (videoDev.zoom.capabilities.step !== 0)
    {
        bValue = videoDev.brightness.tryGetValue();
        document.getElementById("slZoom").value = bValue.value;
        document.getElementById("slZoom").min = videoDev.zoom.capabilities.min;
        document.getElementById("slZoom").max = videoDev.zoom.capabilities.max;
        document.getElementById("slZoom").step = videoDev.zoom.capabilities.step;
    } 
}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.Devices
Windows::Media::Devices [C++]

Metadata

Windows.winmd

See also

VideoDeviceController

 

 

Show:
© 2014 Microsoft