Why not separate xml for HTML5

  • Would it not be possible to let the javascript load the appropriate xml for HTML5 or flash.

    As it is now we are very limited if we want to use automatic detected HTML5 support.
    Also the sizes are so different that using the same interface for both limits your design too much.

    If the Make VTour could produce a separate tourhtml5.xml it would be very easy to modify it and just ad the extra functions in the flash xml.

    Hans

  • Hi Hans,

    I use this html..

    it makes the choice of the device and opens the xml you want..

    if iphone open mobile.xml else open tour.xml orso..

    is that what you mean?

    i would like to add another if her in tyhe bottom... is that possible?

    like and when if ipad blablabla

  • Hi,

    yes, that's possible,
    the swfkrpano.js script provides the isDevice function for device detection,

    here an example with different xml file for iPhone, iPad and Desktop:

    Code
    if( viewer.isDevice("iPhone") )
      viewer.addVariable("xml", "iphone.xml");
    else if( viewer.isDevice("iPad") )
      viewer.addVariable("xml", "ipad.xml");
    else
      viewer.addVariable("xml", "desktop.xml");

    have also a look at the "krpano.html" in the viewer download package for an other example


    alternatively it's possible to define for each plugin and hotspot element with the "devices" parameter
    in the xml on which devices it should be used:
    https://krpano.com/docu/xml/#plugin.devices

    and with the alturl, altscale and altonloaded parameters it's possible to define alternative
    values for the case when using the krpanoJS viewer,

    and additionally there are the isphone, ispad, isandroid, isflash, ishtml5 variables for
    dynamically making adjustments for the devices,

    best regards,
    Klaus

  • Hi,

    my basic intention is to use the same xml for all devices,

    but generating optionally different xml files for certain devices (which devices?) would be also possible of course,
    but I'm not sure what should be made different in these xml files especially?
    e.g. what should be different in a mobile xml?

    best regards,
    Klaus

  • I do not need the Tool to create the changes. I just need the basic files for it.
    I have no problems adding a link to different skins in the 2 XML's but to make it a Tool that can be used fast and easy for publishing, all the tools should have an option to create different xml with the .js changes.

    But of course this will not solve the problem with Androids. Small display Flash panos also needs a different skin.
    At least if you want Smart phones to be optimized for panoramas.

    Hans

  • Hi,

    I do not need the Tool to create the changes. I just need the basic files for it.
    I have no problems adding a link to different skins in the 2 XML's but to make it a Tool that can be used fast and easy for publishing, all the tools should have an option to create different xml with the .js changes.

    you could simply copy the generated xml file and save it under a new name and add there your changes,
    and then add a switch in the html for the xml files, see below for an example,

    But of course this will not solve the problem with Androids. Small display Flash panos also needs a different skin.
    At least if you want Smart phones to be optimized for panoramas.

    please have a look at the krpano.html file from the viewer package,

    there I use this code:

    Code
    if( viewer.isDevice("iPhone|iPod|Android") )
      viewer.addVariable("xml", "krpano_mobile.xml");
    else
      viewer.addVariable("xml", "krpano.xml");

    to use the "krpano_mobile.xml" with a 'reduced' content for iPhone, iPod and Android Phones,
    and the normal "krpano.xml" for Desktop and iPad,

    best regards,
    Klaus

Participate now!

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