You are not logged in.

Luis

Beginner

  • "Luis" started this thread

Posts: 15

Location: Honduras

Occupation: CEO & Co-Founder

  • Send private message

1

Wednesday, March 27th 2013, 1:25am

Know the device before to embed?

Hi all! I want to know if it is possible to know with javascript what type of device is it (desktop, tablet or mobile), using just the swf krpano.js API before to embed the viewer??

2

Thursday, March 28th 2013, 2:03pm

Hi,

krpano embedding script itself doesn't have functions for detecting if mobile, tablet or desktop - this happens directly in the viewer itself.

Best regards,
Klaus

Luis

Beginner

  • "Luis" started this thread

Posts: 15

Location: Honduras

Occupation: CEO & Co-Founder

  • Send private message

3

Thursday, March 28th 2013, 5:13pm

Thanks for respond Klaus!!

I was trying to select an XML (desktop.xml, tablet.xml, mobile.xml) for include before to embed, so my solution was use a main XML en this use an other include to a PHP (template.php)

This include send a GET vars (desktop, tablet and mobile)
echo '<include url="%SWFPATH%/template.xml.php?desktop=%$device.desktop%&amp;tablet=%$device.tablet%&amp;mobile=%$device.mobile />';

And later with PHP I detect the get vars for include the correct XML!