共用方式為


MediaElement.PartialMediaFailureDetected 事件

定義

發生于一或多個資料流程無法在包含多個資料流程的內容中解碼時。

// Register
event_token PartialMediaFailureDetected(TypedEventHandler<MediaElement, PartialMediaFailureDetectedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
MediaElement::PartialMediaFailureDetected_revoker PartialMediaFailureDetected(auto_revoke_t, TypedEventHandler<MediaElement, PartialMediaFailureDetectedEventArgs const&> const& handler) const;
public event TypedEventHandler<MediaElement,PartialMediaFailureDetectedEventArgs> PartialMediaFailureDetected;
function onPartialMediaFailureDetected(eventArgs) { /* Your code */ }
mediaElement.addEventListener("partialmediafailuredetected", onPartialMediaFailureDetected);
mediaElement.removeEventListener("partialmediafailuredetected", onPartialMediaFailureDetected);
- or -
mediaElement.onpartialmediafailuredetected = onPartialMediaFailureDetected;
Public Custom Event PartialMediaFailureDetected As TypedEventHandler(Of MediaElement, PartialMediaFailureDetectedEventArgs) 

事件類型

備註

如果內容中至少有一個資料流程成功解碼,則會播放解碼的媒體並引發此事件。 如果無法解碼的資料流程是唯一包含在內容中的資料流程,則播放會失敗並引發 MediaFailed 事件。

適用於