Hello. So ive got this far:
$.get('http://gdata.youtube.com/feeds/api/videos/NWHfY_lvKIQ?v=2&alt=json', function(data) {
var title = data.entry.title.$t;
var description = data.entry.media$group.media$description.$t;
var thumbnail = data.entry.media$group.media$thumbnail[0].url; // URL of the image
alert (description);
alert (title);
alert (thumbnail);
// Use these variables somewhere
});
This script is for one specific video.
Now i want this same thing to happen but that you insert a youtube link and then this happens.
e.g you paste this http://www.youtube.com/watch?v=G7YXn-lfHXc into a normal <input id="youtubebox" type="text"> , then it will give you those three alerts with the description, title and thumbnail for the videolink you've inserted.
So it converts somehow this http://www.youtube.com/watch?v=G7YXn-lfHXc to this G7YXn-lfHXc and then inserts that videolink ID at this line:
$.get('http://gdata.youtube.com/feeds/api/videos/HERE?v=2&alt=json', function(data) {
Or? how can i do this please help me my last needs for my system, thank you.