Simulate "desktop" version on mobile devices?

  • Hi,

    I wish simulate "desktop" version on mobile devices so that my clients, who
    have high end mobile devices, can enjoy multi resolution panoramas.

    I have found "simulatedevice" variable which allows to simulate mobile version

    on desktop but I need exactly the opposite variable.

    Does anybody have an idea?

    Best Regards,
    hyung

  • I think I found two solutions.

    The first one is to use "fakedevice". But krpano documentation says

    • Note - This setting should be only used for internal testing, never for publishing!


    So I think I'd better not use this for actual use.


    Second Solution:

    The "display" XML tag has an attribute called "usedesktopimages", which allows displaying
    desktop images on mobile devices. I think I should set the embedding parameter "passQueryParameters:true"
    and pass "usedesktopimages" parameter to url such as below.

    tour.html?usedesktopimages=true


    Hope second method works.

    hyung

  • Hi,

    yes, the krpano viewer will automatically use the multi-resolution tiles also on mobiles if available.

    Btw - it not necessary to set, but about:

    tour.html?usedesktopimages=true

    the correct setting would be:

    tour.html?display.usedesktopimages=true

    Best regards,
    Klaus

  • Thank you for your reply Klaus,

    I am still struggling with this issue. What I want to do is to offer users 3 quality
    options - low, middle, high so that they can select that best suits their environment.

    I have gone through the documentation and it seems to me that "fakedevice" is the
    best option and tried the following but couldn't get it worked.

    Please have a look at my code below:


    <preview url="pano/1/pv.jpg" />
    <image type="CUBE" multires="true" tilesize="512">
    <level tiledimagewidth="1024" tiledimageheight="1024">
    <cube url="pano/1/mres_%s/l3/%v/l3_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="2048" tiledimageheight="2048">
    <cube url="pano/1/mres_%s/l2/%v/l2_%s_%v_%h.jpg" />
    </level>
    <mobile>
    <cube url="pano/1/512_%s.jpg" />
    </mobile>
    <tablet>
    <cube url="pano/1/1024_%s.jpg" />
    </tablet>
    </image>


    I have tested this by calling "tour.html?html5=only&fakedevice=mobile" from localhost.

    (I have set the "passQueryParameters:true")
    The "html5" parameter works fine but the "fakedevice" parameter doesn't seem to work.


    I know I can create 3 different XML files but I really don't want to do this due to duplicate
    code work. And I don't want to use server-side coding such as PHP. I believe there should be
    an solution just by using simple krpano option.

    Could you please give me an example?


    Thank you in advance!


    Best Regards,
    hyung

  • Hi Klaus,

    I have just tried the latest version (1.19-pr3) and the "fakedevice" parameter works fine.
    But with my code only the UI changes. What I want is just to use different cube size depending
    on the value of html parameter..


    For example:
    - tour.html?quality=low -> use "mobile" cube faces (512)
    - tour.html?quality=middle -> us "tablet" cube faces (1024)

    - tour.html?quality=high (or just "tour.html") -> use "multi-resolution" cube faces (which is default)


    I think I should modify my following code but not sure how..


    <preview url="pano/1/pv.jpg" />
    <image type="CUBE" multires="true" tilesize="512">
    <level tiledimagewidth="1024" tiledimageheight="1024">
    <cube url="pano/1/mres_%s/l3/%v/l3_%s_%v_%h.jpg" />
    </level>
    <level tiledimagewidth="2048" tiledimageheight="2048">
    <cube url="pano/1/mres_%s/l2/%v/l2_%s_%v_%h.jpg" />
    </level>
    <mobile>
    <cube url="pano/1/512_%s.jpg" />
    </mobile>
    <tablet>
    <cube url="pano/1/1024_%s.jpg" />
    </tablet>
    </image>


    Could you please give me any guide?


    Best Regards,
    hyung

  • Hi,

    right, doing such should be not necessary, but with 1.19 you could do that anyway by using the new initvars the new xml if checks:

    tour.html?initvars.quality=low
    tour.html?initvars.quality=middle
    tour.html?initvars.quality=high

    and in the xml:

    Best regards,
    Klaus

Participate now!

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