Starts recording asynchronously to a storage file.
Syntax
mediaCapture.startRecordToStorageFileAsync(encodingProfile, file).done( /* Your success and error handlers */ );
Parameters
- encodingProfile
-
Type: MediaEncodingProfile
The encoding profile for the recording.
- file
-
Type: IStorageFile
The storage file where the image is saved.
Return value
Type: IAsyncAction
Returns a IAsyncAction object that is used to control the asynchronous operation.
Examples
The following example shows how to create a storage file and record to that file.
// Start the video capture. function startMediaCaptureSession() { Windows.Storage.KnownFolders.videosLibrary.createFileAsync("cameraCapture.mp4", Windows.Storage.CreationCollisionOption.generateUniqueName).then(function (newFile) { storageFile = newFile; oMediaCapture.startRecordToStorageFileAsync(profile, storageFile).then(function (result) { }, errorHandler); } ); }
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
|
Capabilities |
|
See also
Build date: 12/4/2012