Last Updated: February 25, 2016
·
1.15K
· dominickm

WinRT MediaElement Playing from App Bundle

Ok so weirdly on WinRT using C# you can't just create a Uri like (/Assets/Music/Song.mp3") -- that will crash every time.

The trick is that you have to prefix the URL with ms-appx:

So, in the above example we should have new Uri("ms-appx:/Assets/Music/Song.mp3");

Hope that helps someone... it took me an hour to figure that out....