opencompletion.com/templates
russell@unturf.com ad080a7e2a
fix(tts): manual mode pause-toggles + sentence glow on F5
Two regressions surfaced after adding the Pause label in manual mode:

1. Clicking Pause restarted the cached blob from the beginning (looked
   like the track played twice). speakText's onclick was still wired to
   speakText itself, so each click created a fresh Audio and started
   from 0. Manual play now uses the same takeOver pattern as the queued
   path: while live audio owns playback, the click routes through
   toggleAudioPlayback (which pauses any current audio and toggles this
   one); when audio ends or errors, the original speakText handler is
   restored so users can replay from cache.

2. Manual mode had no sentence highlights. The glow needs per-sentence
   timing from the speech service, which only the SSE branch returns —
   manual mode was using the older non-SSE streaming path. speakText now
   branches on tts-1-f5 like speakTextQueued does, caches the sentences
   array, and calls attachSentenceGlow. Pauses naturally pause the glow
   (its tick loop checks audio.paused/ended).

Also routes the queued-audio onclick rebind through toggleAudioPlayback
for cross-message safety (was calling audio.play()/pause() directly,
which would let two queued audios play simultaneously if the user
clicked Play on a paused one while another was active).
2026-06-03 15:43:13 -04:00
..
auth.html Redesign user interface across all pages (#42) 2025-11-12 09:24:49 -05:00
base.html ui: add dark/light theme toggle above Auto-Play TTS 2026-05-29 12:51:07 -04:00
browse.html Fix theme flash and add logout to profile page 2025-11-30 10:00:48 -05:00
chat.html fix(tts): manual mode pause-toggles + sentence glow on F5 2026-06-03 15:43:13 -04:00
index.html ui: drop misleading homepage stats (active users, active rooms) 2026-06-02 09:19:11 -04:00
profile.html Fix theme flash and add logout to profile page 2025-11-30 10:00:48 -05:00
search.html Redesign user interface across all pages (#42) 2025-11-12 09:24:49 -05:00