BackgroundMediaPlayer.MessageReceivedFromForeground Événement
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Se produit lorsqu’un message est reçu de la tâche de premier plan.
Notes
À compter de Windows, version 1703, BackgroundMediaPlayer est déconseillé et peut ne pas être disponible dans les versions ultérieures de Windows. Utilisez la classe MediaPlayer à la place. Pour plus d’informations, consultez Lire du contenu multimédia en arrière-plan.
// Register
static event_token MessageReceivedFromForeground(EventHandler<MediaPlayerDataReceivedEventArgs> const& handler) const;
// Revoke with event_token
static void MessageReceivedFromForeground(event_token const* cookie) const;
// Revoke with event_revoker
static BackgroundMediaPlayer::MessageReceivedFromForeground_revoker MessageReceivedFromForeground(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 MessageReceivedFromForeground(EventHandler<MediaPlayerDataReceivedEventArgs> const& handler) const;
// Revoke with event_token
static void MessageReceivedFromForeground(event_token const* cookie) const;
// Revoke with event_revoker
static BackgroundMediaPlayer::MessageReceivedFromForeground_revoker MessageReceivedFromForeground(auto_revoke_t, EventHandler<MediaPlayerDataReceivedEventArgs> const& handler) const;
public static event System.EventHandler<MediaPlayerDataReceivedEventArgs> MessageReceivedFromForeground;
[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> MessageReceivedFromForeground;
function onMessageReceivedFromForeground(eventArgs) { /* Your code */ }
Windows.Media.Playback.BackgroundMediaPlayer.addEventListener("messagereceivedfromforeground", onMessageReceivedFromForeground);
Windows.Media.Playback.BackgroundMediaPlayer.removeEventListener("messagereceivedfromforeground", onMessageReceivedFromForeground);
- or -
Windows.Media.Playback.BackgroundMediaPlayer.onmessagereceivedfromforeground = onMessageReceivedFromForeground;
Public Shared Custom Event MessageReceivedFromForeground As EventHandler(Of MediaPlayerDataReceivedEventArgs)
Type d'événement
- Attributs