Bug Fix Release — Screensaver Interrupting Playback
Addresses user-reported issue where the Chromecast with Google TV / Android TV Ambient Mode screensaver engaged during playback and killed audio. After ~30 minutes in screensaver state, users were returned to the TV Home screen with no way to resume where they left off.
Fixes
Screen-Wake Lock During Active Playback (TV-only)
- Audio player now holds a screen-wake lock while playback is active, preventing Ambient Mode from engaging mid-chapter.
- Per Android TV developer guidance, audio should continue through Ambient Mode automatically — but CCwGTV firmware behavior diverges from docs and stops playback regardless. This fix works around that platform quirk.
- Wake lock is acquired on every play↔pause transition via the existing
onPlayingUpdatenative event, and released on every session-end path: pause, stop, session close, fullscreen-collapse-close, playback failure, and component destroy.
Scope
- Active playback on TV: screen stays on; Ambient Mode never starts; audio never gets killed.
- Paused on TV: wake lock released — screensaver engages normally after idle; standard Android TV "Home after 30 min" behavior applies (matches all other TV media apps).
- Phone / tablet / iOS: zero behavior change — all new logic gated behind
isAndroidTvVuex state.
Implementation
components/app/AudioPlayer.vue— addedupdateKeepAwake(shouldKeepAwake)helper; wired intoonPlayingUpdate(chokepoint for play↔pause state) andendPlayback(chokepoint for all session teardown).- Uses
@capacitor-community/keep-awakeplugin — already installed and used by the e-reader (Reader.vue); no new dependencies. - Try/catch around plugin calls logs errors without disrupting playback.
Testing
Validated via direct sideload on Chromecast with Google TV hardware. Full v1.0.5 + v1.0.6 combined manual test pass: 35 of 40 TV tests passing; 2 phone tests pending post-release sideload. Three pre-existing regressions surfaced during QA have been logged for post-v1.0.6 patch (playlist row play-button fingerprint, fullscreen ellipsis History route, long-list sort modal D-pad wrap) — none block this release.