Fix being kicked when removing leader
This commit is contained in:
parent
8eef96770f
commit
22e8e10680
|
@ -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.
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue