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

[FEATURE] Ability to set a MediaStream as an input #269

Open
adamduren opened this issue Apr 5, 2021 · 2 comments
Open

[FEATURE] Ability to set a MediaStream as an input #269

adamduren opened this issue Apr 5, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@adamduren
Copy link

Is your feature request related to a problem? Please describe.
The Voice SDK is limited to selecting input devices that have a device id. While this works for most cases it would be great if developers had the flexibility to provide a stream as an input instead of a device. In the case of our application we mix the user's mic input with an additional audio source to provide additional context about the call session.

Describe the solution you'd like
It would be ideal if AudioHelper.setInputDevice could accept a device id or a MediaStream. Alternatively add an additional method AudioHelper.setInputStream. It appears the the device id is only used to build constraints to getUserMedia. The device does not appear to be used as well outside of automated testing from what I can tell.

I have tested this by forking the library and adding a method device.audio.setInputStream based on the implementation of AudioHelper._setInputDevice. I confirmed that it works as expected. Would be open to contributing this back to Twilio if a maintainer can provide a recommendation to their preferred implementation path.

Describe alternatives you've considered
I have tried to consider other solutions to achieve my desired outcome and thus far this appears to be the only path forward.

Additional context
N/A

@adamduren adamduren added the enhancement New feature or request label Apr 5, 2021
@adamduren
Copy link
Author

PR #271 is my version that achieves setting the input stream.

@ryan-rowland
Copy link
Contributor

Hi Adam,
Thanks for the PR. I did leave some comments a few months ago, but haven't heard back in a while. Please let me know if you're still interested in getting this merged!

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