Can you elaborate on the "with certain sizes" please? If the video file is something in the tens of GBs, it would be quite understandable for the browser to avoid keeping the whole file in memory.
Disk caching is still a thing. Kids watch the same videos on repeat for hours on end, so maybe almost-indiscriminately caching the entirety of the last watched video would be a good idea.
Disk caching probably invokes Flava Works vs Gunter [1] which is a case that distinguishes streaming from copying under copyright law. There are probably later updates to this, but this is the one I'm aware of.
Leave it to the copyright people to make a huge legal mess out of the simplest concepts. Now people can't even cache data without lawyers showing up. I wonder how long it's gonna take before I see them arguing memcpy should be illegal.
So maybe be a bit smarter about it. The browser will know if the video is set to loop unless that is done with JS. In all cases it will know if it has looped and can start caching then.
And just you don't need to limit all devices by the lowest common denominator either.
Which is the entire point of the article: Most of the time even trivial video playback is done using JS due to the shortcomings of the <video> tag itself! This also means that browsers are unable to perform such optimizations.
> And just you don't need to limit all devices by the lowest common denominator either.
Unless the video site is intentionally sending cache control headers preventing caching of the video assets, this behavior is presumably already caused by the browser itself, not the site.
Why? I have 64 GB of RAM. Linux is using most of it to cache file system pages. I already do that kind of stuff anyway when I download videos to tmpfs. The browser should just use the memory.