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??

  • 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!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!