-api-id | -api-type |
---|---|
E:Windows.UI.Xaml.Controls.MediaElement.MediaFailed |
winrt event |
Occurs when there is an error associated with the media Source.
<MediaElement MediaFailed="eventhandler" .../>
It is a best practice to always handle the MediaFailed event and take appropriate action.
The following code creates a MediaFailed event handler that calls a helper function to retrieve the HRESULT from the event arguments.
[!code-csharpMediaPlayer_MediaFailedHandlers]