LowLagMediaRecording LowLagMediaRecording LowLagMediaRecording LowLagMediaRecording Class

Definition

Provides methods for taking a low lag media recording.

public : sealed class LowLagMediaRecording : ILowLagMediaRecording, ILowLagMediaRecording2, ILowLagMediaRecording3public sealed class LowLagMediaRecording : ILowLagMediaRecording, ILowLagMediaRecording2, ILowLagMediaRecording3Public NotInheritable Class LowLagMediaRecording Implements ILowLagMediaRecording, ILowLagMediaRecording2, ILowLagMediaRecording3// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Use the following methods on the MediaCapture class to initialize the recording, which must be called before StartAsync: PrepareLowLagRecordToStreamAsync, PrepareLowLagRecordToStorageFileAsync, and PrepareLowLagRecordToCustomSinkAsync. These are asynchronous methods which return a LowLagMediaRecording object when they are finished.

StopAsync stops the operation, which can be restarted with StartAsync.

FinishAsync stops the media recording operation and releases the LowLagMediaRecording object and resources used by the media recording operation. If you want to restart the recording after calling FinishAsync, you will need to call one of the PrepareLowLagRecord methods to initialize a new LowLagMediaRecording object.

If the media type is changed or an effect is added, you must call PrepareLowLagRecordToStreamAsync, PrepareLowLagRecordToStorageFileAsync, or PrepareLowLagRecordToCustomSinkAsync to create a new LowLagMediaRecording object.

For how-to guidance for using LowLagMediaCapture to capture video, see Basic photo, video, and audio capture with MediaCapture.

Methods

FinishAsync() FinishAsync() FinishAsync() FinishAsync()

Asynchronously releases the LowLagMediaRecording object and resources used by the media recording operation.

public : IAsyncAction FinishAsync()public IAsyncAction FinishAsync()Public Function FinishAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

Object that is used to control the asynchronous operation.

Remarks

FinishAsync stops the media recording operation and releases the LowLagMediaRecording object and resources used by the media recording operation. If you want to restart the recording after calling FinishAsync, you will need to call one of the PrepareLowLagRecord methods to initialize a new LowLagMediaRecording object.

PauseAsync(MediaCapturePauseBehavior) PauseAsync(MediaCapturePauseBehavior) PauseAsync(MediaCapturePauseBehavior) PauseAsync(MediaCapturePauseBehavior)

Pauses an ongoing low lag media record operation.

public : IAsyncAction PauseAsync(MediaCapturePauseBehavior behavior)public IAsyncAction PauseAsync(MediaCapturePauseBehavior behavior)Public Function PauseAsync(behavior As MediaCapturePauseBehavior) As IAsyncAction// You can use this method in JavaScript.
Parameters
behavior
MediaCapturePauseBehavior MediaCapturePauseBehavior MediaCapturePauseBehavior MediaCapturePauseBehavior

A value indicating whether the media capture hardware resources should be preserved or released while recording is paused.

Returns

PauseWithResultAsync(MediaCapturePauseBehavior) PauseWithResultAsync(MediaCapturePauseBehavior) PauseWithResultAsync(MediaCapturePauseBehavior) PauseWithResultAsync(MediaCapturePauseBehavior)

Pauses an ongoing low lag media record operation and provides a MediaCapturePauseResult that can be used to help the user align the camera with the last captured frame when resuming recording.

public : IAsyncOperation<MediaCapturePauseResult> PauseWithResultAsync(MediaCapturePauseBehavior behavior)public IAsyncOperation<MediaCapturePauseResult> PauseWithResultAsync(MediaCapturePauseBehavior behavior)Public Function PauseWithResultAsync(behavior As MediaCapturePauseBehavior) As IAsyncOperation( Of MediaCapturePauseResult )// You can use this method in JavaScript.
Parameters
behavior
MediaCapturePauseBehavior MediaCapturePauseBehavior MediaCapturePauseBehavior MediaCapturePauseBehavior

A value indicating whether the media capture hardware resources should be preserved or released while recording is paused.

Returns
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

ResumeAsync() ResumeAsync() ResumeAsync() ResumeAsync()

Resumes a paused low lag recording operation.

public : IAsyncAction ResumeAsync()public IAsyncAction ResumeAsync()Public Function ResumeAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

Remarks

Pause a low lag media recording operation by calling PauseAsync.

StartAsync() StartAsync() StartAsync() StartAsync()

Asynchronously starts the low lag media recording.

public : IAsyncAction StartAsync()public IAsyncAction StartAsync()Public Function StartAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

Object that is used to control the asynchronous operation.

Remarks

Before calling StartAsync, you must initialize the LowLagMediaRecording object by calling one of the prepare method on MediaCapture: PrepareLowLagRecordToStreamAsync, PrepareLowLagRecordToStorageFileAsync, and PrepareLowLagRecordToCustomSinkAsync.

StopAsync() StopAsync() StopAsync() StopAsync()

Asynchronously stops the low lag media recording.

public : IAsyncAction StopAsync()public IAsyncAction StopAsync()Public Function StopAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

Object that is used to control the asynchronous operation.

StopWithResultAsync() StopWithResultAsync() StopWithResultAsync() StopWithResultAsync()

Asynchronously stops the low lag media recording and provides a MediaCaptureStopResult that can be used to help the user align the camera with the last captured frame when restarting recording.

public : IAsyncOperation<MediaCaptureStopResult> StopWithResultAsync()public IAsyncOperation<MediaCaptureStopResult> StopWithResultAsync()Public Function StopWithResultAsync() As IAsyncOperation( Of MediaCaptureStopResult )// You can use this method in JavaScript.
Returns
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

See Also