0

I am building a UWP App that plays Audio in the Background. I have successfully set it up and it's running with a simple play/pause Button.

Now I need to play Audio using a MediaElement control that has MediaTransportControls enabled. I have read that it is impossible to play Background Audio using Media Element. Here in this article they suggest using BackgroundMediaPlayer: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e6bb37ec-49f7-4e5a-91ef-44ae3725a761/uwpbackground-audio-on-windowsphone-10-is-it-really-impossible-for-mediaelement?forum=wpdevelop&prof=required

Is it possible to use the same MediaTransportControls with BackgroundMediaPlayer? Or I have to create my own controls? A button, slider and Timer? Any example I didn't find?

yalematta
  • 1,389
  • 1
  • 21
  • 36
  • You could try [this](https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BackgroundAudio) sample and [here](https://blogs.windows.com/buildingapps/2016/01/13/the-basics-of-background-audio/) is the explanation. Hope it helps – AbsoluteSith May 29 '16 at 16:16
  • I absolutely checked this sample but here they used custom button for Play Next Previous... and manipulated the Background Audio using their click events. Can't we use the MediaTransportControls (already designed) and access its buttons' click events to play the Background Audio? – yalematta Jun 12 '16 at 09:25
  • Apparently we can't use MediaElement in BackgroundAudioTask. So if I want to add a Slider/Seekbar to update it with the Audio being played I can't link it to SystemMediaTransportControls... or am I wrong? – yalematta Jun 12 '16 at 16:21

0 Answers0