wrong cubeface images loaded as iPhone/mobile device detection does not appear to working

  • I am using the following syntax to load different size pano images depending on the device, ie desktop, tablet or mobile:

    <!-- ** pano23 - ocean-kaleidoscope-restaurant-view-1 ********************************************************************* -->

    <scene name="pano23" title="Kaleidoscope Restaurant, Ocean Hotel" onstart="showname();">

    <events onkeydown="action(keydown-fac);" />

    <view limitview="range" hlookat="135" hlookatmin="-180" hlookatmax="180" vlookat="0" vlookatmin="-65" vlookatmax="65" fovtype="MFOV" fovmax="85" maxpixelzoom="2.0" />

    <preview url="../images/preview/pano23_preview.jpg" />

    <image>
    <left url="../images/pc-med-res/pano23_l.jpg" />
    <front url="../images/pc-med-res/pano23_f.jpg" />
    <right url="../images/pc-med-res/pano23_r.jpg" />
    <back url="../images/pc-med-res/pano23_b.jpg" />
    <up url="../images/pc-med-res/pano23_u.jpg" />
    <down url="../images/pc-med-res/pano23_d.jpg" />
    <mobile>
    <left url="../images/iphone/pano23_l.jpg" />
    <front url="../images/iphone/pano23_f.jpg" />
    <right url="../images/iphone/pano23_r.jpg" />
    <back url="../images/iphone/pano23_b.jpg" />
    <up url="../images/iphone/pano23_u.jpg" />
    <down url="../images/iphone/pano23_d.jpg" />
    </mobile>
    <tablet>
    <left url="../images/ipad/pano23_l.jpg" />
    <front url="../images/ipad/pano23_f.jpg" />
    <right url="../images/ipad/pano23_r.jpg" />
    <back url="../images/ipad/pano23_b.jpg" />
    <up url="../images/ipad/pano23_u.jpg" />
    <down url="../images/ipad/pano23_d.jpg" />
    </tablet>
    </image>

    </scene>

    Have been testing on PC, iPad and iPhone. Works fine on PC and iPad, but iphone always appears to load the ipad images, so appears to be detected as a tablet.

    This problem only appears on the cubeface load, elsewhere detection seems to work ok.

    I am using the latest version of krpano.

    Any ideas?

    Tim

  • Just deleted the tablet entries, so that code is as follows:

    <image>
    <left url="../images/pc-med-res/pano23_l.jpg" />
    <front url="../images/pc-med-res/pano23_f.jpg" />
    <right url="../images/pc-med-res/pano23_r.jpg" />
    <back url="../images/pc-med-res/pano23_b.jpg" />
    <up url="../images/pc-med-res/pano23_u.jpg" />
    <down url="../images/pc-med-res/pano23_d.jpg" />


    <mobile>
    <left url="../images/iphone/pano23_l.jpg" />
    <front url="../images/iphone/pano23_f.jpg" />
    <right url="../images/iphone/pano23_r.jpg" />
    <back url="../images/iphone/pano23_b.jpg" />
    <up url="../images/iphone/pano23_u.jpg" />
    <down url="../images/iphone/pano23_d.jpg" />
    </mobile>

    </image>

    Retested, Desktop fine, ipad loads mobile images and iphone now loads mobile images, so problem seems to be with order of images, help!!! I need to get this fixed urgently for client.

    Client tested on android device and got same problem.

    cheers
    Tim

  • Previous syntax appears to no longer work with latest version of krpano, I changed as follows:

    <image devices="Desktop">
    <left url="../images/pc-med-res/pano14_l.jpg" />
    <front url="../images/pc-med-res/pano14_f.jpg" />
    <right url="../images/pc-med-res/pano14_r.jpg" />
    <back url="../images/pc-med-res/pano14_b.jpg" />
    <up url="../images/pc-med-res/pano14_u.jpg" />
    <down url="../images/pc-med-res/pano14_d.jpg" />
    </image>

    <image devices="Mobile">
    <left url="../images/iphone/pano14_l.jpg" />
    <front url="../images/iphone/pano14_f.jpg" />
    <right url="../images/iphone/pano14_r.jpg" />
    <back url="../images/iphone/pano14_b.jpg" />
    <up url="../images/iphone/pano14_u.jpg" />
    <down url="../images/iphone/pano14_d.jpg" />
    </image>

    <image devices="Tablet">
    <left url="../images/ipad/pano14_l.jpg" />
    <front url="../images/ipad/pano14_f.jpg" />
    <right url="../images/ipad/pano14_r.jpg" />
    <back url="../images/ipad/pano14_b.jpg" />
    <up url="../images/ipad/pano14_u.jpg" />
    <down url="../images/ipad/pano14_d.jpg" />
    </image>

    And now works fine.

    Tim

  • Hi,

    the 512px <mobile> images were introduced when only the iPhone 3G, 3GS were on the market and the typical Android screen resolution was also around 320x480,

    but since iPhone 4 and Android devices with typically resolution 480x800 or higher, the <mobile> images were too small for these devices, so already since krpano 1.0.8.12 these devices were also using the bigger 1024px <tablet> images (but iPhone 3G and the older iPod touch were still using the <mobile> images of course),

    the current 1.0.8.15 viewer is still working that way,
    but the new tools are now only generating 1024px images and using them as <mobile> images for all mobiles and tablets devices,

    with your syntax you are now serving the small mobile images to all mobile devices (iPhone 3, iPhone 4, Android devices), but for iPhone 4 and todays Android devices the resolution of these images might be a bit low for good quality...

    best regards,
    Klaus

  • Hi Klaus

    Thanks for clarifying how this works. The main issue I have with mobile devices is that 3G connections can still be slow, hence the need to serve lower quality images on these devices. Detection of whether wifi or 3g connection would be great, but not easy to do *smile*

    As always thanks for the explanation and quick response.

    Tim

Participate now!

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