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

ref(JitsiConference): don't crash on wrong oldTrack #1709

Merged
merged 2 commits into from
Sep 13, 2021

Conversation

paweldomas
Copy link
Member

If oldTrack was not previously in the conference this will
lead to a crash in onLocalTrackRemoved where oldTrack doesn't
have muteHandler and audioLevelHandler listeners defined.

If oldTrack was not previously in the conference this will
lead to a crash in onLocalTrackRemoved where oldTrack doesn't
have `muteHandler` and `audioLevelHandler` listeners defined.
@paweldomas
Copy link
Member Author

It's either that or the method should throw a meaningful error. @saghul @jallamsetty1 WDYT?
Allowing wrong old track to not crash makes it easier to deal with corner cases from jitsi/jitsi-meet#9920

@saghul
Copy link
Member

saghul commented Sep 11, 2021

Maybe we can just print a warning as in "this may be fine if you know what you're doing"

// First do the removal of the oldTrack at the JitsiConference level
if (oldTrack) {
if (oldTrackBelongsToConference) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we print an error if the oldTrack is not null and it doesn't belong to the conference ?

@paweldomas paweldomas merged commit 64cdf69 into master Sep 13, 2021
@paweldomas paweldomas deleted the crash-wrong-old-track branch September 13, 2021 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants