The BackgroundAudioPlayer
class implements the singleton pattern. The single instance of the BackgroundAudioPlayer
is accessed in your foreground app via its static Instance
property, as shown:
BackgroundAudioPlayer.Instance.Track = new AudioTrack( new Uri("http://example.com/Audio.mp3", UriKind.Absolute), "Track Name", "Artist", "Album", null);BackgroundAudioPlayer.Instance.Play();
The behavior of the BackgroundAudioPlayer
changes depending on whether it is being used in your foreground app or from an AudioPlayerAgent
. When the BackgroundAudioPlayer
is used in your foreground app, all calls are relayed to your AudioPlayerAgent
. When used from an AudioPlayerAgent ...
No credit card required