• Hi I want to create a page with switching virtual tour. One virtual tour for mobile-tablette device and the other for desktop.

    I look trough the doc and this forum and I don't know how to do it.

    here is my try in html.

    <script src="/vv/1/tour.js"></script>

    <div id="pano" style="width:100%; height:100%;" >
    <noscript>
    <table style="width:100%;height:100%;">
    <tr style="valign:middle;"><td>
    <div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div>
    </td></tr>
    </table>
    </noscript>
    <script>
    if(get(device.mobile), embedpano({swf:"/vv/1/tour.swf", xml:"/vv/1/tour.xml", target:"pano", html5:"auto", passQueryParameters:true}), embedpano({swf:"/vv/2/tour.swf", xml:"/vv/2/tour.xml", target:"pano", html5:"auto", passQueryParameters:true})
    </script>
    </div>

    It's just a black windows.

  • Hi,

    you can't use krpano xml actions code directly as Javascript code!

    You could try that:

    But I would recommend doing the device detection inside the viewer, that had more possibilities.
    e.g. you could use an kind of small startup xml with device depended includes:

    Code
    <krpano>
      <include url="mobile.xml" devices="mobile|tablet" />
      <include url="desktop.xml" devices="desktop" />
    </krpano>

    Best regards,
    Klaus

  • Thanks that works great and resolve my issue.

    I try to figure the second source code. It should inside the tour.xml ? I'm a bit confuse.

    I use two differents virtuals tours generate with Panotour Pro 1.8 : one with iPhone compatibility for mobile and the other for desktop. I change the krpano viewer for the last version and finaly I obtain iOS|Android|Desktop viewing page. Have a look. http://goo.gl/bhRIx

    thanks !

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!