我正在尝试运行Google Javascript YouTube API samples,当页面(search.html)加载时出现以下错误:
jquery.min.js:2 Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://localhost" from accessing a frame with origin "https://accounts.google.com". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "https". Protocols must match.
我对代码所做的唯一更改是在auth.js中输入我的凭据(浏览器API密钥):
var OAUTH2_CLIENT_ID = '.....'
有什么想法吗?