You are not logged in.

1

Thursday, March 17th 2016, 11:47pm

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!

This post has been edited 1 times, last edit by "BOX" (Mar 18th 2016, 9:30pm)


2

Friday, March 18th 2016, 9:29pm

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-plugins…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.

Similar threads