Closed bsde1245 closed 6 years ago
If you know the title set data-title
(see http://ashleydw.github.io/lightbox/#single-image), otherwise there's no way of getting the youtube title from the video.
Check this out. I think someone grabbed the title here...
You answered your question yourself :)
Take this code and put it in the onNavigate
event
Hi @ashleydw I am a newbie. Please share full code here. Thanks
onNavigate: function onNavigate() {
$.ajax({
url: window.location.protocol + '//query.yahooapis.com/v1/public/yql',
data: {
q: "select * from json where url ='http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=" + id + "&format=json'",
format: "json"
},
dataType: "jsonp",
success: function (data) {
if (data && data.query && data.query.results && data.query.results.json) {
YouTubeDialog.dialog({
title: data.query.results.json.title
});
}
}
});
},
Is this enough? how to get title name?
Can I grab youtube video title and place with image grabbed from youtube I mean along with following link
Hope it is clear to you. Thanks.