Remove room ID after quit

This commit is contained in:
giongto35 2019-05-17 03:29:21 +08:00
parent 7071d45c39
commit c260d46aeb
2 changed files with 3 additions and 2 deletions

View file

@ -140,6 +140,9 @@ function doButtonUp(name) {
if (name === "quit") {
stopInputTimer();
showMenuScreen();
// TODO: Stop game
screen = document.getElementById("game-screen");
$("#room-txt").val("");
}
}

2
static/js/ws.js vendored
View file

@ -187,8 +187,6 @@ function startWebRTC() {
// TODO: Fix curPacketID
conn.send(JSON.stringify({"id": "initwebrtc", "data": session, "packet_id": curPacketID}));
} else {
//pc.addIceCandidate(event.candidate).catch(e => {
//log("Failure during addIceCandidate(): " + e.name);});
conn.send(JSON.stringify({"id": "icecandidate", "data": JSON.stringify(event.candidate)}));
console.log(JSON.stringify(event.candidate));
}