MediaCapture.SetPreviewMirroring(Boolean) MediaCapture.SetPreviewMirroring(Boolean) MediaCapture.SetPreviewMirroring(Boolean) MediaCapture.SetPreviewMirroring(Boolean) 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 : void SetPreviewMirroring(bool value)
void SetPreviewMirroring(bool value) const;
public void SetPreviewMirroring(Boolean value)
Public Sub SetPreviewMirroring(value As Boolean)
mediaCapture.setPreviewMirroring(value);

Parameters

value
Boolean Boolean Boolean

True to enable mirroring; false to disable mirroring.

Additional features and requirements

Capabilities
webcam backgroundMediaRecording microphone

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.