Files
aletheia/frontend/node_modules/html5-qrcode/es2015/utils.js
bigtux 20a26affaa 📚 Documentação inicial do ALETHEIA
- MANUAL-PRODUTO.md: Manual do usuário final
- MANUAL-VENDAS.md: Estratégia comercial e vendas
- MANUAL-TECNICO.md: Infraestrutura e deploy
- README.md: Visão geral do projeto
2026-02-10 15:08:15 -03:00

30 lines
1.1 KiB
JavaScript

export class VideoConstraintsUtil {
static isMediaStreamConstraintsValid(videoConstraints, logger) {
if (typeof videoConstraints !== "object") {
const typeofVideoConstraints = typeof videoConstraints;
logger.logError("videoConstraints should be of type object, the "
+ `object passed is of type ${typeofVideoConstraints}.`, true);
return false;
}
const bannedKeys = [
"autoGainControl",
"channelCount",
"echoCancellation",
"latency",
"noiseSuppression",
"sampleRate",
"sampleSize",
"volume"
];
const bannedkeysSet = new Set(bannedKeys);
const keysInVideoConstraints = Object.keys(videoConstraints);
for (const key of keysInVideoConstraints) {
if (bannedkeysSet.has(key)) {
logger.logError(`${key} is not supported videoConstaints.`, true);
return false;
}
}
return true;
}
}
//# sourceMappingURL=utils.js.map