BackgroundMediaPlayer.MessageReceivedFromBackground Ereignis

Definition

Tritt auf, wenn eine Nachricht von der Hintergrundaufgabe empfangen wird.

Hinweis

Ab Windows, Version 1703, ist BackgroundMediaPlayer veraltet und in zukünftigen Versionen von Windows möglicherweise nicht mehr verfügbar. Verwenden Sie stattdessen die MediaPlayer-Klasse . Weitere Informationen finden Sie unter Wiedergeben von Medien im Hintergrund.

// Register
static event_token MessageReceivedFromBackground(EventHandler<MediaPlayerDataReceivedEventArgs> const& handler) const;

// Revoke with event_token
static void MessageReceivedFromBackground(event_token const* cookie) const;

// Revoke with event_revoker
static BackgroundMediaPlayer::MessageReceivedFromBackground_revoker MessageReceivedFromBackground(auto_revoke_t, EventHandler<MediaPlayerDataReceivedEventArgs> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("Use MediaPlayer instead of BackgroundMediaPlayer.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("Use MediaPlayer instead of BackgroundMediaPlayer.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
// Register
static event_token MessageReceivedFromBackground(EventHandler<MediaPlayerDataReceivedEventArgs> const& handler) const;

// Revoke with event_token
static void MessageReceivedFromBackground(event_token const* cookie) const;

// Revoke with event_revoker
static BackgroundMediaPlayer::MessageReceivedFromBackground_revoker MessageReceivedFromBackground(auto_revoke_t, EventHandler<MediaPlayerDataReceivedEventArgs> const& handler) const;
public static event System.EventHandler<MediaPlayerDataReceivedEventArgs> MessageReceivedFromBackground;
[add: Windows.Foundation.Metadata.Deprecated("Use MediaPlayer instead of BackgroundMediaPlayer.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("Use MediaPlayer instead of BackgroundMediaPlayer.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public static event System.EventHandler<MediaPlayerDataReceivedEventArgs> MessageReceivedFromBackground;
function onMessageReceivedFromBackground(eventArgs) { /* Your code */ }
Windows.Media.Playback.BackgroundMediaPlayer.addEventListener("messagereceivedfrombackground", onMessageReceivedFromBackground);
Windows.Media.Playback.BackgroundMediaPlayer.removeEventListener("messagereceivedfrombackground", onMessageReceivedFromBackground);
- or -
Windows.Media.Playback.BackgroundMediaPlayer.onmessagereceivedfrombackground = onMessageReceivedFromBackground;
Public Shared Custom Event MessageReceivedFromBackground As EventHandler(Of MediaPlayerDataReceivedEventArgs) 

Ereignistyp

Attribute

Gilt für: