2016-09-02 4 views

ответ

0
var folder = await StorageFolder.GetFolderFromPathAsync("ms-appx:///Assets/Media"); 
if(folder != null) 
{ 
    var file = await folder.GetFileAsync("backgroundtrack.mp3"); 
    if(file != null) 
    { 
     var stream = await file.OpenReadAsync(); 
     mediaElement.SetSource(stream, file.ContentType); 
     player.Volume = 100; 
     player.Play(); 
    } 
}