Your Cart

YouTube API v2 deprecated

These forums are now closed to new replies / tickets.

Please open a support ticket from our new Support page.

Front Page Forums Problems YouTube API v2 deprecated

  • gravatar
    Dave
    June 4, 2015 at 10:41 am

    Hi, am I correct that galleria is using the youtube v2 api? If
    I’m correct this api is now deprecated and youtube even closed
    access to it.

    My galleria with a youtube in it now gives the following
    error:

    Failed to load resource: the server responded with a status of
    410 (Gone)

    http://gdata.youtube.com/feeds/api/videos/i9MCCowNOAg?v=2&alt=j

    Is there a workaround or scheduled update of Galleria?

    Thanks!
    Dave


    gravatar
    Mandy Drummond
    June 5, 2015 at 1:57 pm

    Following, we are having the same issue.


    gravatar
    agallagher
    June 5, 2015 at 2:02 pm

    Following


    gravatar
    Steve
    June 6, 2015 at 2:37 pm

    Same issue.


    gravatar
    Goran Saric
    June 6, 2015 at 2:43 pm

    Here is a fix, although you need an Google API acces key to get
    it work.
    Change this method in the _video class and replace [API KEY] with
    your key.


    gravatar
    Steve
    June 6, 2015 at 3:01 pm

    Awesome, thanks so much for the quick reply. I’ll give this a
    try later today.


    gravatar
    Goran Saric
    June 6, 2015 at 3:18 pm

    Argh.. sorry, I’ve attached the whole galleria js file, not only
    the mentioned method. Just to avoid confusion 😉
    Cheers


    gravatar
    JT
    June 7, 2015 at 10:39 pm

    Any other suggestions for figuring this out?

    I set up an API Key for YouTube Data API v3 and put it in
    Goran’s galleria file, but Youtube still isn’t working for me.

    In the following link, every band should have a gallery next to
    it containing photo and video. But any gallery that contains a
    youtube video isn’t showing up at all, only ones with just photos
    and/or Vimeo videos.


    http://foundwaves.org/2015/06/07/boston-weekly-picks-jun-8-jun-14-2

    Any advice is appreciated! Thanks!


    gravatar
    Steve
    June 8, 2015 at 2:30 pm

    It’s not working for me either. I’ve got the following line in
    the YouTube method:

    return ‘https://www.googleapis.com/youtube/v3/videos?id='
    + this.id +
    ‘&part=contentDetails&key=AIzaSyBM3hy522NmYHTf4AX3nDzSHXyC8aEmdlU’;

    But, when I check my dev tools console, there is a GET request
    which I assume is from the $.getJSON jquery call:


    https://www.googleapis.com/youtube/v3/videos?id=DjsDx6JS5fE&par

    The extra “&_=1433772820441” is appended on to the query
    string and I have not been able to figure out why. I’m running
    galleria 1.4.2 and jquery 1.11.3

    Thanks for your continued help.


    gravatar
    Steve
    June 8, 2015 at 2:40 pm

    Found a solution what works for me. Apparently, you still need
    the jsonp parameter added to the url: &callback=?

    Here’s what mine looks like:


    https://www.googleapis.com/youtube/v3/videos?id=DjsDx6JS5fE&par
    key]&callback=?


    https://www.googleapis.com/youtube/v3/videos?id=DjsDx6JS5fE&par…=?


    gravatar
    Tyler
    June 8, 2015 at 5:53 pm

    Thanks @Steve, that also worked for me. I also wanted to show my
    solution for thumbnails and images since something with the way
    google sets up their objects in the API also changed. This makes
    sure that if the video is hd that it will include the highest
    resolution image in the viewer.

    In the _video object:
    get_thumb: function(data) {
    return PROT + ‘//img.youtube.com/vi/’+this.id+’/default.jpg’; },
    get_image: function(data) {
    if ( data.items[0].contentDetails.definition === ‘hd’ ) { return
    PROT + ‘//img.youtube.com/vi/’+this.id+’/maxresdefault.jpg’; }
    return PROT + ‘//img.youtube.com/vi/’+this.id+’/hqdefault.jpg’;
    }


    gravatar
    JT
    June 8, 2015 at 7:45 pm

    Thanks Steve, it’s working for us now! Really appreciate you
    sharing your solution.


    gravatar
    nettoyeur
    June 13, 2015 at 11:05 pm

    thanks everyone for the complete solution guys!


    gravatar
    joschi03
    June 15, 2015 at 6:20 pm

    Perfect – thanks a lot!


    gravatar
    al404
    July 7, 2015 at 8:13 am

    i try the suggested answer but with &callback=? i get an
    error

    {error”:{“errors”:[{“domain”:”global”,”reason”:”invalidParameter”,”message”:”Invalid
    value for parameter callback:
    ?”,”locationType”:”parameter”,”location”:”callback”}],”code”:400,”message

    value for parameter callback: ?”}}

    without it seems to work but on iPad video does not autoplay and
    even clicking on play button does not work


1 2
Galleria.io uses cookies to store information. You can read more about that in our Privacy Policy. I understand