refactor: scope training ui module

This commit is contained in:
mARTin-B78 2026-09-04 12:23:03 +02:00
parent 302dbe1279
commit 2aca152fe8

View File

@ -1,5 +1,6 @@
// Rehearser training mode state, cue playback, and recording UI.
// Loaded after train comparison helpers and before rehearser.js; dependencies resolve at call time.
(function (root) {
// ── Train Mode ────────────────────────────────────────────────────────────
// State machine: idle → playing_cue → ready → recording → transcribing → done
@ -332,14 +333,25 @@ function exitTrainMode() {
}
window.TTVC=window.TTVC||{};
window.TTVC.rehearser=window.TTVC.rehearser||{};
Object.assign(window.TTVC.rehearser,{
root.trainState = trainState;
root.buildTrainSeq = buildTrainSeq;
root._trainSetState = _trainSetState;
root._trainPlayCueLines = _trainPlayCueLines;
root.trainGoTo = trainGoTo;
root._trainStopMic = _trainStopMic;
root._trainStartRecording = _trainStartRecording;
root._trainStopRecording = _trainStopRecording;
root._trainHideStage = _trainHideStage;
root.enterTrainMode = enterTrainMode;
root.exitTrainMode = exitTrainMode;
root.TTVC=root.TTVC||{};
root.TTVC.rehearser=root.TTVC.rehearser||{};
Object.assign(root.TTVC.rehearser,{
training:{
state:trainState,
enter:enterTrainMode,
exit:exitTrainMode,
goTo:trainGoTo,
},
});
});
})(window);