Search code examples
windows-phone-7video-streamingmediaelementlockscreen

Windows phone 7 - unable to play audio under lock screen


I am developing an app for windows phone 7. There is a media element which plays video from a url. When i lock the phone, the audio and video stops playing. I have tried disabling ApplicationIdleDetetction and i have handled Rootframe Obscured and Unobscured. I just couldn't figure out how to continue playing the audio when the phone is locked.

Any help on this is greatly appreciated !!

thanks graham


Solution

  • Use the AudioPlayerAgent to keep the music playing even when the phone gets locked!

    Check the "Background Audio Player Sample" on the Windows Phone Code Samples.