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

Prevent double mute status changed events #2522

Merged
merged 1 commit into from
Jul 28, 2022

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jul 13, 2022

Audio & video mute status were set in separate calls but share a
mute status changed event, so you'd always get two mute status
changed events emitted. We could suppress events where the mute
status didn't change, but this would still get two events saying
the same thing when they both changed. Instead, merge setAudioMuted
& setVideoMuted into a single call that sets either or both.

Port of #2502 from
group call branch

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

This change is marked as an internal change (Task), so will not be included in the changelog.

Audio & video mute status were set in separate calls but share a
mute status changed event, so you'd always get two mute status
changed events emitted. We could suppress events where the mute
status didn't change, but this would still get two events saying
the same thing when they both changed. Instead, merge setAudioMuted
& setVideoMuted into a single call that sets either or both.

Port of #2502 from
group call branch
@dbkr dbkr added the T-Task Tasks for the team like planning label Jul 13, 2022
@dbkr dbkr requested a review from a team as a code owner July 13, 2022 09:18
@dbkr dbkr requested review from t3chguy, weeman1337 and duxovni July 13, 2022 09:18
@dbkr dbkr changed the title Prevent double mute status changed events (#2502) Prevent double mute status changed events Jul 13, 2022
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

LGTM otherwise

* @param muted is the feed's video muted?
*/
public setVideoMuted(muted: boolean): void {
this.videoMuted = muted;
public setAudioVideoMuted(audioMuted: boolean, videoMuted: boolean): void {
Copy link
Member

Choose a reason for hiding this comment

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

Marked this as a breaking change, any chance you fancy keeping the old ones around for compatibility but just calling the new one under the hood?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is just internal js-sdk API, so shouldn't need to be a breaking change (although of course it's a public method on an object that the API consumer gets given, so they could call it, but it wouldn't really do anything useful).

Copy link
Contributor

Choose a reason for hiding this comment

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

I would argue that there could be a client that is actually using this - we have placeCallWithCallFeeds() so a client could construct its own CallFeeds and manipulate them

@SimonBrandner
Copy link
Contributor

@dbkr, I think this can be merged now?

@dbkr
Copy link
Member Author

dbkr commented Jul 28, 2022

so it can!

@dbkr dbkr merged commit 3824f65 into develop Jul 28, 2022
@dbkr dbkr deleted the dbkr/merge_audio_video_mute_dev branch July 28, 2022 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning X-Breaking-Change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants