Hi I Trying to retrieve a particular playlist thumbnail of user but here i stuck at there is not getting the views and description of the video and i wanna allow the Video with in my website only. Please check the code please.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src='http://ift.tt/1bJDSiQ'></script>
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
function LoadVids(startindex){
if (typeof startindex === "undefined" || startindex===null) startindex = 1;
var playListURL = 'http://ift.tt/1xfHCXk' + startindex;
var videoURL= 'http://ift.tt/mkzSv0';
$.getJSON(playListURL, function(data) {
var list_data="";
$.each(data.feed.entry, function(i, item) {
var feedTitle = item.title.$t;
var feedURL = item.link[1].href;
var fragments = feedURL.split("/");
var videoID = fragments[fragments.length - 2];
var vid = item.media$group.yt$videoid.$t;
var url = videoURL + videoID;
var vidtitle = item.title.$t;
var thumb = "http://ift.tt/snsXwF"+ videoID +"/default.jpg";
list_data += '
<img alt="'+ feedTitle+'" src="'+ thumb +'"' + ' - ' + vidtitle + '
';
});
$(list_data).appendTo(".cont");
});
}
//
$( document ).ready(function() {
LoadVids(1); // call on load more click
});
});//
</script>
</head>
<body>
</body>
</html>
Here description and views is not getting their and video is redirecting to YouTube but i wanna allow the user to see the videos in my website only please suggest
Aucun commentaire:
Enregistrer un commentaire