1

I am implementing the UWP sample for background audio on Github, but with no success. I copy and pasted everything, and while it works in the sample, it doesn't work on my project. Every time the CurrentPlayer object (type is a MediaPlayer), it calls teh existing BackgroundMediaPlayer. But that one always crashes because the RPC server is unavailable. I have no idea what this means or why, because it does work in the sample, even though I copied the code (I even imported the BackgroundAudioTask and BackgroundShared projects without changing any of the code)

I hosted the full code on GitHub, because it might be more useful than my description. I've been stuck on this for months now, so help is much appreciated!

Arn Vanhoutte
  • 1,779
  • 4
  • 16
  • 28

1 Answers1

3

I downloaded and checked your code,everything is proper except you dint add background task reference to your main project

You need to do add BackgroundPlayer refernce to your mainproject(musictest)

Archana
  • 3,213
  • 1
  • 15
  • 21