mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.15k stars 710 forks source link

How to use the device direction control function on the default mobile phone after entering the Panorama #1169

Open guohuayu opened 1 year ago

guohuayu commented 1 year ago

The example on the official website has the function of enabling device direction control on the mobile phone. But I don't have this directional control feature in version 2.5.6 of CDN, and I set orientationOnByDefault to true. No response on the phone

mpetroff commented 1 year ago

For orientationOnByDefault to work, the user has to have already granted the site access to device orientation. You seem to have already granted pannellum.org permission, but you haven't granted permission wherever it isn't working. Additionally, browsers only allow device orientation to work over HTTPS, and prompts for device orientation permission must be initiated by user interaction, so orientationOnByDefault won't prompt for it when autoLoad is also set to true.