Skip automatic Picture in Picture while Energy Saver is active

Open
#967 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
74/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
swift

Research direction

Start with Browser.pictureOut in Sources/Fast/Browser.swift and the Thrift.on state in Sources/Fast/Sleep.swift. Trace how automatic PiP requests are distinguished from manual ones and how Energy Saver state is exposed. Verify on battery with the issue’s settings and YouTube reproduction steps: automatic video PiP should be skipped while Energy Saver is active, while manual PiP remains available.

Written by the indexing model from the issue text.

Description

area: media Polish proposal
The problem

On battery, a YouTube video playing in Yab’s Picture in Picture window kept my Mac’s display from idling off. While the video was floating, pmset -g assertions showed these two assertions from YabCore:

NoDisplaySleepAssertion  "Video Wake Lock"
NoIdleSleepAssertion     "Playing audio"

The display assertion later released. This matches Chromium’s wake-lock policy for active PiP playback. I couldn’t verify whether this particular session opened automatically.

What you'd like

When Yab’s Energy Saver is active, skip automatic video PiP on tab, space, and app switches. Users could still open PiP manually when they want to keep watching.

To check the change on battery, turn on Settings → Tabs → Energy Saver → When unplugged and Picture in Picture automatically, play a YouTube video in a Chromium tab, then switch away. The video should stay in its tab. Open PiP manually as a control, then pause or dismiss it and check that Video Wake Lock clears.

Yab already distinguishes automatic requests in Browser.pictureOut. The automatic path could consult the existing Thrift.on state.

How you manage today (optional)

Pause the floating video or turn off Picture in Picture automatically for all power modes.

Yab version (optional)

0.48.1 (202611170523), macOS 27.2.1, Apple silicon. The assertions were attributed to YabCore (Chromium).

Dominant language
Swift
Stars
648
Forks
56
Avg merge
21h 14m
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from yetanotherbrowser/yab

All issues in yetanotherbrowser/yab

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.