0
votes

I have a media element in my application. And it plays when user clicks on a button "Play". But Whenever my app loads it stops the actively playing music even before i click on "Play" button.

I want to ensure that the actively playing music still plays before clicking on "Play" button and after it finishes playing of the sound i have for 5 seconds. Or at least it shouldn't stop actively playing music until I click on Play button.

 <MediaElement    Name="meBuzz"   Volume="1"  AutoPlay="False"    Source="/RingTones/SOUND1.mp3" />

c# code has following code to play the file:

   meBuzz.Play()

Any suggestions ?

1

1 Answers

0
votes

I shouldn't set the source in xaml code.