Skip to content

Commit

Permalink
Close camera on disconnect.
Browse files Browse the repository at this point in the history
  • Loading branch information
jech committed Jul 15, 2021
1 parent c540cad commit 0d2ca28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion static/galene.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0d2ca28

Please sign in to comment.