다음을 통해 공유


PlayToReceiver.CurrentTimeChangeRequested 이벤트

정의

재생의 시간 위치가 변경된 경우에 발생합니다.

// Register
event_token CurrentTimeChangeRequested(TypedEventHandler<PlayToReceiver, CurrentTimeChangeRequestedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
PlayToReceiver::CurrentTimeChangeRequested_revoker CurrentTimeChangeRequested(auto_revoke_t, TypedEventHandler<PlayToReceiver, CurrentTimeChangeRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<PlayToReceiver,CurrentTimeChangeRequestedEventArgs> CurrentTimeChangeRequested;
function onCurrentTimeChangeRequested(eventArgs) { /* Your code */ }
playToReceiver.addEventListener("currenttimechangerequested", onCurrentTimeChangeRequested);
playToReceiver.removeEventListener("currenttimechangerequested", onCurrentTimeChangeRequested);
- or -
playToReceiver.oncurrenttimechangerequested = onCurrentTimeChangeRequested;
Public Custom Event CurrentTimeChangeRequested As TypedEventHandler(Of PlayToReceiver, CurrentTimeChangeRequestedEventArgs) 

이벤트 유형

설명

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

async void receiver_CurrentTimeChangeRequested(
    Windows.Media.PlayTo.PlayToReceiver sender,
    Windows.Media.PlayTo.CurrentTimeChangeRequestedEventArgs args)
{
    await dispatcher.RunAsync(
        Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
        {
            VideoPlayer.Position = args.Time;
            receiver.NotifySeeking();
            seeking = true;
        });
}
Async Sub receiver_CurrentTimeChangeRequested(
    sender As Windows.Media.PlayTo.PlayToReceiver,
    args As Windows.Media.PlayTo.CurrentTimeChangeRequestedEventArgs)
    Await Dispatcher.RunAsync(
        Windows.UI.Core.CoreDispatcherPriority.Normal,
        Sub()
            VideoPlayer.Position = args.Time
            receiver.NotifySeeking()
            seeking = True
        End Sub)
End Sub

적용 대상

추가 정보