How to enable effects in a <video> tag (HTML)

Applies to Windows and Windows Phone

This topic shows how to enable video and audio effects in a Windows Runtime app using JavaScript.

The following example applies the VideoStabilization effect to a Video element. To apply a different effect, replace the first parameter with the activatable ClassID of your media extension.


function effects() {
    var myVideo = document.getElementById("videoTag1");
    myVideo.msInsertVideoEffect(
        "Windows.Media.VideoEffects.videoStabilization", // ClassID
        true,   // effectRequired
        null);  // config
    myVideo.play();
}


Note  The number of effects on each active stream is limited to a maximum of 2. For example, a video tag can have two video effects enabled and two audio effects enabled if there is an audio stream being played out of the same video file.

For an example of using custom effects, see the Media Extension Sample. Using media extensions

Related topics

Video
Audio
Media Playback Sample
Using media extensions

 

 

Show:
© 2014 Microsoft