共用方式為


PlayToReceiver.NotifyTimeUpdate(TimeSpan) 方法

定義

通知播放收件者音訊或視訊播放的時間位置已變更。

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)

參數

currentTime
TimeSpan TimeSpan

播放的新時間位置。

Windows 需求

應用程式功能
privateNetworkClientServer

備註

如需建立軟體播放收件者的範例,請參閱 媒體傳播

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

適用於

另請參閱