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....
Written by Michael Dominick
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Winrt
Authors
thebringking
8.753K
dominickm
1.231K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#