Hallo,
Ersetzen Sie den Code der Zeile 116 bis 134:
Code:
_video = {
youtube: {
reg: /https?:\/\/(?:[a-zA_Z]{2,3}.)?(?:youtube\.com\/watch\?)((?:[\w\d\-\_\=]+&(?:amp;)?)*v(?:<[A-Z]+>)?=([0-9a-zA-Z\-\_]+))/i,
embed: function() {
return 'http://www.youtube.com/embed/' + this.id;
},
getUrl: function() {
return PROT + '//gdata.youtube.com/feeds/api/videos/' + this.id + '?v=2&alt=json-in-script&callback=?';
},
get_thumb: function(data) {
return data.entry.media$group.media$thumbnail[2].url;
},
get_image: function(data) {
if ( data.entry.yt$hd ) {
return PROT + '//img.youtube.com/vi/'+this.id+'/maxresdefault.jpg';
}
return data.entry.media$group.media$thumbnail[3].url;
}
},
Mit:
Code:
_video = {
youtube: {
reg: /https?:\/\/(?:[a-zA_Z]{2,3}.)?(?:youtube\.com\/watch\?)((?:[\w\d\-\_\=]+&(?:amp;)?)*v(?:<[A-Z]+>)?=([0-9a-zA-Z\-\_]+))/i,
embed: function() {
return 'http://www.youtube.com/embed/' + this.id;
},
getUrl: function() {
return 'https://www.googleapis.com/youtube/v3/videos?id=' + this.id + '&part=contentDetails&key=[KEY]';
},
get_thumb: function(data) {
return PROT + '//img.youtube.com/vi/'+this.id+'/default.jpg';
},
get_image: function(data) {
return PROT + '//img.youtube.com/vi/'+this.id+'/maxresdefault.jpg';
}
},
Dann ersetzen Sie [Key] (Zeile 123) mit Ihrer API-Key.
Quelle : http://support.galleria.io/discussio...mment_37056951
Lesezeichen