Not sure if this helps but things map pretty well to the new api. Here is the youtubeSearchVideos js function updated and working. I started working on this and thought I should share.
function youtubeSearchVideos(params, customField) {
var i, entry, video_id;
if (params.author) params.keywords += " " + params.author;
$.ajax({
crossDomain: true,
dataType: "json",
url: "https://www.googleapis.com/youtube/v3/search/",
data: {
part: "snippet",
type: "videos",
q: params.keywords,
key: "AIzaSyBpu8hgnXbkqFVWrAvwRUEz7T13ii3I7WM",
maxResults: params.limit
},
success: function(rdata) {
var Videos = [];
/* if (typeof rdata.feed === "undefined") {
addVideoResults("youtube", Videos, customField);
}
if (typeof rdata.feed.entry === "undefined") {
addVideoResults("youtube", Videos, customField);
}*/
for (var i = 0; i < rdata.items.length; i++) {
entry = rdata.items[i];
video_id = entry.id.videoId;
Videos.push({
id: video_id,
title: entry.snippet.title,
img_url: "https://i.ytimg.com/vi/" + video_id + "/default.jpg",
vid_url: "https://www.youtube.com/embed/" + video_id
});
}
addVideoResults("youtube", Videos, customField);
}
});
}
Best,
Cory