PlayToReceiver.NotifyTimeUpdate(TimeSpan) Method

Definition

Notifies the Play To receiver that the time location of the audio or video playback has changed.

public:
 virtual void NotifyTimeUpdate(TimeSpan currentTime) = NotifyTimeUpdate;
void NotifyTimeUpdate(TimeSpan const& currentTime);
public void NotifyTimeUpdate(System.TimeSpan currentTime);
function notifyTimeUpdate(currentTime)
Public Sub NotifyTimeUpdate (currentTime As TimeSpan)

Parameters

currentTime
TimeSpan TimeSpan

The new time location of the playback.

Windows requirements

App capabilities
privateNetworkClientServer

Remarks

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

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

Applies to

See also