https://developer.android.com/guide/topics/media/media-forma...
https://developer.apple.com/documentation/http_live_streamin...
Does anyone know why it isn't possible to add codecs to the browser?
Mozilla famously relied on Cisco to gain h.264 playback, because the patent included a certain maximum total price you needed to pay after exceeding a certain amount of devices. Cisco exceeded that amount, so any additional devices they supported were practically free, and they released a free h.264 decoder plugin for Firefox. The pricing loophole has been removed out of h.265 so a Mozilla decoder would cost them a lot of money.
In theory you could add codecs to your browser just fine, but Mozilla has already indicated it's not planning on adding h.265 to their browser, focusing on AV1 support instead.
Perhaps Mozilla would welcome patches to allow forwarding h.265 streams to the OS for decoding, like Chrome does, but they're not going to put the effort in themselves. With hardware AV1 decoding finally on the rise, I don't think that's a bad decision necessarily, companies and websites opting for the patent ridden format over the open format knew what they were doing.
No, they didn't. OpenH264 only supports Constrained Baseline profile, and is only useful for WebRTC. It's used system libraries/frameworks for H.264 video playback since long before OpenH264 came around.