开发者

How to access Song data using MediaPlayer in WP7

开发者 https://www.devze.com 2023-03-17 11:04 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消