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 Thu Nov 14 19:49 2013 CDT
* www/assets/js/callbacks.js: Fix AFK users on join and profile * www/assets/js/callbacks.js: Fix AFK users on join and profile
updates. updates.

View file

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

View file

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