fix: mobile menu overlay, speech bubble timing, TTS static file fallback

- Mobile nav menu now overlays content (absolute positioning) instead of
  pushing it down
- Speech bubbles stay visible for minimum 400ms even when TTS resolves
  instantly or fails
- kokoroPlayCached checks audio cache and loads static files even when
  Kokoro worker hasn't loaded — fixes TTS not playing on production
- CORS_ORIGIN env now supports comma-separated origins
- Rename "VIDEO REPLAY" to play icon + "REPLAY"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-09 11:59:18 +00:00
co-authored by Claude Opus 4.6
parent 1a7ad74859
commit e6b5aa4b9b
5 changed files with 47 additions and 16 deletions
+4 -3
View File
@@ -788,10 +788,11 @@ export function playNarrationNow(text: string): Promise<void> {
async function _playNowCore(text: string, profileName: string, rateOverride?: number): Promise<void> {
if (getMasterMuted()) return
const sfxGain = getSfxGain()
if (isKokoroReady() && sfxGain) {
// Try Kokoro (includes pre-generated static files from cache)
if (sfxGain) {
const profile = voiceProfiles[profileName] || voiceProfiles.announcer
await kokoroPlayCached(text, profileName, sfxGain, profile.volume * VOICE_VOLUME_SCALE)
return
const played = await kokoroPlayCached(text, profileName, sfxGain, profile.volume * VOICE_VOLUME_SCALE)
if (played) return
}
// Fallback to Web Speech
return _speakAsyncCore(text, profileName, rateOverride)