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 事件。

适用于