You can do it in a pinch, but I wouldn't rely on it long term. Constant video recording will heavily tax the memory and storage on the phone, in addition to heat. Over the years I tried my phone as a dash cam, and gps mapping. Also used my laptop for gps mapping.
Eventually I realized the phone was better suited to being used as a phone (you know, like, my most important communications tool), the laptop as a laptop, a Garmin as a gps, and a dash cam as a dash cam