Windows Store App Gotcha: Background Audio Tasks, Media Elements and AutoPlay

13 November 2012

Remember a few posts back, when I was talking about how to simulate suspend events because my online radio app wasn't passing the WACK? It turned out that it's not really anything to do with the suspend or resume code I wrote, but that having a Background Audio Task / MediaElement with AutoPlay="true" causes the WACK to fail that test, all the time.

It also turns out that people have already encountered this (there's a few other great hints in that slide deck as well, I got tripped up by the Privacy Policy one on a previous fail), but clearly this information isn't very easily searchable or obvious, so I thought I'd do my part...

To reiterate - as it stands, do not set AutoPlay to true on your MediaElement if you are using it as a BackgroundAudioTask!

Finally, my app passes the WACK and I can try submission, again...

Tags: autoplay, BackgroundAudioTask, MediaElement, WACK, Windows Store App

Add a Comment

No Comments