1. Solve the challenge the same way the browser would. By actually running the JS code.
2. Segmented downloading. Pretty sure they allow that on purpose so starting or resuming a video feels snappy.
Also for switching to a different bitrate stream seamlessly.
And the other approach is currently in progress - soon logged users won't be able to view videos without watching(or at least displaying/downloading) adds, so the logical next step is to nerf anonymous(as is without google account) viewing. No matter how I look YT has exact problems (and solutions) as all file locker sites. The only difference is that YT is not at mercy of Ad companies, it is the Ad company(at least Google is). So they might try some more aggressive measures, that normally would get a site banned from publishing ads.
Huge amount of users of youtube are literally babies, they don't know how to read or write so they don't sign in.
I'm starting to also suspect the trend of YTs algorithm insisting on recommending videos you've already watched is also a decision from this huge baby user base.
Sounds pretty bad for ad-revenue....
I hate to say this because I'd be affected but that's the math I would expect them to use. The only counter argument I can think of, why they might care to keep freeloaders there, is the network effect
Edit: I did some searching. In addition to that, the only relevant news I could find were about Google testing locking the 4K (2160p) resolution behind the Premium doors, which they ceased doing.
But it seems I'm mistaken [1].
[1] https://www.theverge.com/2023/2/23/23612647/youtube-1080p-pr...
That's pretty impossible with open-source software. Google engineers aren't clueless; they'll know where to find this information just as well as anyone here.
It's too bad there isn't a legal way of preventing Google engineers from reading some source code.
Downloading the same file used in the official UI and applying/reverse engineering the function is not exactly rocket science.