Live data from Hacker News

YouTube slows down video load times when using Firefox

old.reddit.com

121–130 of 486 posts

Re: YouTube slows down video load times when using Firefox

#121

Earlier quoted context omitted.

I think this is a good example of corporations being made up of people, rather than being contiguous coordinated entities as many of us sometimes think of them. An engineer doing "good engineering" on a feature typically depends not only on them being a "good engineer" but also on them having some actual interest in implementing that feature.

I would imagine that in a well coordinated company engaging in this kind of thing, the order wouldn't be "slow down firefox", but something along the lines of "use XYZ feature that firefox doesn't support and then use this polyfill for FF, which happens to be slow". Something that doesn't look too incriminating during any potential discovery process, while still getting you what you want.

Nah, that's got a risk profile. They could implement whatever your strategy is in the next release. You aren't going to necessarily get the longevity of the naive approach.

Plus a Firefox dev would discover that more easily as opposed to this version which they can just dismiss as some JavaScript bug on YouTube's part

Re: YouTube slows down video load times when using Firefox

#122

Earlier quoted context omitted.

You think they let inexperienced developers touch the YT code base without proper code review? Even if that were the case, which is an extremely charitable assumption, that itself would be malice in my opinion.

lol This reply is for everyone who has ever worked on the codebase...

Should be: LOL LGTM

Re: YouTube slows down video load times when using Firefox

#124

Earlier quoted context omitted.

This is interesting as I had noticed this happening to me (in Chrome) when the anti-ad-blocking started. I assumed that it was YT's way of "annoying" me still while no ads were shown... It was eventually replaced with the "You cant use Adblockers modal" and now I just tolerate the ads. So I wonder if that 5s delay has always been there.

I still use adblockers perfectly fine on Youtube. There was never a real interruption in adblocking either. You just need ublock origin + bypass paywalls.

I think they only disabled adblockers to logged users probably because non logged users don't have to agree to terms of services.

Re: YouTube slows down video load times when using Firefox

#125
post #113

https://www.thinkwithgoogle.com/marketing-strategies/app-and... 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.

That's because it's not actually what's happening. I'm all for bashing bigcorps and especially ad empires but reddit folks confused correlation with causation here.

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.

Re: YouTube slows down video load times when using Firefox

#126

Earlier quoted context omitted.

Something related to this which I find extremely frustrating is that I'm capable of watching a 4k video in my browser just fine. So if I decide to buy or rent a movie on youtube, they can only be played back at 420p. 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 unti…

Netflix does the same thing. Actually, speaking of infuriating corporate bullshit, allow me to go on a rant about Netflix and subtitles. 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 ga…

> Never mind that every other streaming app vendor figured this out

Did they? Both Prime Video and Disney+ have very very narrow subtitle and audio language choices.

> 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.

Maybe they mean the subtitles' copyright?

As someone who speaks multiple languages, and has the habit of watching with subtitles in the original language of the content if I speak it; otherwise default to English subtitles with original audio... none of the streaming companies have managed to handle that properly. Way too often the audio is only dubbed (often badly), or only my subtitles in my local language (French) are available, regardless of the original language of the content. I'd rather watch British movies with subtitles in English, not French, thank you very much.

Re: YouTube slows down video load times when using Firefox

#127

I am not getting this behaviour in Firefox 120. Tried it, logged out as well. > setTimeout(function() { c(); a.resolve(1) }, 5E3); The code looks like a silly concurrency bug fix, i.e., a lazy way to force ordering.

Such fix won't sleep for 5000 ms though. In my reading it looks like a part of the adblocker detection code. (EDIT: Relocated the actual analysis to https://news.ycombinator.com/item?id=38346602 for more visibility.)

Re: YouTube slows down video load times when using Firefox

#128

Earlier quoted context omitted.

Something related to this which I find extremely frustrating is that I'm capable of watching a 4k video in my browser just fine. So if I decide to buy or rent a movie on youtube, they can only be played back at 420p. 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 unti…

Netflix does the same thing. Actually, speaking of infuriating corporate bullshit, allow me to go on a rant about Netflix and subtitles. 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 ga…

Seems like they'd want people to, idk pick up to 4 languages themselves in settings if they are really attached to their picker. Which makes more sense to me.

Re: YouTube slows down video load times when using Firefox

#129

Earlier quoted context omitted.

I'm not even mad about Google making my artificially wait 5s for using firefox. 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?

Because it works. Good engineering isn't about being obtuse and convoluted, it's about making stuff that works.

Using an idle timer, like window: requestIdleCallback [1], is good engineering. If anything passes that's not good engineering, it's laziness.

I'm not even a JS programmer but I know about timers, idle wait in UI programming is a common pattern. It's the attitude of mediocre engineers not bothering to lookup or learn new things.

If every OS/browser/stock market dev did what they want "because it works" we don't have a working system. We'll have systemic lags making the system sluggish and eventually unusable as more engineers follow the same mantra.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Window/requ...

Re: YouTube slows down video load times when using Firefox

#130

Earlier quoted context omitted.

I think you’re missing the point. How can I browse Youtube in mpv?

What do you mean by "browsing" Youtube? Clicking new links for the purpose of entertainment? My post was only about playing videos.

Well, how do you get to the videos? How do you discover their links to pipe to mpv/yt-dl?

One option is RSS (YouTube still supports it) subscribing to channels. Do you know of others?

Post reply on HN