WP7 Silverlight Gotcha: Setting the Source on a MediaElement will stop background music playback

Applies To: Silverlight (the restriction applies to XNA, but the MediaElement is only Silverlight) Quick Bits Simply setting the Source of a MediaElement to a valid source will stop any current background playback, causing you to fail Marketplace certification, according to section 6.5.1 from the certification guide. The Fine Print From the certification guide: 6.5.1  Initial Launch…

1

WP7 Dev Tip: Detecting whether or not the user is playing music in the background

Applies To: Silverlight & XNA Quick Bits Microsoft.Xna.Framework.Media.MediaPlayer.GameHasControl The Setup Your app does some sort of music playing that doesn’t make sense to blend into any already playing background music (for example, you’re going to stream your own music) or you simply want to show a video. Why You Care? If you just start playing music…

2