WebXR camera pixel data

I’m trying to find out all I can about screen capturing pixel data while the camera is running in a WebXR session…
What I hope to implement is a screen capture composite of the Pixel picture and the 3D content…

Has anyone tried already?

I think you have to describe in more detail what you are heading for. So far it’s not clear to me what you mean by:

Programming our own screenshot type function for use during an XR session…

It turns out that it’s either extremely difficult or we just don’t have access to automatically or programmatically capture an image during an XR session because of privacy issues or something to that effect…

I am by no means the most skillful coder…
However have considered that there are some possible hacks if one were to accept permissions for accessibility options we could perhaps take advantage of automating the pressing of power and volume down buttons (for example)