OnUserAction Method
Collapse the table of content
Expand the table of content

AudioPlayerAgent.OnUserAction Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Called when the user requests an action using some application-provided UI or the Universal Volume Control (UVC) and the application has requested notification of the action.

Namespace:  Microsoft.Phone.BackgroundAudio
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

'Declaration
Protected Overridable Sub OnUserAction ( _
	player As BackgroundAudioPlayer, _
	track As AudioTrack, _
	action As UserAction, _
	param As Object _
)

Parameters

player
Type: Microsoft.Phone.BackgroundAudio.BackgroundAudioPlayer
The BackgroundAudioPlayer.
track
Type: Microsoft.Phone.BackgroundAudio.AudioTrack
The track playing at the time of the user action.
action
Type: Microsoft.Phone.BackgroundAudio.UserAction
The action that the user has requested.
param
Type: System.Object
The data associated with the requested action.

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.

In the current release, the param argument is used only if the action argument is Seek. If the action argument is UserAction.Seek, the param argument indicates the requested position in an audio track as a TimeSpan value.

Caution noteCaution:

This API is not supported for Silverlight 8.1 apps.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft