This post is about the difficulties we faced in performing a simple operation: changing the volume of a audio stream. Imagine having a group call with your Skype pals with binary volume control—zero or maximum. You could lower the volume on your speaker, but some of your friends may have low sensitivity on their microphones rendering them inaudible. This was the horror that we had to overcome. Getting volume-control to work took us down a rabbit hole of browser bugs that have spanned upwards of seven years. We did finally manage to get it working however, and this post documents our solution to this problem.
If you’ve had any significant experience in building web pages, you’re probably well-versed with browser differences. These differences are a direct consequence of the ways in which specs are implemented. On one hand, having a good choice of browsers in the market; each built on different codebases is desirable. On the other, we need to deal with these differences that pop up. One such difference that we struggled with for a long time was volume control, specifically on remote WebRTC MediaStreams in Chrome.