How to access Song data using MediaPlayer in WP7
I trying to access the song data inform开发者_如何学Pythonation, like physical path, to read the song object from the file location, either from MediaPlayer or Song Element.
Is this possible?
You don't need to know the physical path of a Song
in order to play it. You can access the music on a user's device via the MediaLibrary, which is found within the XNA framework. You can retrieve a SongCollection using the Songs property of the MediaLibrary. You can then iterate through the SongCollection and use the MediaPlayer to play it.
精彩评论