6 ms·
That is not correct. The surrounding code gives some more context: h=document.createElement("video");l=new Blob([new Uint8Array([/* snip */])],{type:"video
by lifthrasiir 3y ago
That is not correct. The surrounding code gives some more context:
h=document.createElement("video");l=new Blob([new Uint8Array([/* snip */])],{type:"video/webm"});
h.src=lc(Mia(l));h.ontimeupdate=function(){c();a.resolve(0)};
e.appendChild(h);h.classList.add("html5-main-video");setTimeout(function(){e.classList.add("ad-interrupting")},200);
setTimeout(function(){c();a.resolve(1)},5E3);
return m.return(a.promise)})}
As far as I understand, this code is a part of the anti-adblocker code that (slowly) constructs an HTML fragment such as `<div class="ad-interrupting"><video src="blob:https://www.youtube.com/ https://www.youtube.com/..." class="html5-main-video"></video></div>`. It will detect the adblocker once `ontimeupdate` event didn't fire for 5 full seconds (the embedded webm file itself is 3 seconds long), which is the actual goal for this particular code. I do agree that the anti-adblocker attempt itself is still annoying.
- gear54rus 3y ago[flagged]
- Ygg2 3y agoHow come switching to User Agent to Chrome fixed it for that Reddit OP? Does it omit this if UA is changed?
- gear54rus 3y agoWhen they first introduced anti-adblock crap, you could evade the banner by switching UAs. I'd say it's fair to assume that switching UAs triggers some other code path and this function never gets called.
- makeitdouble 3y agoThis gives us some background, but it's still slowing down firefox with no relation to the video content.
- insanitybit 3y agoIt's radically different.
- lifthrasiir 3y agoFor the completeness, the omitted Uint8Array is the following 340-byte binary (here in base64): GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwH/////////FUmpZpkq17GD D0JATYCGQ2hyb21lV0GGQ2hyb21lFlSua6mup9eBAXPFh89gnOoYna+DgQFV7oEBhoVWX1ZQOOCK sIEBuoEBU8CBAR9DtnUB/////////+eBAKDMoaKBAAAAEAIAnQEqAQABAAvHCIWFiJmEiD+CAAwN YAD+5WoAdaGlpqPugQGlnhACAJ0BKgEAAQALxwiFhYiZhIg/ggAMDWAA/uh4AKC7oZiBA+kAsQEA LxH8ABgAMD/0DAAAAP7lagB1oZumme6BAaWUsQEALxH8ABgAMD/0DAAAAP7oeAD7gQCgvKGYgQfQ ALEBAC8R/AAYADA/9AwAAAD+5WoAdaGbppnugQGllLEBAC8R/AAYADA/9AwAAAD+6HgA+4ID6Q== VLC somehow refuses to play it, but its nominal length can be verified with a short JS code like: v = document.createElement('video'); v.src = `data:video/webm;base64,<as above>`; await new Promise(resolve => v.onloadedmetadata = resolve); console.log(v.duration);
- FoodWThrow 3y agoWhy is it only trying to detect ads when the user agent is Firefox? https://old.reddit.com/r/firefox/comments/17zdpkl/this_behaviour_from_google_is_beyond_disgusting/ https://old.reddit.com/r/firefox/comments/17zdpkl/this_behav...
- lifthrasiir 3y agoI have no idea because I didn't experience anything like that both in Chrome and in Firefox (both with uBO though). But I'm confident that this particular code is not related to the actual slowdown, if it did happen to some Firefox users, because I received the same code even in Chrome.
- pgt 3y agoI would suspect because Google can do the detection in Chrome itself, but not in Firefox.
- dash2 3y agoDoes Firefox allow a wider range of plugins, including adblockers?
- TexanFeller 3y agoYes, Chrome is severely hobbled in this by comparison.
- GTP 3y agoYes, there are plenty. You can have a look here: https://addons.mozilla.org/en-US/firefox/ https://addons.mozilla.org/en-US/firefox/
- timeon 3y agoThis is just anecdote, but sometimes (especially when I'm on slower internet) Safari + AdGuard will have glitch [0] on YouTube. Never happened with Firefox + Ublock Origin. [0] Unable to press play and showing image with Ad instead.
- 3y ago
- timeon 3y agoIt is still better to wait 5s without ad than with ad.
- lifthrasiir 3y agoIt has to be a background check, otherwise you can't explain cases (like me) where the code is running but users never noticed any delay.
- tzs 3y agoI wonder if it is just a coincidence that 5s is the time before a skippable ad becomes skippable?
- 1905 3y agoEither wait 5 seconds without ad, or get served an ad about switching to Chrome
- Aardwolf 3y agoI couldn't reproduce the 5s wait in multiple scenarios in Firefox (various combinations of being logged in / not being logged in / without adblocker / with adblocker) and couldn't reproduce a 5s wait time in any of them, it played back immediately in each case (when without adblocker, using a second video to have one start without ad). I tested on Linux. What exact combination of circumstances is required to trigger the multi second wait time?
- Vvector 3y agoI can't reproduce this either. YT on FF plays immediately for me
- deleted 3y ago[deleted]
- rez9x 3y agoI tested in Firefox (uBlock), LibreWolf (uBlock), Safari (AdGuard), and Chromium (no ad blocker), and the initial home page load takes a couple seconds, but I never witnessed a 5s delay. I would say it was actually fastest in Firefox for me, but that may have just been a result of some caching. I am a premium subscriber and have never seen a warning for using an ad blocker, so I'm not sure if premium subscribers get a pass.
- nixass 3y agoI am experiencing delay on both Firefox and Waterfox
- kortex 3y agoI just tested this in firefox on ubuntu. Three subsequent new tab tests. Load: 4.34s, 5.14, 2.96, 3.35 DOMContentLoaded: 3.65s, 4.56, 2.92, 3.33 Finish: 13.14s, 10.77, 8.49, 12.02 So it's getting a bit faster over time, but still heinous, and crucially, it isn't hanging on requests. Individual asset GET/POST requests are taking tens of ms, worst was a few parallel 254ms GETs on a cold start. Usually 50-70ms. But there is a flurry of requests, then a period of very few requests until 5s after init, then another flurry. Firefox 119.0 Ubuntu 22.04 uBlock Origin, Privacy Badger Same OS, chrome 115.0.5790.170, no blockers, youtube is much snappier, it still definitely takes a few seconds to paint thumbnails, but it's basically done by 5s. DOMContentloaded is never more than 1.75s, finish <8s. Firefox private window with blockers off has similar time statistics. But actually doubleclick.net is still getting bounced.
- sproketboy 3y ago[dead]
- rendaw 3y agoOkay, I'm sold on the delay, but where's the code that detects non-chrome? Do they serve different js based on the user agent header? If they delay chrome too there's no foul.
- Quot 3y agoJust going off this tweet, it seems to be user-agent based: https://fixupx.com/endermanch/status/1726605997698068630 https://fixupx.com/endermanch/status/1726605997698068630
- chris_wot 3y agoIf YouTube are going to go down this path, then perhaps Firefox devs should set the user agent to Chrome for YouTube?
- 36933 3y agoThey delayed chrome too. At least for me.
- dmonitor 3y agoif it’s anti-adblock, does it run even with premium?