我想通过其ID获取有关YouTube视频的一些详细信息,我使用此JSON API请求:
$.get("https://www.googleapis.com/youtube/v3/videos?id=" + key + "&key=myAPIKEY&part=snippet", function (data) {
console.log(data);
});
但是我收到了Google Chrome的错误消息:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'file://' is therefore not allowed access.
Google是否有某种JavaScript库可以跳过此Access Control Allow Origin
?