다음을 통해 공유


PlayToReceiver.MuteChangeRequested 이벤트

정의

오디오가 음소거되었거나 음소거되지 않은 경우에 발생합니다.

// Register
event_token MuteChangeRequested(TypedEventHandler<PlayToReceiver, MuteChangeRequestedEventArgs const&> const& handler) const;

// Revoke with event_token
void MuteChangeRequested(event_token const* cookie) const;

// Revoke with event_revoker
PlayToReceiver::MuteChangeRequested_revoker MuteChangeRequested(auto_revoke_t, TypedEventHandler<PlayToReceiver, MuteChangeRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<PlayToReceiver,MuteChangeRequestedEventArgs> MuteChangeRequested;
function onMuteChangeRequested(eventArgs) { /* Your code */ }
playToReceiver.addEventListener("mutechangerequested", onMuteChangeRequested);
playToReceiver.removeEventListener("mutechangerequested", onMuteChangeRequested);
- or -
playToReceiver.onmutechangerequested = onMuteChangeRequested;
Public Custom Event MuteChangeRequested As TypedEventHandler(Of PlayToReceiver, MuteChangeRequestedEventArgs) 

이벤트 유형

설명

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

async void receiver_MuteChangeRequested(
    Windows.Media.PlayTo.PlayToReceiver sender,
    Windows.Media.PlayTo.MuteChangeRequestedEventArgs args)
{
    await dispatcher.RunAsync(
        Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
        {
            VideoPlayer.IsMuted = args.Mute;
        });
}
Async Sub receiver_MuteChangeRequested(
    sender As Windows.Media.PlayTo.PlayToReceiver,
    args As Windows.Media.PlayTo.MuteChangeRequestedEventArgs)
    Await Dispatcher.RunAsync(
        Windows.UI.Core.CoreDispatcherPriority.Normal,
        Sub()
            VideoPlayer.IsMuted = args.Mute
        End Sub)
End Sub

적용 대상

추가 정보