-api-id | -api-type |
---|---|
E:Windows.UI.Xaml.Controls.MediaElement.MediaOpened |
winrt event |
Occurs when the media stream has been validated and opened, and the file headers have been read.
<MediaElement MediaOpened="eventhandler" .../>
Live media streams report a NaturalDuration of Int64.MaxValue.
Any calls to Play, Pause, and Stop methods that occur before the MediaOpened event is raised are ignored.
The following code shows how to determine if a media stream is a live stream.
[!code-csharpMediaOpenedLiveStream]