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

Call with WebRTC support #611

Closed
19 tasks done
bmarty opened this issue Oct 9, 2019 · 30 comments
Closed
19 tasks done

Call with WebRTC support #611

bmarty opened this issue Oct 9, 2019 · 30 comments
Assignees
Labels
A-VoIP X-Needs-Design May require input from the design team Z-riotx-go-live
Milestone

Comments

@bmarty
Copy link
Member

bmarty commented Oct 9, 2019

THE CURRENT DESCRIPTION IS WIP

Introduction

WebRTC implementation supports voice and video calls in direct rooms which have only 2 joined members.

Requirements

  • 1. Show voice and video call icons as menu actions in RoomDetailFragment only if the room is direct and has 2 joined members.

  • 2. Start a foreground service for both incoming and outgoing calls.

  • 3. Show heads-up notification for incoming calls with userId of the caller as title, call type as description, "Answer" and "Reject" buttons as actions.

  • 4. Show heads-up notification for outgoing calls with userId of the callee as title and "Calling..." as description.

  • 5. Change the title of the notifications as "Ongoing Call" as soon as the connection established.

  • 6. Notification (or CallActivity) should be visible even on the lock screen.

  • 7. Show CallActivity when the outgoing call started and incoming call answered.

  • 8. Ongoing call has to continue even if CallActivity is destroyed by the user.

  • 9. Show CallActivity with the representation of the current call state when the user clicks the notification.

  • 10. Voice Call: Show hangup, mute, speaker buttons and the avatar of the participant on CallActivity.

  • 11. Video Call: Show hangup, mute, switch camera, turn off camera buttons and camera streams of both other participant and the current user on CallActivity.

  • 12. Automatically send hangup (busy) to the second incoming call if there is an ongoing call.

  • 13. Play sounds for ringing, ring back and hangup events.

  • 14. Send local ice candidate events to the room.

  • 15. Refresh turn server periodically.

  • 16. RiotX should not ring when performing an initial sync. It should handle still valid incoming call (regarding age and lifetime) properly though

  • 17. RiotX should behaves correctly if the incoming call is answered on another device.

  • 18. RiotX should ask for permission BEFORE starting on outgoing call (it's a bug currently). For incoming call, if the user denies the permission request, it should reject the call.

  • 19. m.call.candidates events should be hidden by default in the timeline

@bmarty bmarty added this to the Phase 2 milestone Oct 9, 2019
@bmarty bmarty added the A-VoIP label Oct 9, 2019
@RuralYak
Copy link

This is a showstopper for switching from Riot-android

@lanerussell
Copy link

This is a showstopper for switching from Riot-android

I agree; could we get the appropriate showstopper tag added here?

@T-bond
Copy link

T-bond commented Feb 4, 2020

I also agree. The only reason keeping Riot on my phone to be able to manage calls/video conferences.

@532910
Copy link
Contributor

532910 commented Feb 16, 2020

It should use TelecomManager if I understood everything correctly.

@rajil
Copy link

rajil commented Apr 6, 2020

For video conference, can we get an option to specify our own Jitsi server instead of hardcoding https://jitsi.riot.im/

@Thatoo
Copy link

Thatoo commented Apr 8, 2020

For video conference, can we get an option to specify our own Jitsi server instead of hardcoding https://jitsi.riot.im/

I believe that 1 to 1 calling is not using jitsi, it's webrtc peer to peer

@rajil
Copy link

rajil commented Apr 8, 2020

@Thatoo agreed. I hope both p2p and Jitsi will land on RiotX. For Jitsi, the riot-web already allows one to use their own self-hosted jitsi server. The mobile support is being requested here.

@KuenzelIT
Copy link

@Thatoo agreed. I hope both p2p and Jitsi will land on RiotX. For Jitsi, the riot-web already allows one to use their own self-hosted jitsi server. The mobile support is being requested here.

This would be very nice since it currently prevents our company from using matrix/riot.

@almereyda
Copy link

I also understand this issue to cover the WebRTC peer-to-peer calling within Riot.

There's an independent issue for Jitsi integration at #43

@floflodu34
Copy link

floflodu34 commented Apr 26, 2020

I believe that 1 to 1 calling is not using jitsi, it's webrtc peer to peer

I personnaly have a Matrix serveur and would like to configure jistsi server on app toi pls

@schiessle
Copy link

schiessle commented Apr 26, 2020

Especially in the current situation where people work more from home as before and can't meet their relatives in real life I think this becomes a really important feature. RiotX is otherwise already so much better then the "old" Android app that I really don't want to switch back just to have the video/audio call functionality.

Maybe it would make sense to re-priorities this feature because of the special situation we are living?

@ghost
Copy link

ghost commented Apr 26, 2020

It would be great to develop this feature as a priority, especially in this period of containment where video calls are increasingly used...
It would be a good idea if it could support at least 4 users before switching to a Jitsi solution!

@nadonomy nadonomy added the X-Needs-Design May require input from the design team label Apr 28, 2020
@MatMaul
Copy link
Contributor

MatMaul commented May 1, 2020

I began porting the WebRTC code from Riot not X 2 weeks ago. It is not finished at all but since there is some activity around it I am pushing it here so the job doesn't get done twice.

This was done in Java so it is easy to diff with the original code for now, it would probably be nice to autoconvert that to Kotlin before the final merge.

https://github.com/MatMaul/riotX-android/tree/webrtc-wip

@ghost
Copy link

ghost commented May 1, 2020

Amazing, thank you very much for this work !
This will undoubtedly be a much-used feature! How many people will be able to be on the same call?

@532910
Copy link
Contributor

532910 commented May 1, 2020

@MatMaul, and all who are involved. Please implement personal calls with TelecomManager. The same as Koler does.

@nadonomy
Copy link

nadonomy commented May 6, 2020

@niquewoodhouse this is just for 1:1 calls. For now I wouldn't concentrate on how to place the calls themselves, but would focus on the following:

Calls

  • Consider metadata to show during the call; the other persons avatar/name/user id, call duration etc
  • Consider extra states (e.g. while waiting for the other user to answer)
  • Button to switch camera
  • Mute mic on/off toggle
  • Video on/off toggle
  • Change audio source? (Could load a bottom sheet with a list to select from?)
  • Switch between SD/HD, perhaps behind some kind of contextual interaction
  • A back/minimise button to hide the call and go back to Riot

Resume call

  • Use a [Resume call] toast if a call is ongoing but minimised
  • Consider useful metadata to expose
  • Consider placement, e.g. is it OK to occlude the main navigation

Legacy devices

@532910
Copy link
Contributor

532910 commented May 6, 2020

Please, I'm begging you, the calls MUST be able to take and release with a bluetooth headset button!

@532910
Copy link
Contributor

532910 commented May 6, 2020

A back/minimise button to hide the call and go back to Riot

call should be spawned in a separate window, system back should bring you to the original riot screen, no separate back button required

@Graphicscore
Copy link

Graphicscore commented May 8, 2020

I would be really happy if this feature lands in RiotX soon, I feel like the current version of RiotX already is far more responsive and awesome to use than the current Riot Version. I would love to migrate as soon as possible.

PS: What is the label need-design and is there an ETA for this ? 😅

@abdullasharapov
Copy link

RiotX is now better than Riot. Really lacking is just the ability to call. Please make every effort in this direction, I consider one of the most necessary functions

@sruggier
Copy link

I don't speak for this project, but as a general point of etiquette, I'd suggest you use the thumbs up reaction to vote for the issue instead of leaving comments, which spam every other person who is interested in following an issue. Developers can sort issues based on which ones had the most reactions, so it's a much more useful and friendly way to show your support.

If you're demanding specific features that aren't already implemented in Riot, it would be better to file those as separate issues. I think having feature parity sooner is more important than implementing new stuff on top while we all wait. Also, remember that if you haven't paid anyone to hack on this project, all you can do is politely make suggestions, you're not entitled to outright demand anything except a full refund of your payment, or lack thereof. 😉

@532910
Copy link
Contributor

532910 commented May 25, 2020

On the one hand I completely agree with @sruggier, on the other --- I fully understand @abdullasharapov. I think that the main matrix ecosystem strength is that it's not only a protocol but also a reference implementation of it. That's why jabber never will be usable --- there are no server and clients for all main platforms with the same set of supported extensions. In other words, I believe that keeping the entire ecosystem in sync is one of the top priorities. And as I see it is, except of riot-android/riotX, that I hope will catch it up soon.

@Kommynct
Copy link

Kommynct commented Jun 14, 2020

Should there really be a button to go back to riot?

Why hide riot in the first place just for a call? I understand for video, but why bother doing that instead of just putting the buttons at the bottom over where you message others?

Working IT I have found many people are confused by calls in that they think their smartphone can't do both a call and something else at the same time, because of this antiquated way of doing things.

@532910
Copy link
Contributor

532910 commented Jun 14, 2020

  1. What about call holding and merging?

@notramo
Copy link
Contributor

notramo commented Jun 16, 2020

Should there really be a button to go back to riot?

Why hide riot in the first place just for a call? I understand for video, but why bother doing that instead of just putting the buttons at the bottom over where you message others?

Working IT I have found many people are confused by calls in that they think their smartphone can't do both a call and something else at the same time, because of this antiquated way of doing things.

For voice call without video, it would be practical to do it similarly as Riot Web/Desktop. It should show a panel with hangup, speaker, and mic mute buttons, sticking to the top of the composer. The chat timeline and composer should be available without pressing any buttons. The "ongoing call" bar should be visible everywhere (e.g. sticking to the top/bottom of screen when viewing contact list, or app settings).

@532910
Copy link
Contributor

532910 commented Jun 16, 2020

There should be an audio source seletion button instead of the just speaker button.

@BillCarsonFr
Copy link
Member

BillCarsonFr commented Jun 17, 2020

@MatMaul, and all who are involved. Please implement personal calls with TelecomManager. The same as Koler does.

It will be done in a second PR, because we have to do without it anyway for devices with no or limited support of telecom manager

@rajil
Copy link

rajil commented Jun 20, 2020

The screen should get unlocked when a call is received. This is what Whatsapp does and gives user a better experience. Related bug reports this and this.

@BillCarsonFr
Copy link
Member

fixed by #1416

@532910
Copy link
Contributor

532910 commented Jun 22, 2020

@MatMaul, and all who are involved. Please implement personal calls with TelecomManager. The same as Koler does.

It will be done in a second PR, because we have to do without it anyway for devices with no or limited support of telecom manager

Should a separate issue be opened for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-VoIP X-Needs-Design May require input from the design team Z-riotx-go-live
Projects
None yet
Development

No branches or pull requests