How to take photos or videos with a camera in game?

it is possible for a camera to take a picture and video clips and save it as jpg/png and mp4? I can setup the camera by screen capture 2d but I don’t know and I couldn’t find any help of how to take photos or videos and save it on the device during the gameplay.

I need help, please help if anyone knows the way.