Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How To get or Retrive Youtube specfic playlist videos thumbnails in html please suggest me the whole code or even with an example i am new to web development please thanks in advance
Posted
Comments
CHill60 22-Dec-14 6:48am    
Have you done any research at all? What have you tried and where are you stuck?
Kornfeld Eliyahu Peter 22-Dec-14 7:56am    
OP already posted a list of questions here - doesn't that count as research? :-)

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>

<script type='text/javascript' src='http://code.jquery.com/jquery-1.8.3.js'></script>




<link rel="stylesheet" type="text/css" href="/css/result-light.css">

<style type='text/css'>

</style>



<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
function LoadVids(startindex){
if (typeof startindex === "undefined" || startindex===null) startindex = 1;
var maxresults = 125;

var playListURL = 'http://gdata.youtube.com/feeds/api/playlists/PL3B8939169E1256C0?orderby=published&v=2&alt=json&&start-index=' + startindex + '&max-results=' + maxresults;
var videoURL= 'http://www.youtube.com/watch?v=';
$.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://img.youtube.com/vi/"+ 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>
     
    Share this answer
     
    v2
    As per Kornfeld's answer to your previous question
    [^]

    We don't supply code on this forum, we help with "Quick Answers" to specific problems. Try it for yourself then come back with a specific question if you hit a problem
     
    Share this answer
     
    Comments
    Krishna Chaitanya Kollu 22-Dec-14 20:55pm    
    Problem resolved
    <!DOCTYPE html>
    <html>
    <head>


    <script type='text/javascript'>//<![CDATA[
    $(window).load(function(){
    var playListURL = 'http://gdata.youtube.com/feeds/api/playlists/r5fTmHNiLCvrTcr2eaGVYM7NO1uR5MBp?v=2&alt=json&callback=?';
    var videoURL= 'http://www.youtube.com/watch?v=';
    $.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 url = videoURL + videoID;
    var thumb = "http://img.youtube.com/vi/"+ videoID +"/default.jpg";
    list_data += '<li><img alt="'+ feedTitle+'" src="'+ thumb +'"</li>';
    });
    $(list_data).appendTo(".cont");
    });
    });//]]>

    </script>


    </head>
    <body>
    <ul class="cont">
    </ul>

    </body>


    </html>

    This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

      Print Answers RSS
    Top Experts
    Last 24hrsThis month


    CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900