How to flip video horizontally (Windows Store apps using JavaScript and HTML)

This topic has not yet been rated - Rate this topic

You can use the msHorizontalMirror attribute to flip video horizontally.

Prerequisites

This topic assumes that you can create a basic Windows Store app built for Windows using JavaScript that uses the Windows Library for JavaScript template. For help creating your first app, see Create your first Windows Store app using JavaScript.

Instructions

Step 1: Using the msHorizontalMirror attribute

When the msHorizontalMirror attribute is set to True, the Video element flips the rendered video horizontally. This is useful when the video tag is used for webcam preview, where the image in the preview window should move left or right with the user rather than going in the opposite direction.

This example gets a Video object defined in HTML and sets the msHorizontalMirror attribute to True.


function mirrorVideo() {
    var myVideo = document.getElementById("videoTag1");
    myVideo.msHorizontalMirror = true;
    myVideo.play();
}


Related topics

Basic Media Playback Sample
Video

 

 

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.