Media Video and Audio
The System.Windows.Controls.MediaElement control provides media playback capability in Silverlight 2. It can handle both audio and video in a variety of formats. These are the supported video formats:
WMV1: Windows Media Video 7
WMV2: Windows Media Video 8
WMV3: Windows Media Video 9
WMVA: Windows Media Video Advanced Profile (non-VC-1) WMVC1: Windows Media Video Advanced Profile (VC-1)
ASX: Advanced Stream Redirector files; extension might be .asx, .wax, .wvx, .wmx, or .wpl
Silverlight 3 has enhanced media management supporting high-quality and secured multimedia streaming. The following is a brief list of media management improvements in Silverlight 3:
• Support for new media formats such as H.264/Advanced Audio Coding (AAC) /MP4 and the new RAW audio/video pipeline, which supports third-party codecs, brings opportunities to develop a broad range of media formats that support rich Internet applications (RIAs), and broadens the overall industry-wide acceptance of Silverlight as a main webdevelopment technology platform.
• IIS Media Services (an integrated HTTP media delivery platform, see http://www.iis.net/ media for more information) enable high-performing and smooth, live, and on-demand high-quality and HD (720p+) media streaming. Silverlight 3 also leverages GPU hardware acceleration to deliver a true HD media experience in the in-browser and lull-screen modes.
• Silverlight digital rights management (DRM) for media streaming enables Advanced Encryption Standard (AES)-based encryption or Windows Media DRM of media files and allows the protected distribution of digital media. Silverlight 2 and 3 support the following audio formats:
• MP3: ISO/MPEG Layer-3; 8 to 320Kbps and variable bit rate; 8 to 48KHz sampling frequencies
You can reference a media file using either the HTTP or HTTPS protocol, or using MMS, RTSP, or RTSPT. The latter three will fall back to HTTP. Using the MMS protocol causes Silver-light to attempt to stream the media first; if that fails, it will attempt to download the media progressively. Other protocols work in reverse—Silverlight attempts to progressively download the media first, and if that fails, the media is streamed. The properties, methods, and events of MediaElement are shown in Tables 6-9, 6-10, and 6-11, respectively.
Table 6-9. Properties of MediaElement
Property
Type
Post a comment