BackgroundMediaPlayer.MessageReceivedFromForeground BackgroundMediaPlayer.MessageReceivedFromForeground BackgroundMediaPlayer.MessageReceivedFromForeground BackgroundMediaPlayer.MessageReceivedFromForeground BackgroundMediaPlayer.MessageReceivedFromForeground Event

Definition

Occurs when a message is received from the foreground task.

Note

Starting with Windows, version 1703, BackgroundMediaPlayer is deprecated and may not be available in future versions of Windows. Use the MediaPlayer class instead. For more information, see Play media in the background.

public : event EventHandler<MediaPlayerDataReceivedEventArgs> MessageReceivedFromForeground
// Register
event_token MessageReceivedFromForeground(EventHandler<MediaPlayerDataReceivedEventArgs> const& handler) const;

// Revoke with event_token
void MessageReceivedFromForeground(event_token const& cookie) const;

// Revoke with event_revoker
MessageReceivedFromForeground_revoker MessageReceivedFromForeground(auto_revoke_t, EventHandler<MediaPlayerDataReceivedEventArgs> const& handler) const;
public event EventHandler<MediaPlayerDataReceivedEventArgs> MessageReceivedFromForeground
Public Event MessageReceivedFromForeground As EventHandler (Of MediaPlayerDataReceivedEventArgs)
function onMessageReceivedFromForeground(eventArgs){/* Your code */}


backgroundMediaPlayer.addEventListener("messagereceivedfromforeground", onMessageReceivedFromForeground);
backgroundMediaPlayer.removeEventListener("messagereceivedfromforeground", onMessageReceivedFromForeground);