PlayToReceiver.NotifyTimeUpdate(TimeSpan) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
通知播放收件者音訊或視訊播放的時間位置已變更。
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)
參數
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