refactor: scope rehearser recording

This commit is contained in:
mARTin-B78 2026-09-04 12:31:03 +02:00
parent 3a7f0bf677
commit 6c62a0f75e
5 changed files with 26 additions and 13 deletions

View File

@ -8,6 +8,8 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi
## [Unreleased]
### Changed
- **Rehearser recording namespace migration.** Microphone overlay, recording controls, and shared microphone errors now
use a private implementation scope with explicit compatibility exports.
- **Rehearser I/O namespace migration.** Serialization, library persistence, import/export, and PDF helpers now use a
private implementation scope with explicit compatibility exports and the existing namespace API.
- **Rehearser playback namespace migration.** WebAudio transport, decoded-buffer caching, line-audio caching, and batch

View File

@ -1 +1 @@
1.24.60
1.24.61

View File

@ -51,6 +51,7 @@ Done incrementally as global-scope ordered files (no ES-module change needed)
- ✅ Stateful Audiobook modules use private scopes with explicit legacy exports; their public APIs are namespace-tested.
- ✅ Rehearser playback uses a private scope with explicit transport/cache compatibility exports and a namespace-tested API.
- ✅ Rehearser I/O uses a private scope with explicit serialization/library/import compatibility exports.
- ✅ Rehearser recording uses a private scope with explicit microphone/overlay compatibility exports.
- ✅ `static/css/resource-diagnostics.css` — isolated Performance/resource diagnostic panel styles.
- ✅ `static/css/background-jobs.css` — isolated background-job history and retry-panel styles.
- ✅ `static/css/voice-design.css` — isolated Voice Design form, samples, and preview-match styles.

View File

@ -10,7 +10,7 @@
<meta name="format-detection" content="telephone=no">
<meta name="color-scheme" content="light dark">
<meta name="theme-color" content="#2563EB">
<meta name="app-version" content="1.24.60">
<meta name="app-version" content="1.24.61">
<link rel="manifest" href="/manifest.webmanifest">
<link rel="icon" href="/static/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/static/icon.svg">
@ -27,12 +27,12 @@
<!-- ── Core styles (local — no CDN dependency for first paint) ────────── -->
<link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css">
<link rel="stylesheet" href="/static/style.css?v=1.24.60">
<link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.24.60">
<link rel="stylesheet" href="/static/css/background-jobs.css?v=1.24.60">
<link rel="stylesheet" href="/static/css/voice-design.css?v=1.24.60">
<link rel="stylesheet" href="/static/css/rehearser.css?v=1.24.60">
<link rel="stylesheet" href="/static/css/audiobook.css?v=1.24.60">
<link rel="stylesheet" href="/static/style.css?v=1.24.61">
<link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.24.61">
<link rel="stylesheet" href="/static/css/background-jobs.css?v=1.24.61">
<link rel="stylesheet" href="/static/css/voice-design.css?v=1.24.61">
<link rel="stylesheet" href="/static/css/rehearser.css?v=1.24.61">
<link rel="stylesheet" href="/static/css/audiobook.css?v=1.24.61">
<!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── -->
@ -397,7 +397,7 @@ window.toggleNavTree = function(treeId, chevronId) {
</script>
<!-- loader.js: fetches sections → loads JS modules → removes skeleton -->
<script src="/static/loader.js?v=1.24.60"></script>
<script src="/static/loader.js?v=1.24.61"></script>
</body>
</html>

View File

@ -1,6 +1,8 @@
// Rehearser microphone recording overlay and controls.
// Loaded before rehearser.js; shared state and playback helpers resolve at call time.
(function (root) {
// ── Recording overlay ───────────────────────────────────────────────────────
function showRecOverlay(line) {
@ -138,9 +140,17 @@ $('reh-skip-line')?.addEventListener('click', () => {
});
window.TTVC=window.TTVC||{};
window.TTVC.rehearser=window.TTVC.rehearser||{};
Object.assign(window.TTVC.rehearser,{
Object.assign(root, {
showRecOverlay,
hideRecOverlay,
startRehMic,
stopRehMic,
microphoneErrorMessage,
});
root.TTVC=root.TTVC||{};
root.TTVC.rehearser=root.TTVC.rehearser||{};
Object.assign(root.TTVC.rehearser,{
recording:{
showOverlay:showRecOverlay,
hideOverlay:hideRecOverlay,
@ -148,4 +158,4 @@ Object.assign(window.TTVC.rehearser,{
stop:stopRehMic,
},
});
})(window);