VideoTrack.OpenFailed 事件

定义

VideoTrack 无法打开时发生。

// Register
event_token OpenFailed(TypedEventHandler<VideoTrack, VideoTrackOpenFailedEventArgs const&> const& handler) const;

// Revoke with event_token
void OpenFailed(event_token const* cookie) const;

// Revoke with event_revoker
VideoTrack::OpenFailed_revoker OpenFailed(auto_revoke_t, TypedEventHandler<VideoTrack, VideoTrackOpenFailedEventArgs const&> const& handler) const;
public event TypedEventHandler<VideoTrack,VideoTrackOpenFailedEventArgs> OpenFailed;
function onOpenFailed(eventArgs) { /* Your code */ }
videoTrack.addEventListener("openfailed", onOpenFailed);
videoTrack.removeEventListener("openfailed", onOpenFailed);
- or -
videoTrack.onopenfailed = onOpenFailed;
Public Custom Event OpenFailed As TypedEventHandler(Of VideoTrack, VideoTrackOpenFailedEventArgs) 

事件类型

Windows 要求

设备系列
Windows 10 Anniversary Edition (在 10.0.14393.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v3.0 中引入)

注解

MediaPlaybackItemVideoTracksChanged 事件处理程序中注册 VideoTrackOpenFailed 事件,每当将视频轨道添加到项目时引发该事件。

适用于