If web browsers want to allow playing content from DRM'd services like Netflix, they get tangled up in a bundle of regulations like the DMCA and have to use specific services like this: https://en.wikipedia.org/wiki/Widevine
At a lower level, formats like H264 are basically part of the web platform too, so you end up implementing them and that exposes you to software patent laws.
So, in practice: Yes, there are laws browsers must adhere to. If you're willing to strip a bunch of features out of your browser and you live in a country with a less awful legal climate, maybe not too many laws.
For a while the US banned export of encryption if you aren't familiar with that - it impacted stuff like web browsers and resulted in people using 56-bit (!) encryption keys for things.