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

Change Media Devices Mid-call #1977

Closed
wants to merge 7 commits into from

Conversation

robertlong
Copy link
Contributor

@robertlong robertlong commented Oct 12, 2021

This PR adds the ability to change media devices mid-call using the mediaHandler.setAudioDevice and .setVideoDevice methods. Calls will automatically be renegotiated for the new media. Note that this implementation attempts to use sender.replaceTrack() which avoids renegotiation. In the case where we cannot replace the existing track, it adds a new track and renegotiates the connection.

Depends on #1972

Notes:
MediaHandler.setAudioDevice and .setVideoDevice now return a promise which can be awaited to determine if setting the new device was successful.


Here's what your changelog entry will look like:

🚨 BREAKING CHANGES

Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! How plausible would it be write a test for this?

@robertlong
Copy link
Contributor Author

robertlong commented Oct 25, 2021

Yes, a test would be great and I can add one. I want to hold off on this longer though. I have some edits that I've made in my branch for GroupCalls and am still going over some bugs in Safari that may or may not be related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants