> To clarify it more, it's simply this code in their polymer script link:
> setTimeout(function() { c(); a.resolve(1) }, 5E3);
> which doesn't do anything except making you wait 5s (5E3 = 5000ms = 5s). You can search for it easily in https://www.youtube.com/s/desktop/96766c85/jsbin/desktop_pol...
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/..." 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. 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);What exact combination of circumstances is required to trigger the multi second wait time?
Do they serve different js based on the user agent header? If they delay chrome too there's no foul.
https://old.reddit.com/r/firefox/comments/17zdpkl/this_behav...
I'm mad that such a big company with suposelly decent engineers, are making me wait 5s with literally a sleep, how is even possible to do such thing in such a rudimentary way? I would be like damn that was smart, this feels like, seriously this is the level?
* Marketing/Sales asks engineers to add a feature flag to sleep N milliseconds for their research: "how slowing down impacts your revenue"
* engineer adds a flag, with different control parameters
* Some genius in Product figures this out and updates the experiment to slow down for competitors
When company gets a backlash from public: "oops, we forgot to clean up all parameters of feature flag and it accidentally impacted Firefox"Good engineering isn't about being obtuse and convoluted, it's about making stuff that works.
employees will follow orders, orders are made by people who control the money
So I wonder if that 5s delay has always been there.
Added bonus, I'm less tempted to venture into the comments section...
Curiously it happens only on one profile, in another Chrome profile (which is also logged in to the same Google account) it does not happen. Both profiles run the code in your comment, but the one that does not have the delay does not wait for it to complete.
The only difference I spotted was that the profile that loads slowly does not include the #player-placeholder element in the initial HTML response. Maybe whether it sends it or not is tied to previous ad-blocker usage?
What does piss me off is that even if you clear cookies and local storage and turn off all extensions in both profiles it still somehow "knows" which profile is which, and I don't know how it's doing it.
(Sorry this is heading into the weeds, but I'm not really a web developer so maybe someone can tell me!)
There is no reason for charity with such a large power difference. For Firefox, "bugs" like this can really end up being a lost one-shot game.
It's like people walking by and casually reaching for your phone. It's always meant as a joke, unless you don't pull it away fast enough. Then suddenly it wasn't a joke - and your phone is gone.
This is not rooted in any reservation against Google in particular. If you are a mega-corporation with the power to casually crush competitors, you should really want to be held to a high standard. You do not want to be seen as the accidentally-fucking-others-up-occasionally kind of company.
mpv [--no-video] "https://www.youtube.com/watch?v=X9zVjEZ7W8Q"
Option in brackets is optional.I really don't understand why any technically proficient user would willingly use any of the official YouTube frontends. You get bombarded with ads, you're constantly tracked and experimented on, and your behavior is used to improve their algorithms in order to keep you on the site for as long as possible. It's a hostile user experience, just like most of the mainstream web.
Whenever possible, I suggest using Invidious, Piped, Newpipe, yt-dlp, and anything but the official frontends.
I try to compensate the creators I follow via other means if they have an alternative income source, but I refuse to be forced to participate in an exploitative business model that is responsible for the awful state of the modern web.
I'm a technically proficient user that's written custom bash scripts for youtube-dl combined with ffmpeg to download videos locally and I still use the official Youtube desktop web browser UI every day for several reasons:
+ transcripts and close-captioning (use Ctrl+F search for text to find the section of video that starts talking about the topic I'm interested in)
+ many videos have index of chapters (deep links), table-of-contents
+ viewers' comments (especially valuable for crowdsourced feedback on DIY videos to point out extra tips, or flaws, etc)
+ external links mentioned (Amazon links to products is especially valuable for DIY tutorials)
+ convenient hot links to related videos (part 2, part 3, etc). Not every creator makes "playlists"
+ Youtube web UI has superfast video scrubbing of the timeline. A local video player like VLC scrubbing of the timeline is very slow compared to Youtube because the youtube backend pre-analyzes the entire video and generates a bunch of timeline thumbnails at multiple intervals. This makes the Youtube web UI timeline scrubbing very fluid with responsive visual feedback.
I like downloading with yt-dlp but I also lose a lot of functionality when I watch videos in VLC instead of the Youtube desktop webbrowser UI. The above points are not relevant to the terrible Youtube app on mobile and tablets.
- Because I don't see ads with YouTube Premium
- Because I add things to my playlists
- Because I more often than not find interesting things to watch there
- Because I like using it on my phone or TV
There's a lot of reasons why someone would prefer the official apps over some third party app that might break every few months.
Of course this only works because by default (since I have an ad blocker anyways) I don't get bombarded with ads on the web frontend, and so far I've seen the adblocker nag screen once (a failure which uBlock Origin seems to have swiftly corrected).
I would much rather put up with Youtube than be frustrated when my 'alternate frontend' one day breaks and i need to figure out a workaround.
I don't want to yt-dlp every video, Piped and Invidious both have awful frontends in comparison, even the Newpipe dev admitted to using Vanced at some point, and yt-dlp needs some massaging to get the right video quality (and it can't download some videos at all).
If any of your solutions were better for the majority, the majority would be using them. Youtube's ad blocker war is making the platform worse for everyone, but having a couple of billions of developer power behind your platform still beats any open source video players built for fun.
Getting familiar with such tools not only replaces the terrible UXes you have to be subjected to, but also gives you the power and freedom to be creative with how you use Youtube and other online streaming sites.
I wrote various tiny scripts to replace all my needs for Youtube search, using any highlighted text, with a shortcut, Youtube Music, with a synced plain text file of song titles and a shuffle-on-read script, and more curiously, a script to help me slowly go through all thousands of my partner's favorite songs, and then, using shortcuts, add them to my own favorites, decide on them later, add them to the "what the heck do you listen to" friendly banter list, or the "my ears bleeding" list, etc. Much better UX then anything the slow web UIs can offer, and with minimum hacking.
My post was only about playing videos.
Any idea what specifically causes it to happen, rather than just "firefox"?
Although I just tried opening two videos and both opened basically instantly.
Apparently this is due to DRM restrictions, but the frustrating part is that you can pay extra money for the HD version and there's nothing telling you about this not being supported in your browser until you've made the purchase (by just allowing 420p and needing to search for why it's broken)
see https://www.reddit.com/r/youtube/comments/pm0eqh/why_are_my_...
They give you the option to choose between like four, maybe five languages. That's it!
If you want subtitles in any of the other hundred or so languages that they have available, well... no. Just no. Learn one of the four they've picked for you.
If you call their support, they'll gaslight you and mumble something about "copyright", which is patent nonsense. Copyright doesn't restrict Netflix from showing more translations for their own content that they made themselves. They own the copyright on it, which means, literally, that they have the right to do whatever they please with the copy. Including showing the associated subtitles to you.
You see, what actually happened, is that some too-smart UX guy at Netflix couldn't make a language picker look nice for that many options so he asked a too-smart data science (lol) guy to figure out the most common languages for each region.
Here in Australia they picked English, Italian, Vietnamese, Chinese because we have a lot of immigrants from those countries. I'm sure they used very clever algorithms on big data clusters to figure that out. Good job, well done.
Never mind that every other streaming app vendor figured this out. Netflix and their $500K total comp Stanford or wherever graduates couldn't. So they instructed their call centre staff to lie to their customers.
Then they had someone write this idiocy: https://help.netflix.com/en/node/101798
"If subtitles for a title are offered in a language but do not display on your device, try another device."
Oh, oh, I'll go do that right now! Let me try my PC... nope four languages. On the TV? Four languages. Actually, I have a phone... and... oh... four languages.
PS: Thai (only!) subtitles are "special" and use eye-searing HDR maximum white. Like 1,600 nits white that literally leaves green after-images etched into my retina. They have a support page and a pre-prepared set of lies for the support staff to read for that piece of shoddy engineering also.
In unrelated news, my youtube-dl usage is way, way up.
I also had this issue, videos would frequently wobble down to like 240p or whatever, on a stable, high speed wired connection.
It's not an internet problem since I never have to buffer when using this forced setting, so it's probably YT trying to save a few bandwidth bucks when they think people aren't looking.
0: https://www.pcworld.com/article/398929/youtube-defaults-to-l...
And that is /not/ easily discoverable??
Seems odd to do something so brazen while also publishing information that (could) prove intent.
Google also modifies how business information can be accessed from Firefox Mobile. You can't read reviews easily from Firefox Mobile. At least not my install.
The code in question is part of a function that injects a video ad (that plays before the start) and the code itself is just a fallback in case it fails to load over 5 seconds so that video page doesn't break completely.
Why was this affected by user agent change? My best guess is that on some combinations they somehow decide not to show any ads at all (for now) and therefore this function is not called and some other code path is taken. This is consistent with my own experience with the recent anti-adblock bullshit they implemented. The banner was not being shown after user agent change implying it's one of the considered variables.
You can verify all this if you click 'format code' in browser debugger.
I don't use YouTube so the comment was more of a way to bring up the other behavior in business reviews. It seemed relevant.
Edit: reviews are also broken(for me) on Firefox desktop with no extensions enabled and with ublock enabled.
It's pretty obvious from the outside that supporting Firefox is not a product priority for Google. It also seems clear that it's in their best interest to have users choose Chrome over Firefox. My guess is that this likely emerges from a lot of very reasonable sounding local decisions, like "prioritize testing on browsers with the most market share," but it is convenient how those align with the anti-competitive incentives.
Google is the new "Microsoft", they embrace, they extend, then extinguish. Look at their email offering, messaging offerings, they built on top of XMPP, then they pulled the plug eventually. Android is Linux based, but insanely proprietary, the app store is not open by any means, you're fully at their whims to get your apps on there. Chrome is basically the IE of old, implementing proprietary things or APIs that are not yet standard for Google products, and pushing out competing browsers.
There's 100% targeted de-optimization for firefox users and the burden of finding it is on the users it seems.
At this point, Firefox is very much an also-ran on two axes: market share is tiny and nobody forces it on their captive audiences. We may as well ask why Google isn't optimizing testing on Opera, or Samsung Internet.
(There is also the issue of under-the-hood engine. Since so many browsers have converged on a few core and JS stacks, testing on one exemplar of that stack has a tendency to suss out bugs in the other stacks. Firefox still being its own special snowflake in terms of JS engine and core means it has more opportunities to be different, for good or for ill. So there's a force-multiplier testing the other browsers that one lacks testing Firefox).
Need to call out them.
I'm basically forced to use Chromium on Linux.
@dang or op, wrong link. Should be: https://old.reddit.com/r/youtube/comments/17z8hsz/youtube_ha...
> setTimeout(function() { c(); a.resolve(1) }, 5E3);
The code looks like a silly concurrency bug fix, i.e., a lazy way to force ordering.
It will be a party for the EU to punish Google with an anti-monopoly lawsuit.
Best case: google gets forced to split up chrome, youtube and search as they obviously abuse their power.
And yes, am guilty too of committing this to prod back then. I think I haven't had a case where this was deployed in the last decade, but in the ugly SPA days pre angular v1 (and even during angular v1), where you code was this big glued-together conglomerate of various 3rd party UI libraries, this was common. Its ugly as hell, and you really had to be there at that time to understand this. But often it was just a cheap alternative, while debugging and fixing the truly underlying cause would be several man-days or even weeks.
My point being: It might have slipped their QA cracks and was at some point intended to workaround a bug of some obscure Firefox behavior. For a company at youtube's scale this is however pretty embarrassing.
As opposed to now?
Given Google is apparently going ahead with killing extensions on Chrome it's not hard to imagine some scheme where a guy is just lookin' at'cha merchandise and happens to be carryin' a baseball bat is all -- you can't really blame him for some spillage, right? (make using Firefox painful to try and push people to Chrome). Before crippling Chrome? Sounds ridiculous, but one can't help but wonder...
Thinking about some more, the point could actually be to make users question if its because they have an ad blocker not even actively blocking anything, but simply installed. Some number of users may uninstall their ad blocking extension to see if it makes the lag go away.
I guessed it was due to the cat-and-mouse adblocking prevention between YouTube and adblockers (I'm also using uBlock Origin).
setTimeout(function() {
c();
a.resolve(1)
}, 5E3);
https://old.reddit.com/r/firefox/comments/17ywbjj/whenever_i...Is this a move by Google to boost Chrome usage numbers. Although it is a terrible way to do it, many organizations still count views by looking at User-Agent. Google makes Youtube work worse if you report a non-Chrome UA, but all you have to do is report a Chrome UA and then it works perfectly fine. Suddenly a lot of people who were using FF now look like they are using Chrome because the UA has changed.
They then use this as proof that no one should bother developing for anything other than Chrome because no one uses anything but Chrome, because all the FF users spoofed their UA to make it look like Chrome because Google purposefully cripples their site if you aren't using Chrome.
I doubt there was that much aforethought, but it is a nice win for Google regardless.
In the meantime I'll still just be sitting here telling websites I use IE 6 or Netscape Navigator to mess with web admins.
So for all people uploading videos, please have a look at Peertube. It is to Youtube what Mastodon is to Twitter. (and more: it is compatible with Mastodon, one can subscribe to your Peertube channel through his/her mastodon account).
I’m not arguing to leave Youtube completely but to offer an alternative to your audience. Please join peertube.
That aside: I also doubt most peertube instances can withstand the bandwidth costs of seriously hosting a few moderately succesful YouTube channels.
Furthermore, I wish regulators have gone at YouTube like a ton of bricks. The ads they show are mostly from various kind of scam artists. My friend is a bit naive, but fortunately she asked me for an opinion whether she should invest her savings into the programme offered by one of "gurus" advertising on YT. She even gone on a few of their webinars and became as you would say, brainwashed. The kind of way you see in a cult. Fortunately there was still some worry running around her and she asked me to check before transferring £20k. You can't imagine how much effort it took to tell here these guys are fraudsters. Now she is onto another scheme and now she tells me that I just don't want her to invest the money, because I think everyone is a fraudster and these are the good guys! Then she showed me testimonials from apparent "clients" how they got rich. One person looked familiar and I actually found them on Cameo. She tried to say maybe this is just that person's side gig etc. and she does not talk to me.
I really really hope someone or some organisation get to the bottom of this kind of harmful and dangerous content.
YouTube is a scammers paradise and YouTube wants more people to fall for these things.
Age-old question. It's not that simple. Those ads have an effect on you whether you "want to or need to buy anything" or not.
overlords: I'll give up youtube entirely rather than watch ads/contribute towards your revenue
Now secondly, Firefox does have some very real performance bottlenecks that other browsers do not have. This means (and has been my experience already) that you can build experiences in all other browsers that are buttery smooth and nice, but that will cause crashes in Firefox. In my own work, to get around this I ended up making my product inferior in all browsers so it would not crash Firefox. But if I was big enough and had a team of more than 1, could I have implemented a solution that worked in Firefox and another that worked in other browsers, and delivered the best experience I could to all users of all browsers?
There's no need to jump to malice on Google's part if what they're doing is legitimately in an attempt to ensure that Firefox users have the best experience overall.
These days I can still find videos quickly and easily with DDG, which is vastly superior to Youtube itself for searching Youtube. But I worry, this will be taken away some day by Google just like everything else.
I wish Mozilla would invest way more into Firefox itself. I think Mozilla could and absolutely should consider suing Google if they're artificially slowing down Firefox.
none ever seem to offer e.g. indemnification for ad-based malware
Sometimes YouTube also disables features on my home page. For example, at the top of the home page there's usually a filter bar with various categories. I haven't figured out under what conditions this gets triggered, but there's times where the filter bar just disappears.
https://t.co/2lPM2pFtoN
https://t.co/O331DcmVBs
TLDC: it's related to ad blocker detection and can happen even on Chrome.that doesn't appear to "debunk" this in any way when I actually read the whole thread, you're using words oddly here
setTimeout(function() {
c();
a.resolve(1)
}, 5E3);I do have YouTube Premium (paid for in India to reduce the cost), but also in an incognito window where I'm not logged in, the video pages load immediately.
Maybe it's because I use the extensions uBlock Origin and/or Disable Autoplay For YouTube?
I would imagine changing the user-agent at all will (temporarily) fix it, rather than to a Chrome user-agent specifically.
Probably targets ad blocking users rather than non-Chrome users.
I did see the ad nag once when I accidentally went to YouTube in safari
"Reportedly" also known as: "unable to confirm but we saw it on reddit so it must be true"
If I wanted to read what random Twitter users thought about a topic, I'd just read Twitter. I read news articles to learn from experts I wouldn't otherwise have access to, not random Reddit trolls, Instagram moms, and Russian Twitter bots.
f** google
The "extra chance to consider your life choices and do you really want to watch this video" was a feature not a bug.
Plus now tiktok and telegram are orders of magnitude more popular than YT. Im seeing more and more creators arrive on YT as their "second choice" platform.
Surely this is straight to court for anti-competitive behaviour?
A/B testing? :)
Unexpected side effect - Rick is now number 1 in all the streaming charts.
Firefox: 22 GB of ram usage for the youtube tab after ~15 minutes. Tab became unresponsive.
Edge: Out of memory error after ~5 minutes.
Chrome: working fine, the youtube tab sitting peacefully ay 400-600 MB.
How Google is building a browser monopoly. https://www.youtube.com/watch?v=ELCq63652ig
The actual code. They went and actually hardcoded a 5 second delay.
yt-dlp + VLC speed this right up again!
Oh wait. Who thought it's a good idea to post this with a link to a login page instead of the actual discussion thread?
Stop using the youtube.com frontend entirely. It's enshittified beyond redemption. If they could replace it with a big ads billboard with no added value while leaving their profits intact, they'll do it.
If you really have to watch some content that it's only on YouTube, use Piped, Invidious, or one of the many tools based on youtube-dl or any of its forks.
Google deserves piracy now because a big loss of revenue resulting from their hostile practices is the only thing that can stop this enshittification process. Google will stop only when users say that it's gone too far. Scraping them, pirating them and financially damaging them is a moral duty at this point.
Google is working on making a premium internet based on their services that permeate the whole web which they plan to serve only to "trusted devices" running Chrome - I do not think this is going to work out well for them.
I also don't understand what this law has to do with the topic.
Virtually everybody is using an engine based on Webkit or Blink these days. This is naturally what websites are optimized for.
My issue at the moment is while ublock can still block ads, every video automatically pauses like 5 seconds in and I need to hit play again.
And even people who lived the horror days of "We need to support IE6 because the client wants so" and "ActiveX is a good choice for web pages" are complacent.
Please, for the love of all that's good in the world, use ANYTHING but a Chromium-based browser if at all possible.
Software that is getting attention has a nice long warning period and fixes may not even cause any trouble at all if the code is ok and there are unit tests.
New software won't have a whole class of timezone problems because people will use the better API to remove the warnings.
I cannot see what the big problem is - much more troublesome things happen in Go all the time. Python isn't a huge for-profit company like Google or even MS which has to dedicate efforts to ensuring that games from 1992 still run in 2023.
At google They may be not respecting the web but they are doing firefox users a favor. If you really need to see a video, five seconds won't make a difference. If you don't need it, five seconds may remind you that you don't really need it.
Try to see the positives