Permanent Solution for Youtube Video not working

There are several suggestions that require you to look in the a or f object in the evt.target object. However I just encountered the video id in the h object. To avoid such guesses in the future you can use the follow function in place of the default getVideoOptions

function getVideoOptions(evt) {
//Fixed : The id of the video is in the h object in the event target
// Fixed : Loop through the target and find the ids that match the ones in video
var videoIds = Object.keys(videos);
var matchedVideoId = “”
Object.entries(evt.target).map((elements, idx) => {
const element = elements[1]
if (!element[“id”]) {
return;
}
const _elementId = element[“id”];
if (videoIds.indexOf(_elementId) !== -1) {
matchedVideoId = _elementId;
}

});
return videos[matchedVideoId];
// return videos[evt.target.a.id];
}