Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] How to mute loud speaker output audio in speaker devices? #269

Open
tashikrispcall opened this issue May 27, 2024 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@tashikrispcall
Copy link

Can we directly set device.audio.speakerDevices to undefined to achieve this ? or is there a proper work around ?
image

@tashikrispcall tashikrispcall added the enhancement New feature or request label May 27, 2024
@charliesantos
Copy link
Collaborator

Hi @tashikrispcall , thanks for reaching out! Are you trying to mute these sounds? https://www.twilio.com/docs/voice/sdks/javascript/twiliodevice#deviceoptionssounds-properties-and-default-sounds

Or are you trying to mute the audio of the remote party? For example, if Alice calls Bob, are you trying to mute Bob?

@tashikrispcall
Copy link
Author

Hi @charliesantos , yes, I'm trying to mute the audio of the remote party i.e. if I'm in call with Bob, I'm trying to mute Bob.

@charliesantos
Copy link
Collaborator

There is no mute API for remote party at the moment. However, you can get the remote stream using call.getRemoteStream(). This is a MediaStream object that you can use to mute the audio track. For example

call.getRemoteStream().getAudioTracks().forEach(track => track.enabled = false);

@tashikrispcall
Copy link
Author

Thanks, I'll try implementing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants