mpetroff / pannellum

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

Mobile, device orientation on embedded panorama #313

Closed leadelazer closed 7 years ago

leadelazer commented 7 years ago

Is the deviceorientation supported also with the iframe embed one gets with the utility? I tried different embeds but the fullscreen button is never visible on my iphone.

mpetroff commented 7 years ago

Duplicate of #309 and #66. iOS doesn't support the full screen API: http://caniuse.com/#feat=fullscreen

leadelazer commented 7 years ago

Tks, I understand. But the device orientation buttons shows up if one does implement the panorama self hosted but not when it is embedded via iframe.

So I'm searching for ways to display some sort of gallery where I can navigate through a list of panoramas without using the tour which doesn't make sense in our case. It's easy to implement with iframes but I did not find any example with self hosted pannellum. :( I simply want this https://jsfiddle.net/alani/2vadg3bk/ to work with the mobile device orientation feature...

mpetroff commented 7 years ago

Again, blame Apple: https://bugs.webkit.org/show_bug.cgi?id=150072 https://bugs.webkit.org/show_bug.cgi?id=152299

iOS blocks deviceorientation events in cross-origin iframes. As this was done on purpose, I doubt the behavior will ever change. You need to host pannellum.htm on the same domain as the page that contains the iframes.