1

My test app tries to play audio when minimising app, so I selected "Background Media Playback". But when I move my mouse over the App Icon on the Windows Taskbar, Next/Prev/Pause buttons are displayed (see below image). How can I remove them?

Image showing popup window from app taskbar button, with 'previous', 'pause' and 'next' buttons. Also shown is a window with check boxes under the heading 'Capabilities'. The 'background media playback' button is ticked

whv20
  • 149
  • 7
Luu Thanh
  • 15
  • 6

1 Answers1

1

You can disable them from the Background task using the IsEnabled property of the SystemMediaTransportControls class.

var controls = BackgroundMediaPlayer.Current.SystemMediaTransportControls;
controls.IsEnabled = false;

Similarly, you can disable them when the app is in the foreground using:

var controls = SystemMediaTransportControls.GetForCurrentView();
controls.IsEnabled = false;
Martin Zikmund
  • 38,440
  • 7
  • 70
  • 91