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

Remove old tracks before adding/replacing new ones in janus.js #3203

Merged
merged 1 commit into from Apr 27, 2023

Conversation

lminiero
Copy link
Member

When we implemented #3003 in janus.js, we made it so when adding/replacing new tracks, we'd first capture the new track and only after that we'd remove the old one: actually, when doing replace: true, the previous track would not be removed at all. Apparently this caused problems on some devices, e.g., as reported in #3201.

This patch tries to address that, by removing a track before it's updated. We had a FIXME in there since this may cause problems, as with this change there could be some time in between a track is removed and then replaced when nothing is added. As such, I'm providing this as a PR: please test and ensure it doesn't cause regressions or problems, as I plan to merge soon if it fixes the problem.

@lminiero lminiero added the multistream Related to Janus 1.x label Apr 24, 2023
@rjnpnfigueiredo
Copy link
Contributor

With this code change Android has the correct behavior and has not introduced any issues on other platforms as far as I can test.

@lminiero
Copy link
Member Author

Ack, merging then 👍

@lminiero lminiero merged commit 013155d into master Apr 27, 2023
8 checks passed
@lminiero lminiero deleted the janusjs-rm1st branch April 27, 2023 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multistream Related to Janus 1.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants