BackgroundMediaPlayer.MessageReceivedFromBackground BackgroundMediaPlayer.MessageReceivedFromBackground BackgroundMediaPlayer.MessageReceivedFromBackground BackgroundMediaPlayer.MessageReceivedFromBackground BackgroundMediaPlayer.MessageReceivedFromBackground Event

Definition

Occurs when a message is received from the background 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> MessageReceivedFromBackground
// Register
event_token MessageReceivedFromBackground(EventHandler<MediaPlayerDataReceivedEventArgs> const& handler) const;

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

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


backgroundMediaPlayer.addEventListener("messagereceivedfrombackground", onMessageReceivedFromBackground);
backgroundMediaPlayer.removeEventListener("messagereceivedfrombackground", onMessageReceivedFromBackground);