Android Video Recording:
The Mobizen app is a free to download and very easy app to use to capture your video while you race.
If you have iOS 11, a screen recorder is a default feature now. Go to settings on your phone, to go control center, and click on customize. You can drag the screen recorder into your bottom 4 apps so you can swipe up and start/stop recording whenever you like.