Background Audio Player
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 ...
Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.