Google Maps api v3 + canvas + chrome causes black boxes on youtube videos and map elements Google Maps api v3 + canvas + chrome causes black boxes on youtube videos and map elements windows windows

Google Maps api v3 + canvas + chrome causes black boxes on youtube videos and map elements


You have a cross-domain scripting error, in Chrome on both OS's.

Unsafe JavaScript attempt to access frame with URL http://sgaz.mapitusa.com/ from frame with URL http://www.youtube.com/embed/XFDtfg7RquI. Domains, protocols and ports must match.

You can use the (Experimental) JavaScript Player API for iframe embeds to circumvent this issue.http://code.google.com/apis/youtube/iframe_api_reference.html

I also get the error

Uncaught TypeError: Property 'focus' of object [object DOMWindow] is not a function http://sgaz.mapitusa.com/ line 94

In chrome 17.0.9 on windows XP.


Add the following style to your iFrames:
iframe { -webkit-transform:translate3d(0,0,0); }
That fixed the problem for me in Chrome and Safari on Windows 7.