CurrentTimeChangeRequestedEventArgs 类

定义

提供有关 CurrentTimeChangeRequested 事件的信息。

public ref class CurrentTimeChangeRequestedEventArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
class CurrentTimeChangeRequestedEventArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class CurrentTimeChangeRequestedEventArgs
Public NotInheritable Class CurrentTimeChangeRequestedEventArgs
继承
Object Platform::Object IInspectable CurrentTimeChangeRequestedEventArgs
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

有关创建软件“播放到”接收器的示例,请参阅 媒体强制转换

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;
        });
}
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

属性

Time

获取“播放到”音频或视频流已更改为的新时间。

适用于

另请参阅