krpano in ads - iFrame cross-domain block

  • When adding a krpano in an online ad (iFrame from an ad server, on a website), there is an error that occurs:

    "Blocked a frame with origin "http://ad-server.com" from accessing a frame with origin "http://a-website.com". Protocols, domains, and ports must match." - embedpanoJS krpano.js:315

    The pano still works in the ad/iframe but the error is in the console. The only thing that fails are plugins that connect to window, like gyro.js.

    When traced, the error stacks up as follows:
    init
    embedhtml5
    embedpanoJSkrpano-1.18.5.min.js:289
    okrpano-1.18.5.min.js:233:87
    dtkrpano-1.18.5.min.js:239:94
    embedkrpano-1.18.5.min.js:240
    embedpanokrpano-1.18.5.min.js:263
    (anonymous function)1.0:110

    Note this error may cause ad networks to deny krpanos in ads, PLEASE HELP!

    Einmal editiert, zuletzt von BOX (18. März 2016 um 21:30)

  • Can't seem to shake this error, but I'm able to get gyro.js working on Doubleclick ads!

    Basically I added iFrame message events to pass alpha, beta, gamma data to the gyro plugin from the parent window. Works great, here's the updated gyro if anyone needs it: https://github.com/BOXNYC/krpano-…kybox/skybox.js

    I explain how to get it working in Doubleclick ads on the Readme: https://github.com/BOXNYC/krpano-plugins

    I'm going to attempt to see if the error is caused by plugins, if so I'll report back.

Jetzt mitmachen!

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