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?
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;