apolinario commited on
Commit
77deeb4
·
1 Parent(s): c71e540

Hoist inputRecorders/inputRecordHandlers consts to module top (TDZ crash)

Browse files
Files changed (1) hide show
  1. index.html +3 -3
index.html CHANGED
@@ -1444,6 +1444,8 @@ import { oauthLoginUrl, oauthHandleRedirectIfPresent } from "https://esm.sh/@hug
1444
 
1445
  const OMNIVOICE_BASE = "https://k2-fsa-omnivoice.hf.space/gradio_api";
1446
  const COLORS = ["#7c3aed","#ec4899","#f59e0b","#22c55e","#3b82f6","#ef4444","#06b6d4","#8b5cf6"];
 
 
1447
  let accessToken = null;
1448
  let userInfo = null;
1449
  let isPro = false;
@@ -2803,9 +2805,7 @@ function wireUploadArea(areaId, inputId, labelId, onFile) {
2803
  }
2804
 
2805
  // ── Per-input audio recording (mic alternative on every audio upload) ──
2806
-
2807
- const inputRecorders = {}; // prefix -> { mediaRecorder, stream, chunks, timerInterval, startTime }
2808
- const inputRecordHandlers = {}; // prefix -> (file) => void
2809
 
2810
  window.setInputMode = function(prefix, mode) {
2811
  document.querySelectorAll(`.audio-source-tabs[data-input-prefix="${prefix}"] .audio-source-tab`)
 
1444
 
1445
  const OMNIVOICE_BASE = "https://k2-fsa-omnivoice.hf.space/gradio_api";
1446
  const COLORS = ["#7c3aed","#ec4899","#f59e0b","#22c55e","#3b82f6","#ef4444","#06b6d4","#8b5cf6"];
1447
+ const inputRecorders = {}; // prefix -> { mediaRecorder, stream, chunks, timerInterval, startTime }
1448
+ const inputRecordHandlers = {}; // prefix -> (file) => void
1449
  let accessToken = null;
1450
  let userInfo = null;
1451
  let isPro = false;
 
2805
  }
2806
 
2807
  // ── Per-input audio recording (mic alternative on every audio upload) ──
2808
+ // (state vars hoisted to top of module — see top of script)
 
 
2809
 
2810
  window.setInputMode = function(prefix, mode) {
2811
  document.querySelectorAll(`.audio-source-tabs[data-input-prefix="${prefix}"] .audio-source-tab`)