我有这个代码window.ondeviceorientationabsolute = (e) => console.log(e);
window.ondeviceorientationabsolute = (e) => console.log(e);
在两种设备(PC和手机)中,它确实输出{ alpha: null, gamma: null, beta: null }
{ alpha: null, gamma: null, beta: null }
我有点困惑,我从来没有使用设备apis,我不知道是否有一些权限丢失
非常感谢你的帮助
window.ondeviceorentationabsolute实际上没有任何基于this developer site的支持
API当设备没有相应的传感器时返回null。