Windows.UI.Xaml.Controls.MediaElement.MediaOpened
September 14, 2021 · View on GitHub
-description
Occurs when the media stream has been validated and opened, and the file headers have been read.
-xaml-syntax
<MediaElement MediaOpened="eventhandler" .../>
-remarks
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.
-examples
The following code shows how to determine if a media stream is a live stream.
[!code-csharpMediaOpenedLiveStream]