title: Return video duration from Youtube API using JSON
body: <p>I'm trying to retrieve and print the duration of each video that is being returned via the Youtube API using JSON. The duration needs to be out putted like this:</p>
  
  <p>9:34min  and not in seconds</p>
  
  <p>But I can't figure out what to do next. I am currently using the following code:</p>
  
  <pre><code>function showMyVideos2(data) {
  var feed = data.feed;
  var entries = feed.entry || [];
  var html = ['&lt;ul class="videos"&gt;'];
  for (var i = 0; i &lt; entries.length; i++) {
  var entry = entries[i];
  var title = entry.title.$t.substr(0, 20);
  var thumbnailUrl = entries[i].media$group.media$thumbnail[0].url;
  var playerUrl = entries[i].media$group.media$content[0].url;
  html.push('&lt;li&gt;',
            '&lt;a href="', playerUrl, '" rel="vidbox 686 315"&gt;&lt;img src="', 
            thumbnailUrl, '" width="130" height="97"/&gt;&lt;/a&gt;', '&lt;span class="titlec"&gt;&lt;a      href="', playerUrl, '" rel="vidbox 686 315"&gt;', title, '... &lt;/a&gt;&lt;/span&gt;&lt;/li&gt;');
  }
  html.push('&lt;/ul&gt;&lt;br style="clear: left;"/&gt;');
  document.getElementById('videos2').innerHTML = html.join('');
  if (entries.length &gt; 0) {
  loadVideo(entries[0].media$group.media$content[0].url, false);
  }
  }
  </code></pre>