I know this is very easy stuff but I cannot make it work.
I added video file (.wmv) to my project and tried to play it with a media Element. But I always have an error that is : MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED : HRESULT - 0x80004005
Here is the code :
<Page
x:Class="MyMobileApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyMobileApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<MediaElement x:Name="MyMediaElement" Height="640" Width="400" Source="GOPR0179.wmv" MediaFailed="MediaElement_MediaFailed"/>
</Grid>
</Page>
Can you please help me?
Here is the code behind :
private void MediaElement_MediaFailed(object sender, ExceptionRoutedEventArgs e)
{
System.Diagnostics.Debug.WriteLine(e.ErrorMessage);
}