Sie sind nicht angemeldet.

1

Dienstag, 12. September 2023, 12:38

Full screen not working on iPhone

KRPano version 1.21.
I can't "activate" full screen mode on iPhone.
However, I inserted the XML files "ios_iframe_fullscreen.xml" and "iphone_fullscreen_swipe.xml" but the "full screen" pictogram is not displayed in the gray bar.
Note that this works correctly on Android.

Here is the address to test:

https://www.fr-www.fr/pano.php?p=manufacture

2

Mittwoch, 13. September 2023, 11:17

Hi,

the iPhone doesn't support the HTML5 fullscreen API (Intentionally by Apple).

So the only way to bring the iPhone into a kind of fullscreen-mode is the rotation to landscape mode and some hacky tricks to scroll-off the url-bar:
https://www.youtube.com/watch?v=uPtbSTrZYDU

And depending on the iOS and krpano versions and the current browser state, it can be necessary to use swipes to get into the fullscreen mode.

Best regards,
Klaus

3

Mittwoch, 20. September 2023, 16:21

Thank you Klaus, I understand.Then I try to load an XML if it's an iPhone and another if it's Android, but my JavaScript function doesn't work:

<script>
var vars = {};
if (/iPad|iPhone|iPod/.test(navigator.userAgent)) {
//console.log("This is an iOS device.");
vars["include[test].url"] = "/panoramas/skin/vtourskin_no-menu-bar.xml";
} else {
//console.log("This is not an iOS device!");
vars["include[test].url"] = "/panoramas/skin/vtourskin.xml";
}
embedpano({xml:"/panoramas/<?php echo $pano; ?>", target:"pano", passQueryParameters:true, vars:vars});

</script>
Can you help me ?
Thanks in advance.

4

Mittwoch, 20. September 2023, 19:01

Hi,

E.g. add lines like these in your xml:

Quellcode

1
2
<include url="..." devices="ios" />
<include url="..." devices="no-ios" />


See here for more information:
https://krpano.com/docu/xml/#devices

Btw - the include is a xml-parsing element, not a variable that can be set. That's why your code isn't working.
Additionally - your js-detection only per userAgent isn't very reliable, the iOS browsers also have 'desktop' mode...

Best regards,
Klaus

5

Donnerstag, 21. September 2023, 11:14

Thank you very much, Klaus!