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

Don't allow user to unmute if another user is speaking #2313

Merged
merged 4 commits into from
Apr 22, 2022

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Apr 21, 2022

Based on #2312
For element-hq/element-call#298


Here's what your changelog entry will look like:

✨ Features

  • Don't allow user to unmute if another user is speaking (#2313).

dbkr added 2 commits April 21, 2022 11:49
on sender side by muting mic after the max transmit time has elapsed.
@dbkr dbkr requested a review from a team as a code owner April 21, 2022 13:33
@dbkr dbkr merged commit cc60492 into dbkr/ptt Apr 22, 2022
@dbkr dbkr deleted the dbkr/ptt_block_if_other_user_speaking branch April 22, 2022 16:09
// if anoher user is currently unmuted, we can't unmute
if (!muted && this.userMediaFeeds.some(f => !f.isAudioMuted())) {
throw new OtherUserSpeakingError();
}
Copy link
Contributor

@MadLittleMods MadLittleMods Apr 25, 2022

Choose a reason for hiding this comment

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

This seems susceptible to ping response time races? If multiple people unmute at the same time, they all would be allowed.

@@ -408,6 +414,12 @@ export class GroupCall extends EventEmitter {

// set a timer for the maximum transmit time on PTT calls
if (this.isPtt) {
// if anoher user is currently unmuted, we can't unmute
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems a bit weird to force on everyone.

If I was using this for game callouts, I would want to interrupt the other person.

dbkr added a commit that referenced this pull request May 3, 2022
* Add PTT call mode & mute by default in PTT calls (#2311)

No other parts of PTT calls implemented yet

* Make the tests pass again (#2316)

3280394
made call use a bunch of methods that weren't mocked in the tests.

* Add maximum trasmit time for PTT (#2312)

on sender side by muting mic after the max transmit time has elapsed.

* Don't allow user to unmute if another user is speaking  (#2313)

* Add maximum trasmit time for PTT

on sender side by muting mic after the max transmit time has elapsed.

* Don't allow user to unmute if another user is speaking

Based on #2312
For element-hq/element-call#298

* Fix createGroupCall arguments (#2325)

Comma instead of a colon...
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