To display uploaded You tube video, title views count, description Published date …

<script type="text/javascript">
function youtubeFeedCallback(data) {
var s = '';
s += ' <span>'+ Math.floor(data.entry.media$group.yt$duration.seconds / 60) + ':' + (data.entry.media$group.yt$duration.seconds % 60)+'</span><br/>';
s += '<h1>' + data.entry.title.$t + '</h1>';
s += '<p>' + data.entry.yt$statistics.viewCount + ' view(s)</p>';

s += '<p>by ' + data.entry.author[0].name.$t + ' On ' + new Date(data.entry.published.$t).toLocaleDateString() + '</p>';
s += '<p>'+data.entry.media$group.media$description.$t.replace(/\n/g,'<br/>' ) +'</p><hr/>';

s += '<p><strong><a href="$videoViewMoreLink.getData()" target="_blank">View All Videos</a></strong></p></div>';
document.write(s);

}
</script>
<script type="text/javascript" src="http://gdata.youtube.com/feeds/api/videos/vR_r06JVpj8?v=2&alt=json-in-script&callback=youtubeFeedCallback"></script>

Check point:

http://www.youtube.com/watch?v=vR_r06JVpj8

youtube

for more information check the below reference link

https://developers.google.com/youtube/2.0/developers_guide_json

https://developers.google.com/youtube/js_api_reference

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: