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

Video Call doesn't hang up when camera is not available #17975

Closed
b0ngi opened this issue Jul 13, 2021 · 15 comments · Fixed by matrix-org/matrix-js-sdk#1972
Closed

Video Call doesn't hang up when camera is not available #17975

b0ngi opened this issue Jul 13, 2021 · 15 comments · Fixed by matrix-org/matrix-js-sdk#1972
Assignees
Labels
A-VoIP O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@b0ngi
Copy link

b0ngi commented Jul 13, 2021

Description

When receiving a video call on a PC without webcam the call ends on the receiving side with "Unable to access webcam / microphone" (throwing an "Uncaught (in promise) DOMException") and continues on the calling side.

Steps to reproduce

  • create DM with user who has no webcam
  • start video call
  • Receiver: Accept call
  • Receiver: Error message is displayed
  • Caller: Video call is still active an ringing

I would expect the video call at least to stop on both sides (calling and receiving). Ideally, the call would start without video feed if no webcam is found.

Logs being sent: yes

tempsnip

Version information

  • Platform: web

For the web app:

  • Browser: Chrome 91.0.4472.124, Firefox 89.0.2
  • OS: Window, Android, Arch Linux, Ubuntu
  • URL: connect.assigndmb.com (private server), Element version 1.7.32
@b0ngi b0ngi added the T-Defect label Jul 13, 2021
@SimonBrandner
Copy link
Contributor

This is debatable since you might want to give other devices a chance to answer the call/give the user a chance to connect their microphone instead of hanging up the call

@SimonBrandner SimonBrandner added A-VoIP X-Needs-Design X-Needs-Info This issue is blocked awaiting information from the reporter labels Jul 13, 2021
@b0ngi
Copy link
Author

b0ngi commented Jul 13, 2021

Yes, I fully agree.

I think either both sides should terminate the call or both sides should engage in the call.
Right now if someone calls me I cannot even call back with a voice call immediately, since a call is currently placed 😅.

I would really appreciate if you are able to fix this issue. I'm currently trying to find my way through the matrix-react-sdk but I'm not really familiar with react and typescript.

Thanks

@SimonBrandner
Copy link
Contributor

With trying to follow what I wrote in #17975 (comment) would it make sense to you to let the call keep ringing if Element fails to access the camera/mic...?

@b0ngi
Copy link
Author

b0ngi commented Jul 14, 2021

Yes, that seems like a good solution. Then the receiver would have the change to plugin the device or decline the call which would also end the call on the callers side.

@SimonBrandner SimonBrandner removed the X-Needs-Info This issue is blocked awaiting information from the reporter label Jul 14, 2021
@SimonBrandner
Copy link
Contributor

Partially related to #12646

@kittykat kittykat added O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround labels Aug 26, 2021
@kittykat kittykat added S-Major Severely degrades major functionality or product features, with no satisfactory workaround and removed S-Critical Prevents work, causes data loss and/or has no workaround labels Aug 26, 2021
@kittykat
Copy link
Contributor

kittykat commented Aug 26, 2021

S-Critical because the workaround is to ask the other person to end the call. O-Intermediate because it is likely to happen to everyone who hasn't allowed browser to access camera and some people with desktops.

Needs design confirmation that the solution is to keep the call ringing while showing the error message.

@SimonBrandner SimonBrandner removed the P2 label Aug 26, 2021
@SimonBrandner SimonBrandner self-assigned this Aug 26, 2021
@daniellekirkwood daniellekirkwood added the X-Needs-Product More input needed from the Product team label Oct 5, 2021
@novocaine novocaine added this to the App Team 1.9.2 milestone Oct 5, 2021
@jakewb-b
Copy link

jakewb-b commented Oct 8, 2021

From a product perspective, I agree that the preferred solution is to keep the call ringing and give the recipient the chance to either:

  • Decline the call
  • Accept the call with no camera
  • Connect a camera and then accept the call

Anyone see any issues with that approach?

@SimonBrandner
Copy link
Contributor

Decline the call

Reject (the user won't be able to answer on other devices) or hangup (the user will still be able to answer on other devices)?

Accept the call with no camera

I think we should be able to do that

Connect a camera and then accept the call

I am not sure I understand how would that work?

@jakewb-b
Copy link

jakewb-b commented Oct 8, 2021

Good questions:

I would say 'reject' not 'hangup'. We'd need to look at the design but, logically, if someone calls and I press a red button, I don't expect the call to keep ringing on other devices.
But additionally, if we fix this so that the call doesn't fail, but rings while I decide what to do, it should also be possible for me not to reject the call but to accept it on a different device, that does have a camera connected.

Connect a camera and then accept the call: This is in no way a must-have, but in theory the following flow should be possible:

  • I receive a video call, but my camera is not connected
  • Some kind of message is displayed alerting me that my camera is not connected, and giving me the option to accept the call as voice-only or reject the call
  • But, I have an external camera and maybe I just forgot to connect it, so now I plug that in and my computer detects it.
  • I should now be able to accept the video call.
    I think that flow probably requires some design thought in terms of what the alerts look like at each stage. But does that sound feasible?

@SimonBrandner
Copy link
Contributor

SimonBrandner commented Oct 8, 2021

Connect a camera and then accept the call

Hmm, to be honest, that sound unnecessarily complex when we could just figure out call upgrades and let the user upgrade the call after answering. It feels like presenting a dialog such as this could be a bit annoying

My personal favourite is to accept without a camera as letting the call ring while you connect a camera feels rather weird in my mind - a pressure is put on you to be quick

@jakewb-b
Copy link

jakewb-b commented Oct 8, 2021

My personal favourite is to accept without a camera as letting the call ring while you connect a camera feels rather weird in my mind

I agree that sorting out call upgrades would remove the problem, but even if we had call upgrades, I would still want the ability to connect a camera before accepting the call. If I've disconnected my camera and all I have to do is plug it in and then accept the call, it feels odd to force me to accept the call first.
Equally, if we don't yet have call upgrades, then at least offering people the option to connect a camera and accept as a voice call seems to give them more choices.

Just to note - it doesn't have to be a dialogue. This could be handled purely through some nice UI on the call acceptance, such as a green 'phone' button changing to a green 'camera' button when I plug the camera in.

This use case is secondary though. I think the priority is to fix the flow so they have the option to reject the call, accept on a different device, or accept as voice-only. If we can sort that, then we can look at a) upgrading the call or b) adding a camera before accepting or c) both options.

@SimonBrandner
Copy link
Contributor

SimonBrandner commented Oct 8, 2021

I would still want the ability to connect a camera before accepting the call. If I've disconnected my camera and all I have to do is plug it in and then accept the call, it feels odd to force me to accept the call first. Equally, if we don't yet have call upgrades, then at least offering people the option to connect a camera and accept as a voice call seems to give them more choices.

You have that already, it's just that if you try to accept the call hangs up (though you can still answer elsewhere). I wasn't arguing for removing that. I am just saying if you try to answer a call without a camera it makes sense to make it a voice call from your side, imo

@jakewb-b
Copy link

jakewb-b commented Oct 8, 2021

You have that already, it's just that if you try to accept the call hangs up (though you can still answer elsewhere). I wasn't arguing for removing that. I am just saying if you try to answer a call without a camera it makes sense to make it a voice call from your side, imo

Ah sorry, I see what you mean - I misunderstood the point at which the error message is displayed.
Yes, I agree that the simplest approach in that case is that if they click accept without a camera attached it simply becomes a voice call from their side.

@SimonBrandner
Copy link
Contributor

Ah sorry, I see what you mean - I misunderstood the point at which the error message is displayed.
Yes, I agree that the simplest approach in that case is that if they click accept without a camera attached it simply becomes a voice call from their side.

No worries and great! I am quite busy atm but hopefully, I should have time to do this over the weekend, should I or do you want to discuss this further with other designers before I start working on it?

@jakewb-b
Copy link

jakewb-b commented Oct 8, 2021

No worries and great! I am quite busy atm but hopefully, I should have time to do this over the weekend, should I or do you want to discuss this further with other designers before I start working on it?

Thanks. I don't think this needs additional design input, based on what we've discussed above, so happy for you to work on it if you have time. Thank you for the help!

@SimonBrandner SimonBrandner removed X-Needs-Design X-Needs-Product More input needed from the Product team labels Oct 8, 2021
su-ex added a commit to SchildiChat/matrix-js-sdk that referenced this issue Oct 25, 2021
* Use `ICallFeedOpts` in the `CallFeed` constructor. To construct a new `CallFeed` object you have to pass `ICallFeedOpts` e.g. `const callFeed = new CallFeed({client ([\matrix-org#1964](matrix-org#1964)). Contributed by [SimonBrandner](https://github.com/SimonBrandner).
* Make threads use 'm.thread' relation ([\matrix-org#1980](matrix-org#1980)).
* Try to answer a call without video if we can't access the camera  ([\matrix-org#1972](matrix-org#1972)). Fixes element-hq/element-web#17975 and element-hq/element-web#17975. Contributed by [SimonBrandner](https://github.com/SimonBrandner).
* Make `opts` in `importRoomKeys()` optional ([\matrix-org#1974](matrix-org#1974)). Contributed by [SimonBrandner](https://github.com/SimonBrandner).
* Enable TypeScript declaration maps ([\matrix-org#1966](matrix-org#1966)). Contributed by [Alexendoo](https://github.com/Alexendoo).
* Fix `requestVerificationDM` with chronological `pendingEventOrdering` ([\matrix-org#1943](matrix-org#1943)). Contributed by [freaktechnik](https://github.com/freaktechnik).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-VoIP O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants