Windows Phone 8 - Streaming a Podcast MP3 file

左心房为你撑大大i 提交于 2020-01-13 16:55:09

问题


I'm creating an app that reads a single podcast feed (unique to the app) and shows the episode titles in a LongListSelector. I can obtain the MP3 URI for each episode by parsing the RSS file. I'd like to add functionality that, when the user taps an item in the list, the URI is passed to an audio streamer and played like a music file.

I saw a tutorial on How to play background audio for Windows Phone, which points me to a project template for streaming audio.

I'm just wondering, is it still necessary to follow those steps and create a separate project, or is there a built-in API call in Windows Phone 8 that I can just pass my URI to and have it stream automatically?


回答1:


Yes,if you need to use BackgroungAudioPlayer, it is necessary to create another project for AudioPlayer and add reference of it to your project.

Through MediaPlayer you can play files from medialibrary or IsolatedStorage.

So,for you it is necessary to follow those steps.Hope this helps.




回答2:


Use the media element tag from the Windows Phone 8 Toolbox:

You should be able to achieve this without any difficulty, But it will not run in the background.



来源:https://stackoverflow.com/questions/21036527/windows-phone-8-streaming-a-podcast-mp3-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!