In windows phone 8 application, I'm using AudioPlaybackagent to play a background audio.
I did the following scenario:
I play
BackgroundAudioPlayer.Instance.Play(),
while the song is playing I called
BackgroundAudioPlayer.Instance.Stop()
then play another song using mediaElement
The problem is that if I want to replay the first song usingBackgroundAudioPlayer.Instance.Play()
it returns an exception
The background audio resources are no longer available.
If you want to play audio with the background agent, stop, and then play audio with the media element. I belive you'll have to do:
Then attempt to play audio with the media element.