(UWP) mediaElement causing error:unsupport video type or invalid file path
<p>I've try to play video on a page upon loaded by using mediaElement</p>

<p>here is the XAML code </p>

<pre><code>&lt;Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"&gt;
        &lt;MediaElement x:Name="mediaElement" AreTransportControlsEnabled="True" Width="400" /&gt;
    &lt;/Grid&gt;
</code></pre>

<p>and here is a C# code</p>

<pre><code>public async void initVideo()
        {
            mediaElement.Source = new Uri("ms-appx:///Assets/sampleVideo.mp4");
            mediaElement.Play();
        }
</code></pre>

<p>The video I want to play resides in Assets folder. However when the page is loaded it gives Error:Unsupported Video type or Invalid file path</p>

<p>I've try with mp4 , flv, wmv file so it's unlikely that this is caused by unsupported video type</p>

<p>I've follow this example too <a href="https://msdn.microsoft.com/en-us/library/windows/apps/mt187272.aspx?f=255&amp;MSPPError=-2147217396" rel="nofollow">https://msdn.microsoft.com/en-us/library/windows/apps/mt187272.aspx?f=255&amp;MSPPError=-2147217396</a></p>

<p>but it's also causing same problem</p>

<p>Is there any error on my path? how to solved this?   thanks in advance!!</p>