Need a callback for DeviceOrientationControls permission cancel/accept

Hi everyone, I’m using DeviceOrientationControls to control my camera.
I initialise my controls (of which the Three-js camera is a child) like this:

this.gyroscope = new DeviceOrientationControls(this.controls.gyroscope)

it all works fine, when the user accepts, but if the user cancels, the camera is facing downwards (i dont know why), so ideally I should have some kind of mechanism to detect if the user actually is using the gyroscope or not. (accepted permission or cancelled it).

I tried using the enabled property of DeviceOrientationControls, but this returns true nomatter the situation…

Thank you for any help,
UV

You will need to edit the original DeviceOrientationControls.js file & add those options (or make your own using three js code as reference)

and a side note :on android there is no need for permission for gyro access

this could have been a feature request but unfortunately DeviceOrientationControls has been removed from three js due to inconsistencies on various devices Removed DeviceOrientationControls. by Mugen87 · Pull Request #22654 · mrdoob/three.js · GitHub