Aug 07

Silverlight includes support to play audio and video files.

It can play Windows Media Video (WMV), Windows Media Audio (WMA) and MP3 files.

Adding media to a page is as simple as adding a MediaElement to your markup and providing a Uniform Resource Identifier (URI) to the media to play. The following example creates a MediaElement and sets its Source property to the URI of a video file. The MediaElement begins playing when the page loads.

<MediaElement x:Name=”mediaElement” Source=”Bear.wmv” Width=”250″ Height=”250″ />

We can control media playback by using the Play, Pause, and Stop methods of a MediaElement object.

Install Microsoft Silverlight

Download Code

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Technorati
  • Twitter

Related Posts:

  1. What’s New in Silverlight 4?
  2. Multi Page Silverlight Application
  3. Silverlight (Layout Management)
  4. Silverlight (Creating Hello World)
  5. Curiculum Silverlight

Leave a Reply