eat: Add "Force Background Play" option to prevent effective visibility API checks#806
eat: Add "Force Background Play" option to prevent effective visibility API checks#806polywock merged 2 commits intopolywock:masterfrom
Conversation
|
Thanks for the contribution! I liked the idea and went ahead and merged the PR. I made a few follow-up changes:
|
|
Thanks, @polywock! I'm glad you liked the feature. Appreciate you taking the time to review and integrate it with those improvements (especially the URL conditions). Happy to have contributed! |
|
Hello! Although I liked the idea, I did ultimately have to remove it. This is because it caused issues on several anime websites. I might add it back if I can figure a way to fix the issue. |
This PR adds a new feature "Force Background Play".
Problem:
Many websites use the Page Visibility API to automatically pause media or reduce quality when the tab is backgrounded or minimised. This disrupts the user experience for those who want to listen to video content in the background.
Solution:
I added a configurable option (default off) that, when enabled:
document.hiddento always returnfalse.document.visibilityStateto always return'visible'.visibilitychangeevents.Changes:
contentScript/main.SectionFlags.