Skip to content

Commit 4e0d30a

Browse files
committed
add ping interval from datalad page
1 parent 442d6f8 commit 4e0d30a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ohbm2020/room.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,16 @@
7474
let wss = new ReconnectingWebSocket("wss://dev1.soichi.us/ohbm2020/");
7575
// let wss = new WebSocket("wss://dev1.soichi.us/ohbm2020/");
7676
wss.onopen = () => {
77+
wss.send(JSON.stringify({action: "jit", id, cid}));
78+
setInterval(()=>{
7779
wss.send(JSON.stringify({action: "jit", id, cid}));
78-
}
80+
}, 1000*30);
81+
};
82+
7983
window.addEventListener("beforeunload", function(evt) {
8084
wss.send(JSON.stringify({action: "jitclose", id, cid}));
8185
});
8286

83-
8487
function feedbackAnimationStep(timer, elem) {
8588
const dx = 500 * Math.random() - 250;
8689
const x = parseInt("0" + elem.style.left);

0 commit comments

Comments
 (0)