Detect whether Motion & Orientation Access is enabled in Javascript - iOS

后端 未结 1 1915
你的背包
你的背包 2021-01-23 01:52

Unfortunately Safari disables Motion and Orientation access by default in:

Settings > Safari > Privacy & Security > Motion & Orientation Access

相关标签:
1条回答
  • 2021-01-23 02:18

    You could use the window.orientation property (output will be in degrees), since it is supported in Safari for IOS

    Note: Its use is depreciated and is not supported in many of the other browsers, fore other browsers you should use the screen.orientation property or the Generic Sensors API

    0 讨论(0)
提交回复
热议问题