I'm trying to bring over my C# WP 8.1 Background Audio Task to UWP and everything works, except trying to get the UVC using Windows.Media.Playback.SystemMediaTransportControls.GetForCurrentView() throws the current exception on Desktop devices: "Could Not Find an appropriate view to be associated with this instance of the MediaPlaybackControl. Please make sure that a view has been initialized". Is it simply a behavior that has yet to be converged, or do I need to control and update the UVC via my app on Desktop class device?

1

There are 1 answers

2
Vincent On BEST ANSWER

There is an API change in Windows 10. It seems that you should use BackgroundMediaPlayer.Current.SystemMediaTransportControls. This is not in the documentation yet. You can find it in the Windows 10 sample repository: https://github.com/Microsoft/Windows-universal-samples/tree/master/backgroundaudio