mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Added some debuglogs for hostcontroller
This commit is contained in:
@@ -230,10 +230,12 @@ function setup_playlist_listener(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setup_host_initialization(){
|
function setup_host_initialization(){
|
||||||
|
Helper.log("Setting up host initialization listener");
|
||||||
socket.on("id", Hostcontroller.host_listener);
|
socket.on("id", Hostcontroller.host_listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_host_listener(id){
|
function setup_host_listener(id){
|
||||||
|
Helper.log("Setting up host action listener");
|
||||||
socket.on(id, Hostcontroller.host_on_action);
|
socket.on(id, Hostcontroller.host_on_action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ var Hostcontroller = {
|
|||||||
old_id: null,
|
old_id: null,
|
||||||
|
|
||||||
host_listener: function(id) {
|
host_listener: function(id) {
|
||||||
|
Helper.log("Host-listener triggered");
|
||||||
|
Helper.log("Host-listener id:", id);
|
||||||
if(Hostcontroller.old_id === null) Hostcontroller.old_id = id;
|
if(Hostcontroller.old_id === null) Hostcontroller.old_id = id;
|
||||||
else {
|
else {
|
||||||
socket.removeAllListeners(id);
|
socket.removeAllListeners(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user