Full screen not working on iPhone

  • 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

  • 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.

  • Hi,

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

    Code
    <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

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!