Fancybox YouTube视频无法在Localhost上运行

| 我在让Fancybox的YouTube视频实现在我的本地主机上运行时遇到问题。当我加载页面时,出现此错误:
Unsafe JavaScript attempt to access frame with URL http://sites:8888/clients/project_name/v1/products/index from frame with URL http://www.youtube.com/embed/RtXSVGsQ8N0. Domains, protocols and ports must match.
我显然希望在将实现推送到实时服务器之前,确保实现工作正常。 提前致谢。     
已邀请:
        似乎您正在尝试进行跨域Ajax调用。您的浏览器是什么?     
        要澄清ToyDaVirus,请确保在参数中将type指定为iframe。 即
\'type\' : \'iframe\'
$(\'#selector\').click(function() {

        $.fancybox({

        \'padding\'           : 10,
        \'autoScale\'         : false,
        \'transitionIn\'      : \'elastic\',
        \'centerOnScroll\'    : true,
        \'overlayColor\'      : \'#000\',
        \'transitionOut\'     : \'none\',
        \'title\'             : this.title,
        \'width\'             : 680,
        \'height\'            : 495,
        \'href\'              : this.href.replace(new RegExp(\"watch\\\\?v=\", \"i\"), \'v/\'),
        \'type\'              : \'iframe\',

        \'swf\'               : {
            \'wmode\'             : \'transparent\',
            \'allowfullscreen\'   : \'true\'
        }

        });

        return false;
});
    

要回复问题请先登录注册