Method | Description | |
---|---|---|
AudioPlayer ( ) : System | AudioPlayer instances can share the same process. Static fields can be used to share state between AudioPlayer instances or to communicate with the Audio Streaming agent. |
Method | Description | |
---|---|---|
OnCancel ( ) : void |
Called when the agent request is getting cancelled Once the request is Cancelled, the agent gets 5 seconds to finish its work, by calling NotifyComplete()/Abort(). |
|
OnError ( BackgroundAudioPlayer player, AudioTrack track, |
Called whenever there is an error with playback, such as an AudioTrack not downloading correctly This method is not guaranteed to be called in all cases. For example, if the background agent itself has an unhandled exception, it won't get called back to handle its own errors. |
|
OnPlayStateChanged ( BackgroundAudioPlayer player, AudioTrack track, PlayState playState ) : void |
Called when the playstate changes, except for the Error state (see OnError) Play State changes cannot be cancelled. They are raised even if the application caused the state change itself, assuming the application has opted-in to the callback. Notable playstate events: (a) TrackEnded: invoked when the player has no current track. The agent can set the next track. (b) TrackReady: an audio track has been set and it is now ready for playack. Call NotifyComplete() only once, after the agent request has been completed, including async callbacks. |
|
OnUserAction ( BackgroundAudioPlayer player, AudioTrack track, UserAction action, object param ) : void |
Called when the user requests an action using application/system provided UI User actions do not automatically make any changes in system state; the agent is responsible for carrying out the user actions if they are supported. Call NotifyComplete() only once, after the agent request has been completed, including async callbacks. |
Method | Description | |
---|---|---|
AudioPlayer_UnhandledException ( object sender, System.Windows.ApplicationUnhandledExceptionEventArgs e ) : void | ||
clearPrimaryTile ( ) : void | ||
getCurrentlyPlayingTrack ( ) : |
||
getNextPlaylistTrack ( ) : AudioTrack | ||
setCurrentlyPlayingTrack ( string episodeName ) : void | ||
updatePlayposForCurrentEpisode ( BackgroundAudioPlayer player ) : void | ||
updateToDBPlaylistItem ( |
protected OnError ( BackgroundAudioPlayer player, AudioTrack track, |
||
player | BackgroundAudioPlayer | The BackgroundAudioPlayer |
track | AudioTrack | The track that had the error |
error | The error that occured | |
isFatal | bool | If true, playback cannot continue and playback of the track will stop |
return | void |
protected OnPlayStateChanged ( BackgroundAudioPlayer player, AudioTrack track, PlayState playState ) : void | ||
player | BackgroundAudioPlayer | The BackgroundAudioPlayer |
track | AudioTrack | The track playing at the time the playstate changed |
playState | PlayState | The new playstate of the player |
return | void |
protected OnUserAction ( BackgroundAudioPlayer player, AudioTrack track, UserAction action, object param ) : void | ||
player | BackgroundAudioPlayer | The BackgroundAudioPlayer |
track | AudioTrack | The track playing at the time of the user action |
action | UserAction | The action the user has requested |
param | object | The data associated with the requested action. /// In the current version this parameter is only for use with the Seek action, /// to indicate the requested position of an audio track |
return | void |