CurrentTimeChangeRequestedEventArgs CurrentTimeChangeRequestedEventArgs CurrentTimeChangeRequestedEventArgs CurrentTimeChangeRequestedEventArgs Class

Provides information about the CurrentTimeChangeRequested event.

Syntax

Declaration

public sealed class CurrentTimeChangeRequestedEventArgspublic sealed class CurrentTimeChangeRequestedEventArgsPublic NotInheritable Class CurrentTimeChangeRequestedEventArgs

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 summary

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

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

    Property Value

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Media.PlayTo.dll