Skip to content

Feature: Add checks for sound before auto toggling PiP #7796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 22, 2025

Conversation

cbackas
Copy link
Contributor

@cbackas cbackas commented Apr 21, 2025

Coming from Arc, I really liked using auto PiP. Enabling it in Zen has been a bit annoying because even muted videos on web pages (such as the muted stream on twitch's home page) are activating auto PiP when you change tabs.

I've added a simple patch in the actors/PictureInPictureChild.sys.mjs file that checks if the video player itself is muted and if it is it does not activate PiP when you switch away from that tab.

I then added another small patch in components/PictureInPicture.sys.mjs which checks whether the tab itself is muted and prevents auto PiP if it is in fact muted.

Maybe this behavior should be behind a preference?

@cbackas cbackas requested a review from mauro-balades as a code owner April 21, 2025 14:45
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. Feature labels Apr 21, 2025
@mauro-balades mauro-balades merged commit b953063 into zen-browser:dev Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants