Chapter 10. Making It Richer with Media

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 look at 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 Blend and see how to respond to the events it raises. You'll also be introduced to Expression Media Encoder 2 and learn how to prepare your media for use in your Silverlight app. We'll conclude the chapter by looking at the free live.com-based Silverlight Streaming service and the new Smooth Streaming feature of IIS7 for delivering high-definition live video.

Supported Formats

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 ...

Get Silverlight™ 3 Programmer's Reference 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.