It definitely is possible to detect and, in cases where this is desirable, the lower layers do do that.
One example, I remember when Firefox added the "audio playing" tab indicator (back then it was a speaker icon, now it says "PLAYING" underneath the tab title). Initially, the indicator was on every tab that had any audio source active, even if it was silent. That was misleading, because many sites just kept an audio source handy without playing anything meaningful. Later, Firefox changed it so that the indicator would disappear during de-facto silence. You may now notice this e.g. when playing a video that has silent bits - the indicator will disappear during these bits even though the video is playing.
However, in general (not just in browsers, but overall), it may not be desirable to actually preemptively shut off the audio device based on such a detection. Not all audio hardware reinitializes itself instantaneously, and some sounds that one needs to play are meant to be short and immediate. Having a heuristic on a lower-than-application-level shut off the audio device could cause some really annoying skips, since only the application level is able to reliably determine when an active audio source is needed. Unfortunately, that also means that application developers are the ones who need to work with such resources responsibly, which is often not the case.