PlayToReceiver.VolumeChangeRequested É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 le volume de l’audio ou de la vidéo source a changé.
// Register
event_token VolumeChangeRequested(TypedEventHandler<PlayToReceiver, VolumeChangeRequestedEventArgs const&> const& handler) const;
// Revoke with event_token
void VolumeChangeRequested(event_token const* cookie) const;
// Revoke with event_revoker
PlayToReceiver::VolumeChangeRequested_revoker VolumeChangeRequested(auto_revoke_t, TypedEventHandler<PlayToReceiver, VolumeChangeRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<PlayToReceiver,VolumeChangeRequestedEventArgs> VolumeChangeRequested;
function onVolumeChangeRequested(eventArgs) { /* Your code */ }
playToReceiver.addEventListener("volumechangerequested", onVolumeChangeRequested);
playToReceiver.removeEventListener("volumechangerequested", onVolumeChangeRequested);
- or -
playToReceiver.onvolumechangerequested = onVolumeChangeRequested;
Public Custom Event VolumeChangeRequested As TypedEventHandler(Of PlayToReceiver, VolumeChangeRequestedEventArgs)
Type d'événement
Remarques
Pour obtenir un exemple de création d’un récepteur de lecture de logiciel, consultez Diffusion multimédia.
async void receiver_VolumeChangeRequested(
Windows.Media.PlayTo.PlayToReceiver sender,
Windows.Media.PlayTo.VolumeChangeRequestedEventArgs args)
{
await dispatcher.RunAsync(
Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
VideoPlayer.Volume = args.Volume;
});
}
Async Sub receiver_VolumeChangeRequested(
sender As Windows.Media.PlayTo.PlayToReceiver,
args As Windows.Media.PlayTo.VolumeChangeRequestedEventArgs)
Await Dispatcher.RunAsync(
Windows.UI.Core.CoreDispatcherPriority.Normal,
Sub()
VideoPlayer.Volume = args.Volume
End Sub)
End Sub