JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<thead>
<tr>
<th>Title</th>
<th>Duration</th>
</tr>
</thead>
<tbody id="videos">
</tbody>
</table>
CSS
td,th {
border: 1px solid #aaa;
}
JavaScript
$.ajax({
url : 'https://gdata.youtube.com/feeds/api/videos?q=tedtalksdirector&fields=entry%28title,media:group%28media:description,media:player,yt:duration%29,gd:rating%29',
//'https://gdata.youtube.com/feeds/api/playlists/UUAuUUnT6oDeKwE6v1NGQxug?v=2&orderby=duration',
// 'https://gdata.youtube.com/feeds/api/users/tedtalksdirector/uploads',
dataType : "xml",
success : function(xml) {
$(xml).find("entry").each(function(){
var title = $(this).find("title").text();
var duration = $(this).find("yt\\:duration").attr("seconds");
var minutes = Math.floor(duration / 60);
var seconds = (duration % 60);
if( seconds < 10 ) seconds = "0"+seconds;
var newRow = $("<tr></tr>");
newRow.append("<td>"+title+"</td>");
newRow.append("<td class='dur'>"+duration+" seconds</td>");
$("tbody#videos").append(newRow);
});
}
});