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