Search code examples
audiowindows-phone-7mediaelement

Sound does not play the first time. Why?


I gave it a shot on WP7 forums @ MS and no one could help, so trying here.

I cooked up a simple app, that has a button. Upon clicking, it plays a sound with the MediaElement control. When I click the button the first time, it does not play at all. The second and subsequent times, it plays the sound fine.

The first time around, the MediaOpened event of the MediaElement if fired off, but the MediaEnded never fires. The subsequent times, the events work as expected.

I posted a small project here documenting the issue.
http://www.angryhacker.com/toys/MediaElementTest.zip


Solution

  • To close out the question. Here are comments by a dev on the WP7 team.