Prevent DeviceOrientationCamera spinning uncontrollably when calling resetToCurrentRotation() on desktop with mouse input?

It’s related to DeviceOrientationCamera match compass orientation? - #12 by RaananW

Ideally what I wanted was to use DeviceOrientationCamera to match the position and orientation of a real-world object, that the user is standing in front of, with a model in the 3D scene, but different mobile devices implement device orientation input in different ways, so there’s no easy way to get an absolute, say true north, heading consistently across all devices.

So the next best option for my use case is to assume the user is facing this real-world object (there wil be instructions to that effect) and reset the initial/starting orientation of the DeviceOrientationCamera to point at the 3D model.

In the linked solution above, @RaananW suggested I try resetToCurrentRotation() to do this, which works when device orientation is enabled, but when permission is denied by the user (iOS requires a permissions step) or device orientation is not supported (e.g. desktop) then this uncontrollable spinning results when I call resetToCurrentRotation().

So, I basically I just need to know how I can seamlessly support both user/device scenarios - either detect when device orientation input is being used and only call resetToCurrentRotation() in that case, or call resetToCurrentRotation() in such a way that it doesn’t create this spinning on desktop.