Chapter 20. Making It Richer with Media


  • Examining Silverlight's media support and DRM

  • Working with the MediaElement Control

  • Setting up playlists

Silverlight supports MP3 audio, H.264 Video, AAC Audio, and several Windows Media Audio and Windows Media Video formats, giving you the ability to create media-rich, web-based experiences. And even if you're not creating a photo browser or interactive video application, you can use Silverlight's media capabilities to add subtle MouseOver sound effects to buttons in your application to add that next level of polish. In this chapter, you'll learn the capabilities of the Silverlight MediaElement control and the file formats it supports. You'll see how to define the control both in XAML and in Expression Blend and see how to respond to the events it raises. You'll also be introduced to Expression Media Encoder 3 and learn how to prepare your media for use in your Silverlight app.


Before we even take a look at including media in our Silverlight apps, let's take a look at the file formats and codecs supported natively by the Silverlight player. Media can be encoded using several of the Windows Media Video and Windows Media Audio codecs, as well as the MP3 and AAC audio codecs and H.264 video codec. Windows Media Audio and Video are more than just two codecs. Both of these formats include various versions and use-specific codecs (such as Windows Media Screen and Windows Media Voice). Silverlight supports a subset ...

Get Professional Silverlight® 4 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.