Search code examples
windows-phone-8.1mmppf

PlayerFramework and Media controls


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!


Solution

  • 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!