Share via


MediaCapture.SetPreviewMirroring(Boolean) Method

Definition

Enables or disables horizontal mirroring of the video preview stream. This is not the preferred method for mirroring. See the Remarks section below for details.

public:
 virtual void SetPreviewMirroring(bool value) = SetPreviewMirroring;
void SetPreviewMirroring(bool const& value);
public void SetPreviewMirroring(bool value);
function setPreviewMirroring(value)
Public Sub SetPreviewMirroring (value As Boolean)

Parameters

value
Boolean

bool

True to enable mirroring; false to disable mirroring.

Windows requirements

App capabilities
backgroundMediaRecording microphone webcam

Remarks

Horizontal mirroring is useful for video conferencing or video chat applications, because the users typically want to see a reflected image of themselves. The non-mirrored view can look strange, because we are used to seeing ourselves in a mirror.

To mirror the preview video, apps should instead use the following method. Windows app using JavaScript should use the msHorizontalMirror property of the video object. UWP apps using C++, C#, or Visual Basic should use the FlowDirection property on the CaptureElement.

SetPreviewMirroring can potentially be used as a performance optimization on some devices

For how-to guidance on handling orientation and mirroring when using the camera, see Handle device orientation with MediaCapture.

Applies to