locked
Cannot play media element outisde of simulator RRS feed

  • Question

  • I am trying to play a mp3 file in my app but for some reason it will only play in the Visual Studio Simulator. When I am running the app straight from my local machine, the audio does not play at all. Does anybody know why that is and how I can fix it?

    Here is the code that I use:

    XAML:
    <MediaElement x:Name="AlarmSound" AudioCategory="BackgroundCapableMedia" Source="ms-appx:///Sounds/alarmbeep1.mp3" AutoPlay="False" Height="0" Width="0" />

    C#:
    AlarmSound.Play();
    Tuesday, October 15, 2013 11:19 PM

Answers