galene icon indicating copy to clipboard operation
galene copied to clipboard

Enhancement for audio sliders

Open castagnag opened this issue 4 years ago • 2 comments

Hi,

when a conference starts all the audio sliders are at full throttle. This means that if you are in a conference with N participants and one of them has an audio volume much lower than the others, then you have to lower the audio on N-1 participants and increase the overall volume

would it possible to start with all the audio sliders at half throttle so that in the previous case we can just increase the volume of the single problematic participant please

TIA

Beppe

castagnag avatar Jan 15 '21 11:01 castagnag

Here's a summary of the discussion on the maling list.

  1. HTMLMediaElement.volume, which is what the volume slider controls, does not go higher than 100%; https://xkcd.com/670/
  2. a simple workaround would be to make the videos start at 70% volume, but that would mean that Galène is less loud than other applications, which could be annoying;
  3. a different UI is therefore needed, such as a global slider that controls all videos' volumes; it's not clear (at least to me) what this UI should look like.

jech avatar Jan 23 '21 12:01 jech

HTMLMediaElement.volume does no go above 100%, but actually the client could route audio through an AudioContext to allow for over-amplification. Is this something that Galène would like to include ?

// Create audio context with a gain node to over-amplify to 120%
const audioCtx = new AudioContext();
const gainNode = audioCtx.createGain();
gainNode.gain.value = 1.2;

// Connect input and output
audioCtx.createMediaElementSource(videoElement).connect(gainNode);
gainNode.connect(audioCtx.destination);

I haven't tested that, but it should work according to https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API.

erdnaxe avatar Mar 21 '21 09:03 erdnaxe