Skip to content

watch: pause the viewer stream while the window is hidden #227

Open

Description

@ElbertePlinio

Found while benchmarking the passive viewer in #225 (issue #207).

When the viewer window is hidden (moved to a Hyprland special workspace), the page keeps receiving and decoding frames. With an unthrottled animation in the session, the viewer stack used 22.5 percent of one core hidden, against 27.3 percent visible. Chromium throttles rendering only in part, and the bridge and x11vnc keep sending at the same rate (about 436 KiB/s).

Acceptance criteria:

  • Check whether document.visibilityState reports hidden in that state, on Hyprland and one other compositor.
  • When the page is hidden, stop requesting framebuffer updates or close the WebSocket, and resume when visible.
  • Benchmark hidden and visible again; the thumbnail must still show the current screen right after it becomes visible.

Checklist:

  • Visibility behavior verified per compositor
  • Pause and resume in the page
  • Benchmark in the PR

Activity

  1. added
    enhancement
    on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions