Using MediaElement as a Media Player
So far, everything you’ve read about MediaElement
is great for audio and noninteractive video, such as a fancy extended splash screen, a looping animated background, a cutscene between levels of a game, or perhaps video-based storybook. However, most apps want to show interactive video in a player that enables the user to pause, stop, skip ahead, and so on.
With all of MediaElement
’s methods, properties, and events already discussed, you could certainly build your own media player user interface. But doing this well is a lot of work! Fortunately, MediaElement
supports an interactive media player mode. All you need to do is set its AreTransportControlsEnabled
property to true
, and MediaElement
turns into the ...
Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.