Demi Lovato 's ex-fiancé Max Ehrich 's legal situation may have just gotten worse ... 'cause it appears he was streaming on Instagram just prior to being arrested for allegedly assaulting his mother while abusing nitrous oxide.
TMZ broke the story ... Ehrich was arrested Tuesday for battery on a person 65 or older ... and according to the police report, the victim was his mom -- and cops say they were told it all started over an argument for her phone. St. Lucie Sheriff's Office
The report says just prior to his arrest , Max was streaming on IG ... and one of the viewers apparently recorded the wild footage.
In the video, it appears Max is demanding his mother's phone while she is crying in the bathroom and then appears to give her a shove. In a later portion of the stream,