diff --git a/CHANGELOG.md b/CHANGELOG.md index 713140b..8903c44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi ## [Unreleased] ### Changed +- **Audiobook network namespace migration.** Timeout, streaming, and attribution transport helpers now use a private + scope with explicit compatibility exports and the existing Audiobook namespace. - **Rehearser library namespace migration.** SQLite persistence and the IndexedDB migration adapter now use a private scope with explicit database compatibility exports and the existing library namespace. - **Reader namespace migration.** PDF/TXT document state, playback, search, synthesis, and library APIs now use a diff --git a/VERSION b/VERSION index 5898e68..9e6baf7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.24.66 +1.24.67 diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 968c130..29c8710 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -56,6 +56,7 @@ Done incrementally as global-scope ordered files (no ES-module change needed) - ✅ Audiobook core uses a private scope with explicit reader-side state and handoff compatibility exports. - ✅ Reader uses a private scope with explicit document, playback, and search compatibility exports. - ✅ Rehearser library persistence uses a private scope with explicit SQLite/IndexedDB compatibility exports. +- ✅ Audiobook network transport uses a private scope with explicit timeout/stream 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. diff --git a/static/index.html b/static/index.html index 225434f..79bd0bd 100644 --- a/static/index.html +++ b/static/index.html @@ -10,7 +10,7 @@ - + @@ -27,12 +27,12 @@ - - - - - - + + + + + + @@ -397,7 +397,7 @@ window.toggleNavTree = function(treeId, chevronId) { - + diff --git a/static/js/audiobook/network.js b/static/js/audiobook/network.js index 36aa2e0..4646b93 100644 --- a/static/js/audiobook/network.js +++ b/static/js/audiobook/network.js @@ -2,6 +2,8 @@ // Loaded after audiobook.js; the functions are called from user actions and // therefore do not need to execute while the main audiobook module initializes. +(function (root) { + async function audiobookFetchWithTimeout(url, options = {}, timeoutMs = AUDIOBOOK_ATTRIBUTION_TIMEOUT_MS) { const parentSignal = options.signal; const ac = new AbortController(); @@ -86,10 +88,12 @@ async function audiobookAttributeStream(body, view, outerSignal, idleTimeoutMs = } } -window.TTVC = window.TTVC || {}; -window.TTVC.audiobook = window.TTVC.audiobook || {}; -Object.assign(window.TTVC.audiobook, { +Object.assign(root, { audiobookFetchWithTimeout, audiobookTimeoutSeconds, audiobookAttributeStream }); +root.TTVC = root.TTVC || {}; +root.TTVC.audiobook = root.TTVC.audiobook || {}; +Object.assign(root.TTVC.audiobook, { fetchWithTimeout: audiobookFetchWithTimeout, attributeStream: audiobookAttributeStream, timeoutSeconds: audiobookTimeoutSeconds, }); +})(window);