PlayToReceiver.StartAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
开始接收“播放到”命令。
public:
virtual IAsyncAction ^ StartAsync() = StartAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction StartAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction StartAsync();
function startAsync()
Public Function StartAsync () As IAsyncAction
返回
启动操作完成后调用的异步处理程序。
- 属性
注解
有关创建软件“播放到”接收器的示例,请参阅 媒体强制转换。
// Advertise the receiver on the local network and start receiving commands
await receiver.StartAsync();
// Prevent the screen from locking
if (display == null)
display = new Windows.System.Display.DisplayRequest();
display.RequestActive();
StatusTextBlock.Text = "'" + receiver.FriendlyName + "' started.";
' Advertise the receiver on the local network and start receiving commands
Await receiver.StartAsync()
' Prevent the screen from locking
If display Is Nothing Then
display = New Windows.System.Display.DisplayRequest()
display.RequestActive()
StatusTextBlock.Text = "'" & receiver.FriendlyName & "' started."
End If