about embedpano with condition

  • Hello people!

    First of all sorry about my poor and bad english!

    I read in the documentation saying about the methods to embed the panoramas.

    As I understand it, I can only put the wmode parameter using the function embedpano.

    But I would like to write something with a condition such as: If a device add the variable containing the xml to be read, saying directly that will not be a flash movie, but if not a device, then that performs the function normally, as is!

    Can someone help me!


    Right now I'm trying something like:

    var viewer = embedpano({swf: 'vivi1.swf ", target:" panoDIV ", wmode:" opaque "});

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

    viewer.embed ()

    Thanks!

  • Hi,

    the 'embedpano' function doesn't return anything, it is directly embedding the viewer,

    see here:
    https://krpano.com/docu/html/#description

    and means use 'createPanoViewer' instead,
    e.g.

    Code
    var viewer = createPanoViewer({swf: 'vivi1.swf ", target:" panoDIV ", wmode:" opaque "});
       
    if ( viewer.isDevice("iPhone|iPod|Android|iPhone|androidtable") )
      viewer.addVariable("xml", "vivi1b.xml");
    else
      viewer.addVariable("xml", "desktop.xml");
     
    viewer.embed();

    Best regards,
    Klaus

Jetzt mitmachen!

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