KAH
June 30, 2021, 1:31pm
1
Hello everybody, I have a question to see if there is a possibility to take a screenshot of the XRSession (video stream & 3d model) using of course threejs
AFAIK, this is currently not possible. However it seems there is some ongoing discussion about that topic and it might be possible with Primary and Secondary Views .
opened 03:59PM - 21 Dec 17 UTC
closed 01:31AM - 05 Apr 19 UTC
I'm wondering if we should consider having some methods for capturing what's on … the display using the appropriate native APIs.
In Hololens, for example, it's possible to trigger a capture of the view (composited with the camera). On Android and iOS, it's possible (in native apps) to use low level APIs to efficiently record what's on the display. Same for Windows and MacOS.
There is a html-media-capture API for capturing an image from a camera, and it's possible to capture images from video if you have access via WebRTC.
But, in a discussion with some developers working with the various AR APIs (Google's WebAR and Mozilla's WebXR), as well as past discussions with folks using WebVR, it seems like it would be useful to have a way to capture an image or video of the view on the "current" display (compositing all layers and things like video that might not be available to the page).
One could imagine those being saved and edited using native APIs (as is done in native apps), being made available to application-level "share sheets", and (for images at least) making them available to the javascript context (e.g., for use in the app, like uploading a thumbnail to a application server during a save, for example).
Obviously, such a capability would need to trigger a user-permission request.
I'm thinking about this here because we really want to leverage the native APIs tied to the AR/VR hardware.
However, this is not yet supported in three.js
.