Wednesday
This is a copy of https://communityforums.atmeta.com/t5/Web-Development/User-Presence-Detection/td-p/1248121, but there has been no reply there and the issue has not yet been fixed.
When will we have the ability to detect when a user in a WebXR session has taken off the headset? If you don't want to set the session to 'hidden' until the headset is asleep, maybe a solution for providing use presence would be via an input source that with a value that is set to true or false depending on the proximity sensor.
Wednesday
I have only played with WEB, so this may be bogus info. OVRManager.isHmdPresent is a property that returns a bool on with unity and the meta sdk. You have to poll it in an update().
Also the new unity input system has a HMD (UserPresence [XR Controller]).
Path: XR Controller -> Usages -> UserPresence
This works with Windows PCVR and Oculus. Again, I have not tried both on web.
Thursday
Got it. For clarity, this is in WebXR (not Unity). So, just plain ThreeJS and vanilla JS, and using the built-in Quest Browser on a Quest 3.