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

适用于

另请参阅