You are not logged in.

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 936

Location: Denmark

Occupation: Photographer

  • Send private message

1

Thursday, November 25th 2010, 1:25pm

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

Tuur

Sage

Posts: 3,113

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Thursday, November 25th 2010, 1:34pm

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?

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
<head>
	<title>ILOVEKRPANO ©  Virtual Tuur</title>
	<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    
    <meta name="keywords" content="virtual, virtueel, panorama, panorama foto, panorama fotografie, 360 graden, 3d, tour, tours, rondleiding, virtuele rondleiding, virtuele tours, panoramische rondleiding, webdesign, virtuele tour, interactief, iphone, ipad, android, html5, flash " />
	<meta name="description" content="Virtual Tuur is specialist in virtuele rondleidingen voor op websites. Trek meer bezoekers door een virtuele tour aan te bieden van uw vastgoed project, hotel, restaurant, bedrijf. Hoge kwaliteit, veel mogelijkheden en volledig customizable" />
    
    <LINK REL="SHORTCUT ICON"
       HREF="P/ico.ico">

    
    
	<style>
		html { height:100%; }
		body { height:100%; overflow: hidden; margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:16px; color:#FFFFFF; background-color:#000000; }
		a{ color:#AAAAAA; text-decoration:underline; }
		a:hover{ color:#FFFFFF; text-decoration:underline; }
	</style>
</head>
<body>

<script src="3.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>

	var viewer = createPanoViewer({swf:"ILOVEKRPANO.swf", id:"krpanoSWFObject", target:"pano"});

	//viewer.useHTML5("whenpossible");		// incomment to use the HTML5 krpanoJS viewer always when possible (Safari5)

	if( viewer.isDevice("iPhone|iPod|Android") )
		viewer.addVariable("xml", "tour_mobile.xml");
	else
		viewer.addVariable("xml", "tour.xml");

	viewer.embed();

</script></div>

</body>
</html>


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

like and when if ipad blablabla
http://www.virtualtuur.com
Skype:studiotuur

3

Thursday, November 25th 2010, 1:38pm

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:

Source code

1
2
3
4
5
6
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:
http://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

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 936

Location: Denmark

Occupation: Photographer

  • Send private message

4

Thursday, November 25th 2010, 1:58pm

So why not enable this automatically in the Make Vtour configuration. It would make things much easier to work with fast.
Actually it should be a parameter in all the Tools for it. Just a true /false

Hans

5

Thursday, November 25th 2010, 2:15pm

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

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 936

Location: Denmark

Occupation: Photographer

  • Send private message

6

Saturday, November 27th 2010, 12:24pm

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

7

Wednesday, December 1st 2010, 11:51am

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:

Source code

1
2
3
4
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