Youtube - Interesting Browser sniffing
-
Read this via Mastodon toot here:
Today I learned that YouTube is deliberately crippling Firefox on Asahi Linux
===
Hector Martin
@[email protected]Today I learned that YouTube is deliberately crippling Firefox on Asahi Linux. It will give you lowered video resolutions. If you just replace "aarch64" with "x86_64" in the UA, suddenly you get 4K and everything.
They literally have a test for "is ARM", and if so, they consider your system has garbage performance and cripple the available formats/codecs. I checked the code.
Logic: Quality 1080 by default. If your machine has 2 or fewer cores, quality 480. If anything ARM, quality 240. Yes, Google thinks all ARM machines are 5 times worse than Intel machines, even if you have 20 cores or something.
Why does this not affect Chromium? Because chromium on aarch64 pretends to be x86_64
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
​
Welp, guess I'm shipping a user agent override for Firefox on Fedora to pretend to be x86.
EDIT: The plot thickens. Pretending to be ChromeOS aarch64 still gets 4K. Specifically: Mozilla/5.0 (X11; CrOS aarch64 10452.96.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36 still works.
EDIT 2: OK, so the plot really thickens now. Chrome is not affected even if it claims to be aarch64. Turns out there is another codepath: apparently YouTube thinks aarch64 Firefox is... a HiSense TV?!?!?!?! Specifically, model 65a67gevs...?????
This is server-side sniffing now and it's specifically looking for Firefox aarch64 (or at least "Gecko and not Chrome/CrOS/something else known to pretend to be Gecko"). And it's the "TV" platform that is triggering the resolution crippling.
-
@lfisk I reckon all UAs should be changed to:
Browser; Last Update 12/2023
or
Mobile; Last Update 12/2023What more do websites "really" need? It is NOT the websites responsibility to "fix/hack" for broken browsers!
-
@TbGbe One thing I've learned through the years, especially reading complaints in places like this... is that the general user has no clue about maintaining updates, security, reading instructions... they just think it should magically work
-
@lfisk That's why I included the "Last Updated" field.
That is the "important information" not the Browser Name which is often "abused" to block users (not supported etc.).Many updates are handled by the O.S. or "Auto update" within the browser. If users turn that off, they can suffer
-
I use a script to force the use of HD if it is available because I found that Google was forcing YouTube to default to the lowest possible resolution (and this was with all five browsers). If HD is not available, the extension will choose the highest resolution that is available.