CurrentTimeChangeRequestedEventArgs CurrentTimeChangeRequestedEventArgs CurrentTimeChangeRequestedEventArgs CurrentTimeChangeRequestedEventArgs Class

Definition

Provides information about the CurrentTimeChangeRequested event.

public : sealed class CurrentTimeChangeRequestedEventArgs : ICurrentTimeChangeRequestedEventArgspublic sealed class CurrentTimeChangeRequestedEventArgs : ICurrentTimeChangeRequestedEventArgsPublic NotInheritable Class CurrentTimeChangeRequestedEventArgs Implements ICurrentTimeChangeRequestedEventArgs// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

For an example of creating a software Play To receiver, see Media casting or Media casting.

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;
        });
}
function receiver_CurrentTimeChangeRequested(args) {
    if (videoPlayer.currentTime !== 0 || args.time !== 0) {
        videoPlayer.currentTime = args.time / 1000;
    }
}
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

Properties

Time Time Time Time

Gets the new time that the Play To source audio or video stream has been changed to.

public : TimeSpan Time { get; }public TimeSpan Time { get; }Public ReadOnly Property Time As TimeSpan// You can use this property in JavaScript.
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The new time that the Play To source audio or video has been changed to.

See Also

See Also