From 0d2ca28ae1e53f825edcd843b56daf9ab52727fe Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Fri, 16 Jul 2021 00:11:38 +0200 Subject: [PATCH] Close camera on disconnect. --- static/galene.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/galene.js b/static/galene.js index 72505e4..2c8e356 100644 --- a/static/galene.js +++ b/static/galene.js @@ -333,6 +333,7 @@ function gotConnected() { * @param {string} reason */ function gotClose(code, reason) { + closeUpMedia(); setConnected(false); if(code != 1000) { console.warn('Socket close', code, reason); @@ -1461,7 +1462,7 @@ function stopStream(s) { * closeUpMedia closes all up connections with the given label. If label * is null, it closes all up connections. * - * @param {string} label + * @param {string} [label] */ function closeUpMedia(label) { for(let id in serverConnection.up) {