다음을 통해 공유


PlayToReceiver.VolumeChangeRequested 이벤트

정의

원본 오디오 또는 비디오의 볼륨이 변경된 경우에 발생합니다.

// 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) 

이벤트 유형

설명

소프트웨어 Play To 수신기를 만드는 예제는 미디어 캐스팅을 참조하세요.

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

적용 대상

추가 정보