Description:
Hi, I'm Bob. I'm working on a Twilio-based application where I receive calls from Alice, and I want to be able to control the volume of Alice's audio during the call. Specifically, I'd like to add a slider in my application that allows me to increase or decrease the volume of the incoming audio stream.
What I've Tried:
call.on('audio', (audio: HTMLAudioElement) => {
setCurrentAudio(audio);
audio.volume = 0.5; // But this has no effect on the volume of the incoming call
});
I also tried retrieving the remote stream and using an AudioContext to control the volume via a GainNode. However, this approach seems to create a duplicate media stream rather than controlling the volume of the existing one:
What I Want:
I want to implement a slider control in my application that allows me to dynamically adjust the volume of the incoming audio during a call with Alice. However, I'm unable to figure out how to achieve this, as modifying the audio element's volume property doesn't seem to work.
Any guidance on how to implement this volume control would be greatly appreciated!
Thanks for reaching out @gabrielSoudry . Unfortunately, we currently do not expose this functionality. Your current approach to use AudioContext and GainNode is the best option for now.
Description: Hi, I'm Bob. I'm working on a Twilio-based application where I receive calls from Alice, and I want to be able to control the volume of Alice's audio during the call. Specifically, I'd like to add a slider in my application that allows me to increase or decrease the volume of the incoming audio stream.
What I've Tried:
I also tried retrieving the remote stream and using an AudioContext to control the volume via a GainNode. However, this approach seems to create a duplicate media stream rather than controlling the volume of the existing one:
What I Want: I want to implement a slider control in my application that allows me to dynamically adjust the volume of the incoming audio during a call with Alice. However, I'm unable to figure out how to achieve this, as modifying the audio element's volume property doesn't seem to work.
Any guidance on how to implement this volume control would be greatly appreciated!