Kasper S Mathiesen
Kasper S Mathiesen

Reputation: 669

Set webbrowser audio to stream to media player so it can be used in background on windows phone 8

I am making a netradio app on windows phone, my problem is that netradio uses the RTSP audio format and native media player in Windows Phone does not support RTSP.

As a workaround, I have to navigate to a webpage that then handles the audio.

This works fine, and plays the radio, but the problem is that as soon as the app is put in the background the music stops.

Is there a way to keep the webbrowser audio playing?

Upvotes: 1

Views: 415

Answers (2)

jukra
jukra

Reputation: 106

There is no native RTSP support with BackgroundAudioPlayer. You would need to make your own MediaStreamSource implementation to be able to use the stream. At least I didn't find any public 3rd party solutions. Check this http://social.msdn.microsoft.com/Forums/sqlserver/en-US/e052ea29-53cf-4ebb-8558-742b67fc72ad/rtsp-support-in-wp8.

If you are up for the task of writing your own MediaStreamSource implementation, you can use this as starting point and study the RTSP protocol here.

Upvotes: 2

Kulasangar
Kulasangar

Reputation: 9434

You could use the BackgroundAudioPlayer within your solution as another project where you could go through a sample here.

And also the sample from Codeplex you can try the Windows Phone Streaming Media.

https://phonesm.codeplex.com/

Hope it helps!

Upvotes: 2

Related Questions