Start CallEventHandler and GroupCallEventHandler if isVoipWithNoMediaAllowed is set to true#5108
Conversation
…Allowed is set to true. Signed-off-by: Alfred Jophy <alfredjophy@pm.me>
dbkr
left a comment
There was a problem hiding this comment.
Leaving it to VoIP to works out if this is desired, although I find it confusing that you'd still start Call Event Handlers sometimes even if disableVoip was passed. It feels like we're re-using existing flags to do something else. This definitely feels like something I'd expect docs for, and most certainly tests.
There was a problem hiding this comment.
Hi there, am speaking for the VoIP team: I agree with Dave that isVoipWithNoMediaAllowed is not really an appropriate flag to use for overriding the disableVoip flag or bypassing the WebRTC support checks. The flag exists for cases where the JS runtime does support WebRTC and you want to join a call, but there happen to be no media devices attached to the computer.
Unfortunately I don't think I would be comfortable with exposing the call handlers in general when WebRTC support is missing, since the MatrixCall class lumps together the externally visible state of a call and methods to participate in a call (which will crash in environments without WebRTC) together by design. I'm open to proposals, but I believe the WebRTC code would need to be separated cleanly from the rest before that would make sense, and that's a big task.
Meanwhile, our team is working on developing MatrixRTC, the next-gen VoIP system for Matrix, which is used by Element Call, Element Web if configured, and the Element X mobile apps. Is there any chance that switching to MatrixRTC is possible already for your particular use case? I bring this up because matrix-js-sdk does provide information about MatrixRTC sessions through MatrixClient.matrixRTC, regardless of WebRTC support. This would be more readily usable on the server.
|
Yes thanks for the reply. I do agree the flag might not be really meant for this. Ill be using a private flag for this |
Start CallEventHandler and GroupCallEventHandler when
isVoipWithNoMediaAllowedis set to true. This lets you use the SDK on the server for managing calls.