다음을 통해 공유


PlayToReceiver.TimeUpdateRequested 이벤트

정의

현재 재생 위치가 변경되면 발생합니다.

// Register
event_token TimeUpdateRequested(TypedEventHandler<PlayToReceiver, IInspectable const&> const& handler) const;

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

// Revoke with event_revoker
PlayToReceiver::TimeUpdateRequested_revoker TimeUpdateRequested(auto_revoke_t, TypedEventHandler<PlayToReceiver, IInspectable const&> const& handler) const;
public event TypedEventHandler<PlayToReceiver,object> TimeUpdateRequested;
function onTimeUpdateRequested(eventArgs) { /* Your code */ }
playToReceiver.addEventListener("timeupdaterequested", onTimeUpdateRequested);
playToReceiver.removeEventListener("timeupdaterequested", onTimeUpdateRequested);
- or -
playToReceiver.ontimeupdaterequested = onTimeUpdateRequested;
Public Custom Event TimeUpdateRequested As TypedEventHandler(Of PlayToReceiver, Object) 

이벤트 유형

설명

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

async void receiver_TimeUpdateRequested(
    Windows.Media.PlayTo.PlayToReceiver sender,
    object args)
{
    await dispatcher.RunAsync(
        Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
        {
            if (VideoPlayer.Position != null)
                receiver.NotifyTimeUpdate(VideoPlayer.Position);
        });
}
Async Sub receiver_TimeUpdateRequested(
    sender As Windows.Media.PlayTo.PlayToReceiver,
    args As Object)

    Await Dispatcher.RunAsync(
        Windows.UI.Core.CoreDispatcherPriority.Normal,
        Sub()
            receiver.NotifyTimeUpdate(VideoPlayer.Position)
        End Sub)
End Sub

적용 대상

추가 정보