This commit is contained in:
Kasper Rynning-Tønnesen
2018-06-04 22:27:02 +02:00
parent 32d0d4f193
commit 8bc5d1821e
2 changed files with 7 additions and 1 deletions

View File

@@ -79,6 +79,7 @@ module.exports = function() {
});
socket.on('chromecast', function(msg) {
console.log("chromecast event", msg);
try {
if(typeof(msg) == "object" && msg.hasOwnProperty("guid") &&
msg.hasOwnProperty("socket_id") && msg.hasOwnProperty("channel") && typeof(msg.guid) == "string" &&
@@ -99,6 +100,7 @@ module.exports = function() {
coll = coll.substring(0, coll.indexOf("?"));
}
in_list = true;
console.log("chromecast list", coll);
chromecast_object = true;
socket.join(coll);
}
@@ -110,6 +112,7 @@ module.exports = function() {
});
socket.on("get_id", function() {
console.log("gotten request from mobile", Functions.getSession(socket));
socket.emit("id_chromecast", Functions.getSession(socket));
});