Set PhotoOptions

Returns a promise that resolves when the options are successfully set. Due to platform differences some options might not be valid on all platforms.

<CameraView ux:Name="Camera" />
<JavaScript>
    Camera.getCameraInfo()
        .then(function(info) {
            if ("photoResolutions" in info) {
                // photoResolutions is an array of supported resolutions, for example: { width: 1920, height: 1080 }
                var resolution = pick_appropriate_resolution(info["photoResolutions"]);
                var options = {};
                options[Camera.OPTION_PHOTO_RESOLUTION] = resolution;

                Camera.setPhotoOptions(options)
                    .then(function() { })
                    .catch(function(error) { });
            }
        })
</JavaScript>

As of now photo resolution is the only available option

Location

Namespace
Fuse.Controls
Package
Fuse.Controls.CameraView 1.9.0