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:
parent
d2f7010141
commit
056ffcd2cf
2 changed files with 36 additions and 36 deletions
|
@ -147,7 +147,7 @@ function delSetting(key) {
|
||||||
if(!(key in s))
|
if(!(key in s))
|
||||||
return;
|
return;
|
||||||
delete(s[key]);
|
delete(s[key]);
|
||||||
storeSettings(s)
|
storeSettings(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -316,13 +316,13 @@ function gotDownStream(c) {
|
||||||
c.onerror = function(e) {
|
c.onerror = function(e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
displayError(e);
|
displayError(e);
|
||||||
}
|
};
|
||||||
c.ondowntrack = function(track, transceiver, label, stream) {
|
c.ondowntrack = function(track, transceiver, label, stream) {
|
||||||
setMedia(c, false);
|
setMedia(c, false);
|
||||||
}
|
};
|
||||||
c.onstatus = function(status) {
|
c.onstatus = function(status) {
|
||||||
setMediaStatus(c);
|
setMediaStatus(c);
|
||||||
}
|
};
|
||||||
c.onstats = gotDownStats;
|
c.onstats = gotDownStats;
|
||||||
if(getSettings().activityDetection)
|
if(getSettings().activityDetection)
|
||||||
c.setStatsInterval(activityDetectionInterval);
|
c.setStatsInterval(activityDetectionInterval);
|
||||||
|
@ -455,14 +455,14 @@ getInputElement('blackboardbox').onchange = function(e) {
|
||||||
throw new Error('Unexpected type for this');
|
throw new Error('Unexpected type for this');
|
||||||
updateSettings({blackboardMode: this.checked});
|
updateSettings({blackboardMode: this.checked});
|
||||||
changePresentation();
|
changePresentation();
|
||||||
}
|
};
|
||||||
|
|
||||||
document.getElementById('mutebutton').onclick = function(e) {
|
document.getElementById('mutebutton').onclick = function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let localMute = getSettings().localMute;
|
let localMute = getSettings().localMute;
|
||||||
localMute = !localMute;
|
localMute = !localMute;
|
||||||
setLocalMute(localMute, true);
|
setLocalMute(localMute, true);
|
||||||
}
|
};
|
||||||
|
|
||||||
document.getElementById('sharebutton').onclick = function(e) {
|
document.getElementById('sharebutton').onclick = function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -473,13 +473,13 @@ document.getElementById('unsharebutton').onclick = function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
delUpMediaKind('screenshare');
|
delUpMediaKind('screenshare');
|
||||||
resizePeers();
|
resizePeers();
|
||||||
}
|
};
|
||||||
|
|
||||||
document.getElementById('stopvideobutton').onclick = function(e) {
|
document.getElementById('stopvideobutton').onclick = function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
delUpMediaKind('video');
|
delUpMediaKind('video');
|
||||||
resizePeers();
|
resizePeers();
|
||||||
}
|
};
|
||||||
|
|
||||||
/** @returns {number} */
|
/** @returns {number} */
|
||||||
function getMaxVideoThroughput() {
|
function getMaxVideoThroughput() {
|
||||||
|
@ -508,7 +508,7 @@ getSelectElement('sendselect').onchange = async function(e) {
|
||||||
let c = serverConnection.up[id];
|
let c = serverConnection.up[id];
|
||||||
await setMaxVideoThroughput(c, t);
|
await setMaxVideoThroughput(c, t);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
getSelectElement('requestselect').onchange = function(e) {
|
getSelectElement('requestselect').onchange = function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -535,7 +535,7 @@ getInputElement('activitybox').onchange = function(e) {
|
||||||
setActive(c, false);
|
setActive(c, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
getInputElement('fileinput').onchange = function(e) {
|
getInputElement('fileinput').onchange = function(e) {
|
||||||
if(!(this instanceof HTMLInputElement))
|
if(!(this instanceof HTMLInputElement))
|
||||||
|
@ -550,7 +550,7 @@ getInputElement('fileinput').onchange = function(e) {
|
||||||
}
|
}
|
||||||
input.value = '';
|
input.value = '';
|
||||||
closeNav();
|
closeNav();
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @this {Stream}
|
* @this {Stream}
|
||||||
|
@ -735,18 +735,18 @@ function newUpStream(id) {
|
||||||
let c = serverConnection.newUpStream(id);
|
let c = serverConnection.newUpStream(id);
|
||||||
c.onstatus = function(status) {
|
c.onstatus = function(status) {
|
||||||
setMediaStatus(c);
|
setMediaStatus(c);
|
||||||
}
|
};
|
||||||
c.onerror = function(e) {
|
c.onerror = function(e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
displayError(e);
|
displayError(e);
|
||||||
delUpMedia(c);
|
delUpMedia(c);
|
||||||
}
|
};
|
||||||
c.onabort = function() {
|
c.onabort = function() {
|
||||||
delUpMedia(c);
|
delUpMedia(c);
|
||||||
}
|
};
|
||||||
c.onnegotiationcompleted = function() {
|
c.onnegotiationcompleted = function() {
|
||||||
setMaxVideoThroughput(c, getMaxVideoThroughput())
|
setMaxVideoThroughput(c, getMaxVideoThroughput());
|
||||||
}
|
};
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -833,7 +833,7 @@ async function addLocalMedia(id) {
|
||||||
c.stream = stream;
|
c.stream = stream;
|
||||||
let mute = getSettings().localMute;
|
let mute = getSettings().localMute;
|
||||||
stream.getTracks().forEach(t => {
|
stream.getTracks().forEach(t => {
|
||||||
c.labels[t.id] = t.kind
|
c.labels[t.id] = t.kind;
|
||||||
if(t.kind == 'audio') {
|
if(t.kind == 'audio') {
|
||||||
if(mute)
|
if(mute)
|
||||||
t.enabled = false;
|
t.enabled = false;
|
||||||
|
@ -888,7 +888,7 @@ async function addShareMedia() {
|
||||||
c.onstats = gotUpStats;
|
c.onstats = gotUpStats;
|
||||||
c.setStatsInterval(2000);
|
c.setStatsInterval(2000);
|
||||||
await setMedia(c, true);
|
await setMedia(c, true);
|
||||||
setButtonsVisibility()
|
setButtonsVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -937,7 +937,7 @@ async function addFileMedia(file) {
|
||||||
sender = s;
|
sender = s;
|
||||||
});
|
});
|
||||||
if(sender) {
|
if(sender) {
|
||||||
c.pc.removeTrack(sender)
|
c.pc.removeTrack(sender);
|
||||||
} else {
|
} else {
|
||||||
console.warn('Removing unknown track');
|
console.warn('Removing unknown track');
|
||||||
}
|
}
|
||||||
|
@ -950,7 +950,7 @@ async function addFileMedia(file) {
|
||||||
};
|
};
|
||||||
await setMedia(c, true, false, video);
|
await setMedia(c, true, false, video);
|
||||||
c.userdata.play = true;
|
c.userdata.play = true;
|
||||||
setButtonsVisibility()
|
setButtonsVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -979,7 +979,7 @@ function delUpMedia(c) {
|
||||||
}
|
}
|
||||||
c.close();
|
c.close();
|
||||||
delete(serverConnection.up[c.id]);
|
delete(serverConnection.up[c.id]);
|
||||||
setButtonsVisibility()
|
setButtonsVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1369,8 +1369,8 @@ let users = {};
|
||||||
* @param{string} b
|
* @param{string} b
|
||||||
*/
|
*/
|
||||||
function stringCompare(a, b) {
|
function stringCompare(a, b) {
|
||||||
let la = a.toLowerCase()
|
let la = a.toLowerCase();
|
||||||
let lb = b.toLowerCase()
|
let lb = b.toLowerCase();
|
||||||
if(la < lb)
|
if(la < lb)
|
||||||
return -1;
|
return -1;
|
||||||
else if(la > lb)
|
else if(la > lb)
|
||||||
|
@ -1761,7 +1761,7 @@ function clearChat() {
|
||||||
*
|
*
|
||||||
* @type {Object.<string,command>}
|
* @type {Object.<string,command>}
|
||||||
*/
|
*/
|
||||||
let commands = {}
|
let commands = {};
|
||||||
|
|
||||||
function operatorPredicate() {
|
function operatorPredicate() {
|
||||||
if(serverConnection && serverConnection.permissions &&
|
if(serverConnection && serverConnection.permissions &&
|
||||||
|
@ -1818,7 +1818,7 @@ commands.set = {
|
||||||
let p = parseCommand(r);
|
let p = parseCommand(r);
|
||||||
let value;
|
let value;
|
||||||
if(p[1]) {
|
if(p[1]) {
|
||||||
value = JSON.parse(p[1])
|
value = JSON.parse(p[1]);
|
||||||
} else {
|
} else {
|
||||||
value = true;
|
value = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,7 +190,7 @@ function ServerConnection() {
|
||||||
ServerConnection.prototype.close = function() {
|
ServerConnection.prototype.close = function() {
|
||||||
this.socket && this.socket.close(1000, 'Close requested by client');
|
this.socket && this.socket.close(1000, 'Close requested by client');
|
||||||
this.socket = null;
|
this.socket = null;
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* send sends a message to the server.
|
* send sends a message to the server.
|
||||||
|
@ -202,7 +202,7 @@ ServerConnection.prototype.send = function(m) {
|
||||||
throw(new Error('Connection is not open'));
|
throw(new Error('Connection is not open'));
|
||||||
}
|
}
|
||||||
return this.socket.send(JSON.stringify(m));
|
return this.socket.send(JSON.stringify(m));
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* connect connects to the server.
|
* connect connects to the server.
|
||||||
|
@ -263,7 +263,7 @@ ServerConnection.prototype.connect = async function(url) {
|
||||||
sc.gotAnswer(m.id, m.sdp);
|
sc.gotAnswer(m.id, m.sdp);
|
||||||
break;
|
break;
|
||||||
case 'renegotiate':
|
case 'renegotiate':
|
||||||
sc.gotRenegotiate(m.id)
|
sc.gotRenegotiate(m.id);
|
||||||
break;
|
break;
|
||||||
case 'close':
|
case 'close':
|
||||||
sc.gotClose(m.id);
|
sc.gotClose(m.id);
|
||||||
|
@ -322,7 +322,7 @@ ServerConnection.prototype.connect = async function(url) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* join requests to join a group. The onjoined callback will be called
|
* join requests to join a group. The onjoined callback will be called
|
||||||
|
@ -340,7 +340,7 @@ ServerConnection.prototype.join = function(group, username, password) {
|
||||||
username: username,
|
username: username,
|
||||||
password: password,
|
password: password,
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* leave leaves a group. The onjoined callback will be called when we've
|
* leave leaves a group. The onjoined callback will be called when we've
|
||||||
|
@ -354,7 +354,7 @@ ServerConnection.prototype.leave = function(group) {
|
||||||
kind: 'leave',
|
kind: 'leave',
|
||||||
group: group,
|
group: group,
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* request sets the list of requested media types.
|
* request sets the list of requested media types.
|
||||||
|
@ -430,7 +430,7 @@ ServerConnection.prototype.newUpStream = function(id) {
|
||||||
pc.ontrack = console.error;
|
pc.ontrack = console.error;
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* chat sends a chat message to the server. The server will normally echo
|
* chat sends a chat message to the server. The server will normally echo
|
||||||
|
@ -734,7 +734,7 @@ function Stream(sc, id, pc, up) {
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
* @const
|
* @const
|
||||||
*/
|
*/
|
||||||
this.up = up
|
this.up = up;
|
||||||
/**
|
/**
|
||||||
* For up streams, one of "local" or "screenshare".
|
* For up streams, one of "local" or "screenshare".
|
||||||
*
|
*
|
||||||
|
@ -920,7 +920,7 @@ Stream.prototype.abort = function() {
|
||||||
type: 'abort',
|
type: 'abort',
|
||||||
id: c.id,
|
id: c.id,
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when we get a local ICE candidate. Don't call this.
|
* Called when we get a local ICE candidate. Don't call this.
|
||||||
|
@ -937,7 +937,7 @@ Stream.prototype.gotLocalIce = function(candidate) {
|
||||||
});
|
});
|
||||||
else
|
else
|
||||||
c.localIceCandidates.push(candidate);
|
c.localIceCandidates.push(candidate);
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* flushLocalIceCandidates flushes any buffered local ICE candidates.
|
* flushLocalIceCandidates flushes any buffered local ICE candidates.
|
||||||
|
@ -959,7 +959,7 @@ Stream.prototype.flushLocalIceCandidates = function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
c.localIceCandidates = [];
|
c.localIceCandidates = [];
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* flushRemoteIceCandidates flushes any buffered remote ICE candidates. It is
|
* flushRemoteIceCandidates flushes any buffered remote ICE candidates. It is
|
||||||
|
|
Loading…
Reference in a new issue