3 ms·
> The average JavaScript library for handling video resolutions and full-screen mode switching is about 600 KB Wow, really? You can write a full HTTP 1.0 serve
by lionkor 5y ago
> The average JavaScript library for handling video resolutions and full-screen mode switching is about 600 KB
Wow, really? You can write a full HTTP 1.0 server in a 15th-20th of that.
- hunterb123 5y agoAll of VideoJS is 158KB so I doubt it. I can't see those two interactions needing that much code. edit: that's gzipped, but still, less than 600KB w/ many more features.
- d2wa 5y ago551.87 KB https://vjs.zencdn.net/7.15.4/video.min.js https://vjs.zencdn.net/7.15.4/video.min.js plus 56.14 KB https://vjs.zencdn.net/7.15.4/video-js.css https://vjs.zencdn.net/7.15.4/video-js.css
- lewispollard 5y agoI don't know anything about video.js in particular, but many libraries are huge when served from a CDN because they have to account for every possible use case, as well as every locale, whereas in a local build with tree shaking and modular imports, it can be cut down by quite a lot. Depends on how "legacy" the codebase is, though.
- hunterb123 5y agoTrue, the CDN size is 158KB gzipped, but it's still under 600KB unpacked. The point is that's for a feature packed video lib which also covers resolution handling (not sure if it handles fullscreen resolution changing, but I don't see why they wouldn't.)
- lucideer 5y agoThis seems massively exaggerated. Likely referring to just one they checked which maybe does many other things. Or is just horribly written. Be nice if that line was cited.
- acdha 5y agoThe one I’m most familiar with has a lot of legacy code duplicating features which didn’t used to be built-in: when we had to support IE, having a Flash fallback, subtitle parser, etc. made more sense and they built a branded UI with custom themes, and tracking, of course. If you are just doing standard video playback, something like video.js is an order of magnitude less code (on the order of 50KB minimized + gziped).