If you have a jailbroken device there are many tweaks on Cydia that can help you do that. If not you can use Airplayer with your PC and record it from there.