O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Effects

MediaElement enables you to add both audio and video effects with its AddVideoEffect and AddAudioEffect methods. (You can later remove them by calling RemoveAllEffects.) You pass a string ID, a Boolean that states whether the effect is optional, and extra configuration that can be null if it doesn’t apply.

The Windows Runtime currently includes just one built-in effect: video stabilization. Its ID is "Windows.Media.VideoStabilizationEffect" but you can just use the static VideoEffects.VideoStabilization string property instead. You therefore add it to a MediaElement (named mediaElement) as follows:

// Apply the video stabilization effectmediaElement.AddVideoEffect(  VideoEffects.VideoStabilization, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required