共用方式為


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事件,每當影片播放軌新增至專案時,就會引發此事件。

適用於