I am trying to implement a toasted audio player when windows is locked. To achieve this i am using Toasted notificationUI. It's working fine but when user has disabled the notification then it doesn't show up. I saw this https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BackgroundMediaPlayback example of MediaElement to play the audio and show the mini player when user locks the machine. I can not use UWP's MediaElement to play the audio because i have different proprietary format which can be understand by my own player only.
So is there any way to show the UWP's media element mini player when the screen is lock and handle the button click events without playing actual media with it.
Currently i am using the SystemMediaTransportControls
to show the player on volume change.
var systemMediaTransportControls = SystemMediaTransportControls.GetForCurrentView();
systemMediaTransportControls.IsPlayEnabled = true;
systemMediaTransportControls.IsPauseEnabled = true;
systemMediaTransportControls.IsNextEnabled = true;
systemMediaTransportControls.IsPreviousEnabled = true;
systemMediaTransportControls.ButtonPressed += OnMediaButtonPressed;
Thanks in advance