matrix-org / matrix-org/matrix-js-sdk
Group call "PTT" is ambiguous in meaning
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.2k
- Forks
- 704
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 40
Description
https://github.com/matrix-org/matrix-js-sdk/blob/7d45947fb3dc4b0e291e03adac5348ad8eeaf32a/src/webrtc/groupCall.ts#L287
I'm currently looking at how other JS-based clients would implement group calling in matrix-js-sdk and I'm seeing a potential source of confusion for implementors around "PTT".
The meaning of "PTT" for "Walkie-Talkie Mode" as [described in this blog post for Element Call](https://element.io/blog/element-call-beta-2-encryption-spatial-audio-walkie-talkie-mode-and-more/) is specific to a client mode of operation, but PTT outside of a walkie-talkie context has a different meaning. In many VOIP clients (Discord, Zoom, Mumble etc), using Push-to-Talk has nothing to do with the _type_ of call but is instead a user preference where the client will not transmit audio unless a key is held, irrespective of _others_ in the call using PTT. That feature wouldn't need clients to specify or observe `io.element.ptt` in the call state.
When using `createGroupCall` or constructing a `GroupCall` object, however, the parameter to enable this "walkie talkie mode" in clients that would support it is called `isPtt`.
From an API perspective, I think this should:
1. Somehow be a separate extension when making a group call object in this API, and
2. Use a clearer name (i.e. walkie-talkie mode is perfectly specific) that doesn't overlap with other uses of the term PTT.
That is to say, if this should even be part of matrix-js-sdk at all, since it's a namespaced extension. Is there a way that a client can attach and observe the additional `io.element.ptt` key on the state without it being a mandatory parameter in group call construction?
Furthermore, the requirement to _disallow_ unmuting while another user is not muted is something the user interface has to implement. This isn't clearly indicated anywhere in this API yet, and could be a source of call disruptions if a participant uses a client that does not support this correctly (i.e. forcing other participants to mute themselves indefinitely because the joiner doesn't mute-by-default).
There is a use case in having "mandatory" PTT in a call but _not_ requiring one-speaker-at-a-time semantics, too, which is a commonly used feature in large group calls on Discord and Mumble. Similarly there is an option in Zoom to require all joining participants of a conference to mute-by-default. Both are probably outside the scope of this issue, but maybe some food for thought.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/webrtc/groupCall.ts#L287 and trace createGroupCall, the GroupCall constructor, and handling of the io.element.ptt state key. Clarify whether walkie-talkie mode belongs in this API, what name and extension boundary it should use, and how unsupported clients should behave; done requires an agreed design for these questions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, audio-video-rtc
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100