var player;

function onYouTubeIframeAPIReady() {
  player = new YT.Player('player', {
    height: '390',
    width: '640',
    playerVars: {'rel': 0},
    events: {
      'onReady': onPlayerReady,
      'onStateChange': onPlayerStateChange
    }
  });
}

function onPlayerReady(event) {
  loadVideo();
}

function onPlayerStateChange(event) {
  if (event.data == YT.PlayerState.ENDED) {
    loadVideo();
  }
}

var parseVideo = function(xml) {
  // Or 'content[yt\\:format=5]'
  return $(xml).find('content').map(function() {
    if ($(this).attr('yt:format') == 5) {
      return $(this).attr('url');
    }
  });
};

var shuffle = function(array) {
  // Fisher–Yates Shuffle
  // http://bost.ocks.org/mike/shuffle/
  var m = array.length, t, i;
  while (m) {
    i = Math.floor(Math.random() * m--);
    t = array[m];
    array[m] = array[i];
    array[i] = t;
  }
  return array;
};

var loadVideo = function() {
  $.ajax({
    url: 'http://gdata.youtube.com/feeds/api/users/kzlivetune/uploads',
    dataType: 'xml',
    success: function(data) {
      var url = shuffle(parseVideo(data))[0];
      console.log(parseVideo(data));
      console.log(url);
      player.loadVideoByUrl(url);
    },
    error: function(xhr) {
      console.log('Error: ' + xhr.status + ' ' + xhr.statusText);
      setTimeout(function() {
        console.log('Retry...');
        loadVideo();
      }, 5000);
    }
  });
};

@@ -1,12 +1,189 @@
+var users = %5B%0A  %7Busername: %2208yakari%22%7D,%0A  %7Busername: %22fuwacina%22%7D,%0A  %7Busername: %22hachiojip%22%7D,%0A  %7Busername: %22kzlivetune%22%7D,%0A  %7Busername: %22MitchieMTV%22%7D,%0A  %7Busername: %22tkomine%22%7D%0A%5D;%0A%0A
 var player;%0A
@@ -1061,25 +1061,26 @@
 %7D;%0A%0Avar 
+up
 load
-Video
+sUrl
  = funct
@@ -1087,31 +1087,28 @@
 ion(
-) %7B%0A  $.ajax(%7B%0A    url:
+username) %7B%0A  return
  'ht
@@ -1150,27 +1150,143 @@
 ers/
-kzlivetune/uploads'
+' + username + '/uploads'%0A%7D;%0A%0Avar loadVideo = function() %7B%0A  user = shuffle(users)%5B0%5D;%0A  $.ajax(%7B%0A    url: uploadsUrl(user%5B'username'%5D)
 ,%0A  

Add users list