1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-26 10:35:59 +01:00

Type global variables in sfu.js.

This commit is contained in:
Juliusz Chroboczek 2020-08-24 22:37:48 +02:00
parent fba0dded84
commit 6dc1d72438

View file

@ -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) {
// 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() {
`repeat(${columns}, 1fr)`; `repeat(${columns}, 1fr)`;
} }
/** @type{Object.<string,string>} */
let users = {}; let users = {};
/** /**
@ -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) {
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) {