Commit 6dc1d724 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Type global variables in sfu.js.

parent fba0dded
...@@ -143,6 +143,7 @@ function setButtonsVisibility() { ...@@ -143,6 +143,7 @@ function setButtonsVisibility() {
setVisibility('mediaoptions', permissions.present); setVisibility('mediaoptions', permissions.present);
} }
/** @type {boolean} */
let localMute = false; let localMute = false;
function toggleLocalMute() { function toggleLocalMute() {
...@@ -237,6 +238,7 @@ function addSelectOption(select, label, value) { ...@@ -237,6 +238,7 @@ function addSelectOption(select, label, value) {
// media names might not be available before we call getDisplayMedia. So // media names might not be available before we call getDisplayMedia. So
// we call this lazily. // we call this lazily.
/** @type {boolean} */
let mediaChoicesDone = false; let mediaChoicesDone = false;
async function setMediaChoices() { async function setMediaChoices() {
...@@ -546,6 +548,7 @@ function resizePeers() { ...@@ -546,6 +548,7 @@ function resizePeers() {
`repeat(${columns}, 1fr)`; `repeat(${columns}, 1fr)`;
} }
/** @type{Object.<string,string>} */
let users = {}; let users = {};
/** /**
...@@ -669,6 +672,13 @@ function formatLines(lines) { ...@@ -669,6 +672,13 @@ function formatLines(lines) {
return elt; return elt;
} }
/**
* @typedef {Object} lastMessage
* @property {string} [nick]
* @property {string} [peerId]
*/
/** @type {lastMessage} */
let lastMessage = {}; let lastMessage = {};
function addToChatbox(peerId, nick, kind, message){ function addToChatbox(peerId, nick, kind, message){
...@@ -874,6 +884,7 @@ function chatResizer(e) { ...@@ -874,6 +884,7 @@ function chatResizer(e) {
document.getElementById('resizer').addEventListener('mousedown', chatResizer, false); document.getElementById('resizer').addEventListener('mousedown', chatResizer, false);
/** @type {number} */
let errorTimeout = null; let errorTimeout = null;
function setErrorTimeout(ms) { function setErrorTimeout(ms) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment