Fix being kicked when removing leader

This commit is contained in:
calzoneman 2013-11-14 22:23:33 -06:00
parent 8eef96770f
commit 22e8e10680
3 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,6 @@
Thu Nov 14 22:22 2013 CDT
* www/assets/js/callbacks.js: Fix being kicked when leader is removed
Thu Nov 14 19:49 2013 CDT
* www/assets/js/callbacks.js: Fix AFK users on join and profile
updates.

View File

@ -705,8 +705,13 @@ Callbacks = {
addUserDropdown($(this));
}
});
if (name === "")
if (name === "") {
CLIENT.leader = false;
if(LEADTMR)
clearInterval(LEADTMR);
LEADTMR = false;
return;
}
var user = findUserlistItem(name);
if (user) {
user.data("leader", true);

View File

@ -1426,6 +1426,9 @@ function parseMediaLink(url) {
}
function sendVideoUpdate() {
if (!CLIENT.leader) {
return;
}
PLAYER.getTime(function (seconds) {
socket.emit("mediaUpdate", {
id: PLAYER.videoId,