Skip to content
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

Set backround script persistent to true for FireFox #2173

Closed
wants to merge 2 commits into from

Conversation

Wolfdv1
Copy link

@Wolfdv1 Wolfdv1 commented Dec 15, 2024

  • I agree to license my contribution under GPL-3.0 and agree to allow distribution on app stores as outlined in LICENSE-APPSTORE

To test this pull request, follow the instructions in the wiki.


Stopgap fix for #1993 "Video rotates from landscape to portrait Firefox Android" with info and reasoning for this PR visable here:

I believe the cause may be rooted in the background script being unloaded/removed, am currently testing with this change to help confirm, which just sets the background script to be persistent.
Not ideal in the long term, however for now running this artifact from local install on FF nightly and having had around 4hrs of videos played- the rotation issue is gone.

Correction: Not when it is removed, only when the runtime reloads it back in.

So when the background script (or 'event page' as it is referred to when persistence is false) is not running and an event (interacting with video controls, segment updates, or a segment skip etc) is called that requires a message to be handled and the script becomes active - this bug occurs.

Have experimented with narrowing down what about loafing the script causes this but haven't had much success- the event listeners that make up most of the script seem to all follow mdn web docs recommendations and practice, could be elsewhere in the utils or even node/react -Dom etc but I am not familiar enough with these to locate it. Could even be a FF issue more generally.

My reccomendation would be to simply set persistence to true as this mitigates the issue until more info, or there is an update for https://bugzilla.mozilla.org/show_bug.cgi?id=1927557. I would've liked to have found a fix that maintains inpersistance and therefore is manifest V3 ready, but since the script spends most of its time loaded on YT anyway and for Firefox Android there are no plans to remove V2 support I think I'll open a PR for this. At least then we can not have to use workarounds such as old vulnerable versions of FF, local addons, using autorotate etc.

@Wolfdv1 Wolfdv1 closed this Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant