PlayToReceiver.StopRequested 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在请求“播放到”接收器停止播放流式传输的媒体时发生。
// Register
event_token StopRequested(TypedEventHandler<PlayToReceiver, IInspectable const&> const& handler) const;
// Revoke with event_token
void StopRequested(event_token const* cookie) const;
// Revoke with event_revoker
PlayToReceiver::StopRequested_revoker StopRequested(auto_revoke_t, TypedEventHandler<PlayToReceiver, IInspectable const&> const& handler) const;
public event TypedEventHandler<PlayToReceiver,object> StopRequested;
function onStopRequested(eventArgs) { /* Your code */ }
playToReceiver.addEventListener("stoprequested", onStopRequested);
playToReceiver.removeEventListener("stoprequested", onStopRequested);
- or -
playToReceiver.onstoprequested = onStopRequested;
Public Custom Event StopRequested As TypedEventHandler(Of PlayToReceiver, Object)
事件类型
TypedEventHandler<PlayToReceiver,IInspectable>
注解
有关创建软件“播放到”接收器的示例,请参阅 媒体转换。
async void receiver_StopRequested(
Windows.Media.PlayTo.PlayToReceiver sender,
object args)
{
await dispatcher.RunAsync(
Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
VideoPlayer.Stop();
});
}
Async Sub receiver_StopRequested(
sender As Windows.Media.PlayTo.PlayToReceiver,
args As Object)
Await Dispatcher.RunAsync(
Windows.UI.Core.CoreDispatcherPriority.Normal,
Sub()
VideoPlayer.Stop()
End Sub)
End Sub