Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Donnerstag, 11. Mai 2023, 09:44

How to load tour.xml file by device type?

I want to do tour.xml version for Mobile and Pc one by one, but don't know how to check the device and then load the tour.xml file for each, I have referenced here but it doesn't work https://krpano.com/forum/wbb/index.php?p…&threadID=10686 *sad*
*thumbup* Woody *thumbup* KEEP MOVING FORWARD *thumbup*

kme

Fortgeschrittener

Beiträge: 310

Wohnort: Belgium

Beruf: Long time coder, product manager and 3D enthousiast

  • Nachricht senden

2

Donnerstag, 11. Mai 2023, 09:58

My thinking goes into making a "wrapper" tour and load the device specific xml based on device detection in the xml:

So tour.xml (the one you load in the html) would look like this:

Quellcode

1
2
3
4
5
6
<krpano>

<include url="tour_mobile.xml" devices="mobile.or.tablet" />
<include url="tour_desktop.xml" devices="desktop" />

</krpano>


And then krpano will load the other tours based on device selection.

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

3

Donnerstag, 11. Mai 2023, 09:58

Hi,

I think it is fairly simple.
If you have an xml(s) for desktop and another xml(s) for mobile you can do:

Quellcode

1
2
<include url="tour.xml" devices="desktop" />
<include url="tour_mob.xml" devices="mobile" />


There are more options of course. For example you can also give such a devices setting to an action, layer, hotspot, style, event etc etc.. and most often also their attributes.
So it is possible with 1xml to serve different behaviour or looks for specified devices..
Look in the documentation for device.


Hope it helps,
Tuur *thumbsup*

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Tuur« (12. Mai 2023, 14:12)


4

Montag, 15. Mai 2023, 10:57

Thank you for your support *love* *love* *love*
*thumbup* Woody *thumbup* KEEP MOVING FORWARD *thumbup*

5

Montag, 15. Mai 2023, 11:00

Can I add into

Quellcode

1
embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano", html5:"auto", mobilescale:1.0, passQueryParameters:true });
" ??
Hi,

I think it is fairly simple.
If you have an xml(s) for desktop and another xml(s) for mobile you can do:

Quellcode

1

				


There are more options of course. For example you can also give such a devices setting to an action, layer, hotspot, style, event etc etc.. and most often also their attributes.
So it is possible with 1xml to serve different behaviour or looks for specified devices..
Look in the documentation for device.


Hope it helps,
Tuur *thumbsup*</include></include>
*thumbup* Woody *thumbup* KEEP MOVING FORWARD *thumbup*