fix(wakelock): screen-saver prevention breaks after Fire TV app-switch#100
Draft
fix(wakelock): screen-saver prevention breaks after Fire TV app-switch#100
Conversation
Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix screen saver issue in Fire TV Silk Browser
Prevent screen saver on Fire TV (Silk Browser) while browsing the guide
Feb 22, 2026
… page re-show - Resume paused canvas-stream video when page becomes visible again; browsers pause media while hidden so the old code left it permanently paused - Re-request the Wake Lock sentinel immediately on page-show to win the race where the sentinel's release event fires after visibilitychange - Update CHANGELOG.md for v4.6.0 Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
Copilot
AI
changed the title
Prevent screen saver on Fire TV (Silk Browser) while browsing the guide
fix(wakelock): screen-saver prevention breaks after Fire TV app-switch
Feb 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
wakelock.jssilently stopped preventing the screen saver after the user switched away from and returned to the guide page on Fire TV / Silk Browser. Two independent bugs:Bugs fixed
NoSleep video never resumed — browsers pause
<video>elements when the page is hidden. The old handler guarded on!noSleepVideo(alwaysfalseonce the element was created), so the canvas-stream stayed paused for the rest of the session.Wake Lock sentinel release-event race — the browser releases the sentinel asynchronously on hide. If the
releaseevent fires after the page-visiblevisibilitychange,wakeLockSentinelis still non-null at the check and re-acquisition is skipped, leaving the lock permanently dropped.Changes
static/js/wakelock.js— rewrote thevisibilitychangehandler with three branches:video.play()requestWakeLock()CHANGELOG.md— v4.6.0 entry.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.