How can we add Screen Recording Feature in an AR Template?

I want to add Screen Recording feature in my project. For ex in AR Template they have provided screenshot button ,so I want to add Button name screen recording and on click it should record.
Thanks in advance.