Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 21. Working with Phone Internals > Playing Media Content

Playing Media Content

To play media content from your application, you can display the native media player in Windows Phone 7 by using the MediaPlayerLauncher task. Table 21.3 shows the common properties available.

Table 21.3 Common MediaPlayerLauncher Properties

image

Listing 21.9 shows how to use the MediaPlayerLauncher to play content that is embedded in the application itself.

Listing 21.9 The MediaPlayerLauncher


MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher();
mediaPlayerLauncher.Media = new Uri("Wildlife.wmv", UriKind.Relative);
mediaPlayerLauncher.Location = MediaLocationType.Install;
mediaPlayerLauncher.Controls = MediaPlaybackControls.Pause | MediaPlaybackControls.Stop | MediaPlaybackControls.Rewind;
mediaPlayerLauncher.Show();


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial