Repository navigation
Call someone from their Remote, as the web does - #137
Merged
Merged
Conversation
A one-to-one thread gets the web's phone button. It opens a call screen
that rings them for 45 seconds, and a call ringing for you opens the same
screen with Accept and Decline from the Log, Notifications, Remotes, your
profile or any thread, while the app is open. Once connected it shows the
web's fp code, made from both ends' keys, with mute, speaker and hang up.
The two ends swap a WebRTC offer and answer through the signed API's new
call endpoints, then talk through the relay, so a call works whether the
other end is the web or the app. packages/calls is a NativePHP plugin
around Google's WebRTC (stream-webrtc-android, stasel/WebRTC) that sets
the call up exactly as the browser does: the microphone, room for video
and a "call" data channel whose closing means the other end hung up.
The thread now logs calls in the web's words ("you started a call",
"missed call from @ada"), naming the other person where devnull leaves
the author off, instead of a bare "* someone".
Audio only for now: a partner's camera isn't shown yet, and a call only
rings while the app is open.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the web, a one-to-one Remote can make a call from its phone button. This brings calls to the app, and they work with the web in both directions: phone to browser, browser to phone, and phone to phone.
It needs the call endpoints on the signed API from dev-null-sh/dev-null.sh#1312.
What you can do
fpcode, made from both ends' keys, with mute, speaker and Hang up. It says how a call ended ("Call ended.", "No answer.", "Missed call from @…", "Couldn't connect the call.") for 4 seconds, as the web does. Android's back button hangs up.How it works
packages/callsis a new local NativePHP plugin around Google's WebRTC (io.getstream:stream-webrtc-android,stasel/WebRTC). It sets the call up exactly as the browser does (resources/js/lib/call.tson the web):calldata channel whose closing means the other end hung upThe PHP side of the call lives in
Call. Thefpcode is worked out in PHP from both descriptions, and a test checks it against the web's own function.Limits for now
Testing
tests/Feature/Screens/CallTest.phppasses: 22 tests, 202 assertions. The thread, inbox and composer tests pass too.LogTest› "shows the following log in tab chrome" fails on my machine. It stalls for 90 seconds and the clock moves on. It fails the same way without this change.fpcode on both endsScreenshots
Android only, because of the iOS limitation above. The call screen is new, so it has no before shots.
conversation
call-ringing
Recordings of an incoming call sliding up: Android light, Android dark
call-connected