1

By default playing any media gets you these kind of controls on top of the screen

enter image description here

But when playing media with the PlayerFramework those controls don't show up. Looking through the MediaPlayer properties I don't find something that seems to be related.

Edit: I've also checked the SystemMediaTransportControls, and the PlaybackStatus is indeed changed when the media is playing or paused.

Any help is appreciated!

Benjamin Diele
  • 1,177
  • 1
  • 10
  • 26
  • 1
    I do not believe you will get these controls when using MediaPlayer, you will get the controls when using [Background Audio](http://blogs.msdn.com/b/wpukcoe/archive/2012/02/09/background-audio-in-windows-phone-7-5-part-1.aspx) – Shawn Kendrot Jul 28 '14 at 18:36
  • @ShawnKendrot Please post this as an answer. I added background audio and get the controls. – Benjamin Diele Aug 03 '14 at 17:40

2 Answers2

1

Unfortunately you will not get the player controls will using the MediaElement. MediaElement is meant to be used only with your app, while the player controls are used for audio that plays no matter what app is open. To get the controls you must use the Background Audio framework. This will give you the player controls and allow your audio to play even when the app is closed!

Shawn Kendrot
  • 12,425
  • 1
  • 25
  • 41
0

You should consider using MediaElement instead of MediaPlayer and make sure the AreTransportControlsEnabled property is set to true.

This is the way to go for Windows 8.1/Windows Phone 8.1

Thierry
  • 342
  • 2
  • 6
  • Those are set to true and the `MediaPlayer` is using a `MediaElement` behind the scenes. The issue was backgrounding the audio. – Benjamin Diele Aug 03 '14 at 17:41