Share via


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)

Syntax

Protected Overridable Sub OnUserAction ( _
    player As BackgroundAudioPlayer, _
    track As AudioTrack, _
    action As UserAction, _
    param As Object _
)
protected virtual void OnUserAction(
    BackgroundAudioPlayer player,
    AudioTrack track,
    UserAction action,
    Object param
)

Parameters

Remarks

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.

Warning

This API is not supported for Silverlight 8.1 apps.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

AudioPlayerAgent Class

Microsoft.Phone.BackgroundAudio Namespace