Getting image data from phone camera (MediaDevices.getUserMedia) into user post

Sorry for the newbie, and poorly arranged question…

I’m trying to develop a super simple user based wordpress site. I want logged in users to take a photo with their phone which is then uploaded as a WP post (with a few additional fields, but I think that’s the easy part). Ideally the image or Post should be geotagged (I’m working with Google Maps API – I’ve got the site to ask permission for user location and show on Google Maps where the user is situated).

I’ve got some of the various components working separately, but not yet together.

I’m using the Navigator.mediaDevices web API to get the user camera working (I used this reference:

BUT I cannot figure out what process I must take to save/embed this captured image into a WP post?

I know I can do a more simple ‘user upload’ form, where the user simply clicks ‘upload file’ then selects ‘camera’ and takes a photo, but the problem with this solution is it requires more steps of the user, and I need the camera to be ‘live’/’active’ as soon as they log onto the site.

I know this is super vague so far, so I don’t expect any solid answers, but some tips on which path I should follow would be much appreciated!