Windows Dev Center

CameraCaptureUI.VideoSettings | videoSettings property

Provides settings for capturing videos. The settings include format, maximum resolution, maximum duration, and whether or not to allow trimming.

Syntax


var videoSettings = cameraCaptureUI.videoSettings;

Property value

Type: CameraCaptureUIVideoCaptureSettings

An object that provides settings for capturing videos.

Examples

The following example shows how to use the VideoSettings properties. These settings allow the user to trim the video file, which was recorded for 3 seconds in Windows Media Video (.wmv) format with standard resolution.


// Captures a video using the specified settings.
function captureVideo() {
    var captureUI = new Windows.Media.Capture.CameraCaptureUI();
    captureUI.videoSettings.allowTrimming = true;
    captureUI.videoSettings.format = Windows.Media.Capture.CameraCaptureUIVideoFormat.wmv;
    captureUI.videoSettings.maxResolution = Windows.Media.Capture.CameraCaptureUIMaxVideoResolution.standardDefinition;
    captureUI.videoSettings.maxDurationInSeconds = 3;
    captureUI.captureFileAsync(Windows.Media.Capture.CameraCaptureUIMode.video).then(function (file) {
        if (file) {
            document.getElementById("message").innerHTML = "User captured a video."
        }
        else {
            document.getElementById("message").innerHTML = "User didn't capture a video."
        }
    });
}


Requirements (device family)

Device family

Desktop

API contract

Windows.Media.Capture.CameraCaptureUIContract, introduced version 1.0

Namespace

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

Metadata

Windows.Media.Capture.CameraCaptureUIContract.winmd

Capabilities

webcam
microphone

Requirements (operating system)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

Capabilities

webcam
microphone

See also

CameraCaptureUI

 

 

Show:
© 2015 Microsoft