I am writing an app that plays a url using MPMoviePlayerController. The app works in the background and using airplay also works with an ATV, macmini using airserver and XBMC. The url is to a movie file on the local network. The way I understand is that the phone doesn't do any heavy lifting but merely passes the url to the apple tv and as long as the url points to media that the AppleTV supports then it will play.
The problem I am having is that the apple TV must be aggressively pinging the iphone and keeping the wifi active since the battery life is hit really hard. Playing an average sized movie knocks the battery life by about 2/3 on an IPhone 3GS and 1/2 on an IPhone 4S.
If I am playing on the mac mini using air server then the battery life on the phone reduces at the same rate as if the phone was backgrounded and not playing anything. I noticed that if I stop the wifi on the iphone then the movie will keep playing on the mac mini but stops within about 30s on the ATV. I am guessing the ATV keeps pushing out an event saying that it is playing and if it doesn't receive an OK in return then it stops playing.
Is there something I am doing wrong? Have other people experienced the same battery drain using airplay from their phone? I have tried someone else's app and it also did the same.