I created a media player app using UWP for Windows 10. Currently I cannot play any audio in the background, when I minimize my media player window the audio stops playing and resumes when I maximize the window. This is my media element XAML code I used:
<MediaElement x:Name="PlayerElement" Height="532" Width="829"
AreTransportControlsEnabled="True" Stretch="Uniform" HorizontalAlignment="Center"
VerticalAlignment="Center" PosterSource="/Images/Logo3.png"
AutoPlay="True" MediaEnded="PlayNewSong" Margin="0,0,-9,0" AudioCategory="BackgroundCapableMedia"/>
I thought the AudioCategory property would solve my problem, but unfortunately it doesn't. Any help would be appreciated.