x0a / uBO-YouTube

Easier way to exempt your favorite YouTube channels from adblocking.
GNU General Public License v3.0
124 stars 8 forks source link

Video volume keeps resetting to max (Firefox) #19

Closed CaptainQwertz closed 3 years ago

CaptainQwertz commented 3 years ago

Even after lowering the volume, if I open another video (for example from recommended) its volume is reset. This happens regardless of if the channel is whitelisted. The volume immediately corrects itself when disabling the addon and reloading the site.

With the addon enabled: Addon enabled

After disabling the addon: Addon disabled

I'm using Firefox 81.0.1 on Windows 10 Pro 2004.

x0a commented 3 years ago

Thanks for the bug report and screenshots.

With Firefox debugger and a few hours of time I think I've figured out the problem. It's due to a recent bug fix to address uBO-blocking, where we "restored" JSON.parse with a clean version from an iframe.

The problem was that the resulting Objects created by the "clean" JSON.parse were instances of iframe, not the current frame. So they would fail the something instanceof Object checks made by YouTube. The solution was to recreate the Objects using the current execution context so that YouTube will accept them. Changes made: https://github.com/x0a/uBO-YouTube/commit/0638455df3f2078be3c0228f4badd3a928e5e4de

0.11.6 is already available in Mozilla Addons. Try reloading your addons and see verify that this fixes the problem

Thanks again

CaptainQwertz commented 3 years ago

Wow, you work fast!

Yes, the issue is fixed for me now, thank you very much for your work and also the explanation.