You are not logged in.

21

Wednesday, December 1st 2010, 2:20pm

Hi,

the device detection is independent of the User agent,
that means even when the User agent is set to iPhone the viewer will
still detect that it is running on Desktop,

internally the 'navigator.platform' setting of the browser is used for that,
this setting will be always the same, regardless of the User agent,
and I don't know if it's possible to change that too in Safari...

but I understand what you want to do - I will add a switch to enable
testing a certain device,

best regards,
Klaus

HansNyb

Professional

Posts: 936

Location: Denmark

Occupation: Photographer

  • Send private message

22

Monday, December 6th 2010, 1:52pm

Yes, it's the default fovmin, which is 50 in krpanoJS,

there no automatic alternative fovmin setting at the moment,
but there are the following possiblites:

use a maxpixelzoom setting for Flash and a fovmin setting for krpanoJS,
when maxpixelzoom is defined the fovmin will be ignored in Flash,

or:

set the fovmin dynamically in an event,
e.g. in the onstart event:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
<krpano onstart="start();">

<action name="start">
  <!-- e.g. just for the iphone -->
  if(isphone, set(view.fovmin, 60));

  <!-- or all html5 views -->
  if(ishtml5, set(view.fovmin, 60));

  <!-- or a different fovmin for each device -->
  if(isphone, set(view.fovmin, 50));
  if(ispad, set(view.fovmin, 60));
</action>


best regards,
Klaus


So how should this code look if I want only the iPhone to build the thumbs (vtour thumbs)
LIke this or

<action name="startup">
loadscene(get(scene[0].name), null, MERGE);
<!-- e.g. just for the iphone -->
if(isphone, set(buildthumbs();
</action>

Hans

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

23

Monday, December 6th 2010, 3:24pm

Quoted from "Hans"

<action name="startup">
loadscene(get(scene[0].name), null, MERGE);
<!-- e.g. just for the iphone -->
if(isphone, set(buildthumbs();
</action>

Hans


<action name="startup">
loadscene(get(scene[0].name), null, MERGE);
<!-- e.g. just for the iphone -->
if(isphone, set(buildthumbs()) </action>

that should work you just need another ) there.

24

Monday, December 6th 2010, 4:17pm

Hi,

sorry, both codes are wrong

this is the right code:

Quoted

if(isphone, buildthumbs() );

the if is written in that way:

first the if with an opening bracket (
then the condition to check - either a variable or a comparisons of two variables,
then the actions that should be executed when the condition is true,
then optionally a comma , and the actions that should be executed when the condition is false,
and then finally a closing bracket ) to end the if action,

if there will follow an additional action after the if action then also a semicolon ; is needed as end mark,
when there is no action following then the semicolon is optional,

see also here:
http://krpano.com/docu/actions/#syntaxandusage
http://krpano.com/docu/actions/#if

best regards,
Klaus