Добавлен лоадер обработки после сканирования (спиннер + 'Обработка видео...')

This commit is contained in:
apuc committed 2026-09-18 11:59:56 +03:00
1 parent 64e6e6f30f
commit 3b2448a360
3 files changed
+52 -1

No files matched your search

+5
View File
@@ -123,6 +123,7 @@
}
setProgress(100, 'Готово!');
document.getElementById('scanLoader').classList.remove('open');
setTimeout(function () {
progressContainer.style.display = 'none';
renderResult(data);
@@ -151,6 +152,7 @@
}
function showError(msg, videoUrl) {
document.getElementById('scanLoader').classList.remove('open');
progressContainer.style.display = 'none';
resultCard.style.display = 'block';
var html = '<div class="med-error-box"><strong>Ошибка:</strong> ' + escapeHtml(msg) + '</div>';
@@ -164,6 +166,7 @@
}
function renderResult(data) {
document.getElementById('scanLoader').classList.remove('open');
resultCard.style.display = 'block';
var html = '';
@@ -329,6 +332,8 @@
stopCamera();
scanActive = false;
scanBtn.disabled = false;
// Показываем лоадер обработки
document.getElementById('scanLoader').classList.add('open');
sendVideo(blob, 'scan.' + ext);
};
mediaRecorder.start();