1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 16:45:58 +01:00

Add missing semicolons.

This commit is contained in:
Antonin Décimo 2020-09-14 15:48:17 +02:00 committed by Juliusz Chroboczek
parent c6d065aa20
commit 5ad4df5a45
2 changed files with 24 additions and 25 deletions

View file

@ -10,7 +10,7 @@ document.getElementById('groupform').onsubmit = function(e) {
let group = document.getElementById('group').value.trim(); let group = document.getElementById('group').value.trim();
if(group !== '') if(group !== '')
location.href = '/group/' + group; location.href = '/group/' + group;
} };
async function listPublicGroups() { async function listPublicGroups() {
let div = document.getElementById('public-groups'); let div = document.getElementById('public-groups');

View file

@ -286,7 +286,7 @@ ServerConnection.prototype.connect = function(url) {
break; break;
case 'usermessage': case 'usermessage':
if(sc.onusermessage) if(sc.onusermessage)
sc.onusermessage.call(sc, m.kind, m.value) sc.onusermessage.call(sc, m.kind, m.value);
break; break;
default: default:
console.warn('Unexpected server message', m.type); console.warn('Unexpected server message', m.type);
@ -308,7 +308,7 @@ ServerConnection.prototype.login = function(username, password) {
id: this.id, id: this.id,
username: username, username: username,
password: password, password: password,
}) });
} }
/** /**
@ -320,7 +320,7 @@ ServerConnection.prototype.join = function(group) {
this.send({ this.send({
type: 'join', type: 'join',
group: group, group: group,
}) });
} }
/** /**
@ -350,7 +350,7 @@ ServerConnection.prototype.request = function(what) {
type: 'request', type: 'request',
request: request, request: request,
}); });
} };
/** /**
* newUpStream requests the creation of a new up stream. * newUpStream requests the creation of a new up stream.
@ -378,7 +378,7 @@ ServerConnection.prototype.newUpStream = function(id) {
pc.onnegotiationneeded = async e => { pc.onnegotiationneeded = async e => {
await c.negotiate(); await c.negotiate();
} };
pc.onicecandidate = e => { pc.onicecandidate = e => {
if(!e.candidate) if(!e.candidate)
@ -394,7 +394,7 @@ ServerConnection.prototype.newUpStream = function(id) {
c.onstatus.call(c, pc.iceConnectionState); c.onstatus.call(c, pc.iceConnectionState);
if(pc.iceConnectionState === 'failed') if(pc.iceConnectionState === 'failed')
c.restartIce(); c.restartIce();
} };
pc.ontrack = console.error; pc.ontrack = console.error;
@ -417,7 +417,7 @@ ServerConnection.prototype.chat = function(username, kind, message) {
kind: kind, kind: kind,
value: message, value: message,
}); });
} };
/** /**
* groupAction sends a request to act on the current group. * groupAction sends a request to act on the current group.
@ -430,7 +430,7 @@ ServerConnection.prototype.groupAction = function(kind) {
type: 'groupaction', type: 'groupaction',
kind: kind, kind: kind,
}); });
} };
/** /**
* userAction sends a request to act on a user. * userAction sends a request to act on a user.
@ -446,7 +446,7 @@ ServerConnection.prototype.userAction = function(kind, id, message) {
id: id, id: id,
value: message, value: message,
}); });
} };
/** /**
* Called when we receive an offer from the server. Don't call this. * Called when we receive an offer from the server. Don't call this.
@ -464,7 +464,7 @@ ServerConnection.prototype.gotOffer = async function(id, labels, offer, renegoti
// SDP is rather inflexible as to what can be renegotiated. // SDP is rather inflexible as to what can be renegotiated.
// Unless the server indicates that this is a renegotiation with // Unless the server indicates that this is a renegotiation with
// all parameters unchanged, tear down the existing connection. // all parameters unchanged, tear down the existing connection.
delete(sc.down[id]) delete(sc.down[id]);
c.close(false); c.close(false);
c = null; c = null;
} }
@ -493,7 +493,7 @@ ServerConnection.prototype.gotOffer = async function(id, labels, offer, renegoti
id: id, id: id,
}); });
} }
} };
c.pc.ontrack = function(e) { c.pc.ontrack = function(e) {
let label = e.transceiver && c.labelsByMid[e.transceiver.mid]; let label = e.transceiver && c.labelsByMid[e.transceiver.mid];
@ -537,7 +537,7 @@ ServerConnection.prototype.gotOffer = async function(id, labels, offer, renegoti
}); });
if(c.onnegotiationcompleted) if(c.onnegotiationcompleted)
c.onnegotiationcompleted.call(c); c.onnegotiationcompleted.call(c);
} };
/** /**
* Called when we receive a stream label from the server. Don't call this. * Called when we receive a stream label from the server. Don't call this.
@ -553,7 +553,7 @@ ServerConnection.prototype.gotLabel = function(id, label) {
c.label = label; c.label = label;
if(c.onlabel) if(c.onlabel)
c.onlabel.call(c, label); c.onlabel.call(c, label);
} };
/** /**
* Called when we receive an answer from the server. Don't call this. * Called when we receive an answer from the server. Don't call this.
@ -576,7 +576,7 @@ ServerConnection.prototype.gotAnswer = async function(id, answer) {
await c.flushIceCandidates(); await c.flushIceCandidates();
if(c.onnegotiationcompleted) if(c.onnegotiationcompleted)
c.onnegotiationcompleted.call(c); c.onnegotiationcompleted.call(c);
} };
/** /**
* Called when we receive a renegotiation request from the server. Don't * Called when we receive a renegotiation request from the server. Don't
@ -590,7 +590,7 @@ ServerConnection.prototype.gotRenegotiate = async function(id) {
if(!c) if(!c)
throw new Error('unknown up stream'); throw new Error('unknown up stream');
c.restartIce(); c.restartIce();
} };
/** /**
* Called when we receive a close request from the server. Don't call this. * Called when we receive a close request from the server. Don't call this.
@ -605,7 +605,7 @@ ServerConnection.prototype.gotClose = function(id) {
c.close(false); c.close(false);
if(c.onclose) if(c.onclose)
c.onclose.call(c); c.onclose.call(c);
} };
/** /**
* Called when we receive an abort message from the server. Don't call this. * Called when we receive an abort message from the server. Don't call this.
@ -618,7 +618,7 @@ ServerConnection.prototype.gotAbort = function(id) {
throw new Error('unknown up stream'); throw new Error('unknown up stream');
if(c.onabort) if(c.onabort)
c.onabort.call(c); c.onabort.call(c);
} };
/** /**
* Called when we receive an ICE candidate from the server. Don't call this. * Called when we receive an ICE candidate from the server. Don't call this.
@ -637,7 +637,7 @@ ServerConnection.prototype.gotICE = async function(id, candidate) {
await c.pc.addIceCandidate(candidate).catch(console.warn); await c.pc.addIceCandidate(candidate).catch(console.warn);
else else
c.iceCandidates.push(candidate); c.iceCandidates.push(candidate);
} };
/** /**
* Stream encapsulates a MediaStream, a set of tracks. * Stream encapsulates a MediaStream, a set of tracks.
@ -840,7 +840,7 @@ Stream.prototype.flushIceCandidates = async function () {
}); });
this.iceCandidates = []; this.iceCandidates = [];
return await Promise.all(promises); return await Promise.all(promises);
} };
/** /**
* negotiate negotiates or renegotiates an up stream. It is called * negotiate negotiates or renegotiates an up stream. It is called
@ -881,7 +881,7 @@ Stream.prototype.negotiate = async function (restartIce) {
offer: offer, offer: offer,
}); });
this.renegotiate = true; this.renegotiate = true;
} };
/** /**
* restartIce causes an ICE restart on an up stream. It is called * restartIce causes an ICE restart on an up stream. It is called
@ -905,7 +905,7 @@ Stream.prototype.restartIce = function () {
// negotiate is async, but this returns immediately. // negotiate is async, but this returns immediately.
c.negotiate(true); c.negotiate(true);
} };
/** /**
* updateStats is called periodically, if requested by setStatsInterval, * updateStats is called periodically, if requested by setStatsInterval,
@ -982,7 +982,7 @@ Stream.prototype.updateStats = async function() {
if(c.onstats) if(c.onstats)
c.onstats.call(c, c.stats); c.onstats.call(c, c.stats);
} };
/** /**
* setStatsInterval sets the interval in milliseconds at which the onstats * setStatsInterval sets the interval in milliseconds at which the onstats
@ -1003,5 +1003,4 @@ Stream.prototype.setStatsInterval = function(ms) {
c.statsHandler = setInterval(() => { c.statsHandler = setInterval(() => {
c.updateStats(); c.updateStats();
}, ms); }, ms);
} };