logoalt Hacker News

2OEH8eoCRo0 • today at 1:02 PM • 7 replies • view on HN

Why do browsers need to support every media format? Why can't it be shipped as a shared library for the whole system to use?


Replies

EvanAnderson • today at 2:22 PM

> Why can't it be shipped as a shared library for the whole system to use?

Flashbacks to DataTypes on the Amiga: https://wiki.amigaos.net/wiki/Datatypes_Library

➕ show 1 reply
burnte • today at 2:50 PM

This way browser vendors control what their app supports, and won't have something break because a user doesn't have a library.

alwillis • today at 1:37 PM

> Why can't it be shipped as a shared library for the whole system to use?

That's how it works on macOS; the bundled apps (Preview, Photos, etc.) gained support for JPEG XL.

lxgr • today at 1:26 PM

Given that there are more operating systems than browser engines these days, I'm not sure this would be an unequivocal win.

➕ show 1 reply
code_duck • today at 1:07 PM

Google seems to prefer reimplementing every portion of an OS possible in Chrome.

➕ show 1 reply
looperhacks • today at 1:12 PM

But it is a shared library? It's used in both Chrome and Firefox.

➕ show 1 reply
echelon • today at 1:29 PM

Such an important piece of software does not want to subject itself to the packaging and support woes of shared libraries. There are security issues, maintainability issues, and much more headache by going with that approach.

Static linking is one and done, headache gone. People have large drives these days, so it's not a problem.

There are areas where the browser will dynamically link, but those are more OS-related than image and file format codecs.