Using youtubeEmbed-jQuery returns NoLongerAvailableException

262 views Asked by At

I am running the following script as part of the youtubeEmbed-query-1.0.js plugin and since a short period this is returning an error 'NoLongerAvailableException'. I also can't find an update of the plugin.

    var youtubeAPI = 'http://gdata.youtube.com/feeds/api/videos?v=2&alt=jsonc';
    $.get(youtubeAPI,{'q':settings.videoID},function(response){

        var data = response.data;

        if(!data.totalItems || data.items[0].accessControl.embed!="allowed"){

            // If the video was not found, or embedding is not allowed;

            return elements.originalDIV;
        }

js fiddle example showing the error can be found here: https://jsfiddle.net/tL14auhe/1/

1

There are 1 answers

3
Pavel Němec On

Google has not yet supported an old version of YouTube API. You can find more information here.