PlayToReceiver.PauseRequested É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 lorsque la lecture audio ou vidéo a été suspendue.
// Register
event_token PauseRequested(TypedEventHandler<PlayToReceiver, IInspectable const&> const& handler) const;
// Revoke with event_token
void PauseRequested(event_token const* cookie) const;
// Revoke with event_revoker
PlayToReceiver::PauseRequested_revoker PauseRequested(auto_revoke_t, TypedEventHandler<PlayToReceiver, IInspectable const&> const& handler) const;
public event TypedEventHandler<PlayToReceiver,object> PauseRequested;
function onPauseRequested(eventArgs) { /* Your code */ }
playToReceiver.addEventListener("pauserequested", onPauseRequested);
playToReceiver.removeEventListener("pauserequested", onPauseRequested);
- or -
playToReceiver.onpauserequested = onPauseRequested;
Public Custom Event PauseRequested As TypedEventHandler(Of PlayToReceiver, Object)
Type d'événement
TypedEventHandler<PlayToReceiver,IInspectable>
Remarques
Pour obtenir un exemple de création d’un récepteur lecture sur un logiciel, consultez Casting multimédia.
async void receiver_PauseRequested(
Windows.Media.PlayTo.PlayToReceiver sender,
object args)
{
await dispatcher.RunAsync(
Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
VideoPlayer.Pause();
});
}
Async Sub receiver_PauseRequested(
sender As Windows.Media.PlayTo.PlayToReceiver,
args As Object)
Await Dispatcher.RunAsync(
Windows.UI.Core.CoreDispatcherPriority.Normal,
Sub()
VideoPlayer.Pause()
End Sub)
End Sub