-
-
Notifications
You must be signed in to change notification settings - Fork 649
Add support for group calls using MSC3401 #2553
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
Merged
Merged
Changes from 250 commits
Commits
Show all changes
364 commits
Select commit
Hold shift + click to select a range
0148ad0
Group call improvements (#1985)
SimonBrandner e9b52e2
Rermove session id
robertlong 431d7a0
Merge branch 'develop' into robertlong/group-call
robertlong 8131b39
Use glare resolution to manage group call setup
robertlong 159e825
Fix unnecessary param to placeCallWithCallFeeds
robertlong 0555f9d
Only send to device messages to a single device
robertlong 305de54
Fix screensharing and webrtc races
robertlong 5110e0b
Merge branch 'develop' into robertlong/group-call
robertlong 3b0d1b2
Add check for existing group call session
robertlong b4d8c0b
Fix updating member state with no existing calls
robertlong fc8a867
Start processing member state events only after we've set out own (#2…
SimonBrandner 119ce2e
Fix inbound calls in Safari
robertlong 9f3f999
untested first cut at factoring out a encryptAndSendToDevices method
ara4n aeeed6e
clarify the factoring
ara4n 24406d2
make it build
ara4n 56c0c9b
fix example in readme
ara4n 5a83635
switch encryptAndSendToDevices to return a promise rather than use a cb
ara4n 53397ee
lint
ara4n f46355e
don't choke on missing promise
ara4n 2f09e96
chain promises correctly; log rejects
ara4n a48546f
fix the tests (thanks @turt2live!!!)
ara4n 841e6e9
handle promises normally now tests are fixed
ara4n 067ac62
lint
ara4n 32aca09
Merge branch 'to-device-olm' into robertlong/group-call
robertlong 13d62e7
Fix stopping all media streams
robertlong 923e9c4
Ensure that member call state is set correctly
robertlong 8c5f88c
Fix handling null call
robertlong 4c9648a
Sanitize call member state
robertlong d99428f
Remove duplicate call answer
robertlong 6f695c1
Ignore call call state in glare resolution
robertlong 5a92597
Check if call ended before getting user media
robertlong bdc12a2
Revert changes to gotCallFeedsForAnswer
robertlong 7998817
Send candidate queue again on finish to flush out queue
robertlong c1f56ba
Fix indentation
robertlong b253ad9
Preserve the disabled tracks when updating local usermedia stream
robertlong 17f7dc5
Keep track of original stream id for sdp stream metadata
robertlong f76f708
Ad a longer wait to safari media stream hack
robertlong 4b87907
Update local usermedia streams serially
robertlong 74c5a20
Temporarily disable safari hack
robertlong a2e255c
Merge branch 'robertlong/group-call' of github.com:matrix-org/matrix-…
robertlong f28cb48
Re-enable safari hack
robertlong 97e8fce
Clean up replacing calls for Safari
robertlong e880cec
Add restart ICE
robertlong 28da62c
Add retry call loop
robertlong 7d48a83
Don't immediately start retry call loop
robertlong 3139112
Clean up logging
robertlong 4e26f29
Add unknown device errors
robertlong c2fe2ab
Add additional logging for removing feeds/tracks
robertlong 139904f
Update sync state to error when aborting
robertlong 3291846
Merge branch 'robertlong/abort-sync-error' into robertlong/group-call
robertlong 5f06df8
Properly stop screensharing feed
robertlong 64c3ac5
Stop screenshare when screensharing track ended
robertlong 0683133
Dont start retry loop until weve sent the member state event
robertlong 96ef535
Make unknown device error more useful
robertlong d0e37ee
Hopefully resolve a race condition with missing device ids
robertlong ffbd10a
Make updateLocalUsermediaStreams stop tracks
robertlong d1a62ed
Set initial audio/video input ids
robertlong fcc4b71
Add LocalStreamsChanged event to MediaHandler
robertlong e336ace
Expose webrtc related types/props
robertlong 06d9d62
Send device id along with to device signaling messages
robertlong 549f9b7
Disable retries
robertlong bef5579
Emit sent voip events
robertlong 7993dd7
Log opponentDeviceId
robertlong f3f9e41
Emit sent voip events
robertlong 18bb5c3
Log opponentDeviceId
robertlong 87bf115
Use session ids to resolve refresh during invite/answer
robertlong c91617a
Force hangup replaced calls
robertlong 487bfc8
Merge branch 'robertlong/group-call-session-id' into robertlong/group…
robertlong 3fac6d7
Replace outbound calls only
robertlong 7529af4
Add NewSession CallErrorCode
robertlong ee995cb
Ensure call events are processed once and in order
robertlong eeacf8c
Dont filter unstable call events
robertlong d8285aa
Remove call from callEventHandler after hangup
robertlong 28f3169
Use replace error code when replacing incoming calls
robertlong 42fef0e
Add user id to all send voip events
robertlong 015eb5d
Add sender/dest session ids
robertlong 592fb0c
Re-enable retries
robertlong bbf7020
Remove log
robertlong 1a78301
Fix restartIce on FF Android
robertlong 4a4465b
Don't send candidates after the call has ended
robertlong d42e2fe
Ignore duplicate streams when adding local feeds
robertlong b4fe00a
Add answer/negotiate response promise chain
robertlong c801690
Don't reuse local call feeds that have been added to a RTCPeerConnection
robertlong d8e597c
Avoid glare
robertlong d12bccd
Remove safari hack
robertlong a2a127d
Remove unused isSafari check
robertlong 3db056a
Enable max-bundle (#2182)
dbkr fa5eae7
Log complete sync errors
robertlong 7f21f56
Process toDevice events in order
robertlong 353d6ba
Fix and add a test for toDevice ordering
robertlong 7a249e3
Switch media devices on disconnect
robertlong 0ef6c2e
Add callId to all logs
robertlong e270f07
Fix call log
robertlong 17f5ab4
Move device changes to the application. Add methods to set device ids
robertlong c819ac6
Fix updating local media streams
robertlong e68cabc
Add logging for all stream creation/cloning/muting
robertlong 49994ac
Add checks for call/groupCall ended for updateLocalUsermediaStream
robertlong 09fee4a
Allow calls to terminate properly when calling stopClient
robertlong 94c5e37
Fix import
robertlong 6e25b13
Send / add end-of-candidates messages
robertlong 2a0dc39
Fix bug with ine-way audio after a transfer (#2193)
dbkr ee4cbd1
Don't remove streams that still have tracks (#2104)
dbkr 96ba061
Fix shouldRequestAudio logging
robertlong 8d9cd0f
Support for PTT group call mode (#2338)
dbkr d82c041
Merge remote-tracking branch 'origin/develop' into robertlong/group-call
dbkr 9702e8a
Remove test 'fix'
dbkr 85a6a55
Make tests pass again
dbkr 83f61c9
Merge remote-tracking branch 'origin/develop' into dbkr/group-call-merge
dbkr f475251
Merge remote-tracking branch 'origin/develop' into dbkr/group-call-merge
dbkr f4f0555
Merge branch 'develop' into dbkr/group-call-merge
t3chguy da615fd
More setTimeout typings
dbkr acef1d7
Merge branch 'dbkr/group-call-merge' of github.com:matrix-org/matrix-…
dbkr 38e54ae
Remove PTT 'other user speaking' logic (#2362)
dbkr 87791cd
Fix races when muting/unmuting (#2370)
dbkr 942a28d
Add support for sending encrypted to-device events with OLM (#2322)
robertlong aa0d3bd
Handle other members having no e2e keys (#2383)
dbkr 18e2052
Wait for mute event to send in PTT mode (#2401)
dbkr 34ef7bc
Mute disconnected peers in PTT mode (#2421)
dbkr 5e76697
Set PTT mode on call correctly (#2445)
dbkr b97b862
Emit unknown device errors for group call participants without e2e (#…
dbkr 404f8e1
Only clone streams on Safari (#2450)
dbkr 04d0d61
Change CODEOWNERS for element-call feature branch (#2457)
turt2live 9192b87
Disable playback of audio for muted users (#2456)
dbkr 70449ea
Expire call member state events after 1 hour (#2446)
robintown df9ffdc
Don't ignore call member events with a distant future expiration date…
robintown 5b4263b
Don't block muting on determining whether the device exists (#2461)
robintown ebcb26f
Merge branch 'develop' into robertlong/group-call
robintown c89bbf4
Fix call.collectCallStats() (#2480)
dbkr f553854
Remove the feature to disable audio from muted members (#2479)
dbkr e7493fd
Enable DTX on audio tracks in calls (#2482)
robintown f9672cf
Fix some MatrixCall leaks and use a shared AudioContext (#2484)
robintown ca5ac79
Revert hack to only clone streams on safari (#2485)
dbkr 6ea2885
Remove empty decryption listener (#2486)
dbkr e980c88
Don't mute the remote side immediately in PTT calls (#2487)
robintown 9a15094
Add config option for e2e group call signalling (#2492)
dbkr bdb91b3
Set max average bitrate on PTT calls (#2499)
dbkr 984dd26
Prevent double mute status changed events (#2502)
dbkr 544b1c6
Merge develop into group call branch again (#2513)
dbkr e876482
Add local volume control (#2525)
SimonBrandner 38a6949
add missing events from reemitter to GroupCall (#2527)
toger5 9e2e144
Make SDP munging media type specific (#2526)
dbkr 8ba2d25
Add support for audio sharing (#2530)
SimonBrandner b711781
Merge remote-tracking branch 'origin/develop' into robertlong/group-call
dbkr 22c5999
Delint group calls (#2554)
SimonBrandner 2cc51e0
Merge changes from develop (#2563)
dbkr c0dacb5
Merge remote-tracking branch 'origin/develop' into robertlong/group-call
dbkr 471f174
Merge remote-tracking branch 'origin/develop' into robertlong/group-call
dbkr 88ce017
Fix return types of event sending functions (#2576)
dbkr 0b8de25
Add basic creation / entering tests for group calls (#2575)
dbkr 3334c01
Support nested Matrix clients via the widget API (#2473)
robintown 5f5a9b1
Merge branch 'develop' into robertlong/group-call
dbkr 0207431
Tidy up imports (#2584)
dbkr e8f682f
Test placing a call in a group call (#2593)
dbkr c698317
Add group call tests for muting (#2590)
SimonBrandner e4cf5b2
Add test for updateLocalUsermediaStream (#2596)
dbkr 099cac0
Merge branch 'develop' into robertlong/group-call
dbkr 2566c40
Add tests for incoming calls in group calls (#2597)
dbkr 9589a97
Test muting in PTT mode (#2599)
dbkr 448a5c9
Add screensharing tests (#2598)
SimonBrandner e95947d
Update lockfile (#2603)
robintown 45e56f8
Add `disposed` to `CallFeed` (#2604)
SimonBrandner 92cd84f
Add unit tests for hangup / reject (#2606)
dbkr e7a7ec0
Test call timeouts (#2611)
dbkr 5f9369a
Merge branch 'develop' into robertlong/group-call
dbkr be94f5e
Fix imports
dbkr 4a294c9
1:1 screenshare tests
dbkr c527f85
Revert 4a294c9dd36109233041ede34e780685c5d69801
dbkr 9e1b126
1:1 screenshare tests (#2617)
dbkr 965f4fb
Fix ICE end-of-candidates messages (#2622)
dbkr d5b82e3
Add types to the call unit test suites (#2627)
dbkr db32420
Add logging to diagnose connection issue (#2629)
dbkr 0981652
Add GroupCallEventHandlerEvent.Room (#2631)
dbkr d656b84
Wait for client to start syncing before making group calls (#2632)
dbkr 40ecfa7
Test disabling screenshare in group calls (#2634)
dbkr 0d6a93b
Refactor the group call placing calls test (#2636)
dbkr c78631b
Test that calls in a group call are retried (#2637)
dbkr aca51fd
Test call mute status set on call state chnage (#2638)
dbkr 98d119d
Add client.waitUntilRoomReadyForGroupCalls() (#2641)
dbkr fa6f70f
Log ID instead of object (#2643)
dbkr 83c8480
MediaHandler Tests (#2646)
dbkr d950cda
Merge branch 'develop' into robertlong/group-call
dbkr 60e175a
Merge branch 'develop' into robertlong/group-call
dbkr aebe26d
GroupCallEventhandler Tests (#2654)
dbkr 36a6117
Misc fixes for group call widgets (#2657)
robintown 02f6a09
Test active speaker events (#2658)
dbkr 00629e6
Test fallback screensharing (#2659)
dbkr 3711899
Add test for removing RTX codec (#2660)
dbkr 276849f
Merge branch 'develop' into robertlong/group-call
dbkr 3e1e99f
Fix import in failed merge
dbkr 41cee6f
Fix race in creating calls (#2662)
dbkr c605310
Prevent exception when muting (#2667)
dbkr 586a313
Add tests for call answering / candidate sending (#2666)
dbkr c05cb3a
Merge branch 'develop' into robertlong/group-call
dbkr f52c5eb
Unused imports from merge
dbkr 6fc9827
Add tests for ice candidate sending (#2674)
dbkr de69445
Target widget actions at a specific room (#2670)
robintown f41b770
Upgrade matrix-widget-api (and fix the lockfile) (#2676)
robintown c400dd4
Add a few new `GroupCall` tests (#2678)
SimonBrandner 72b89fd
Add test for call transfers (#2677)
SimonBrandner 72a6ec0
Add a few group call event handler tests (#2679)
SimonBrandner 2a0ffe1
Fix group call tests getting stuck (#2689)
SimonBrandner 6f7a72d
Merge remote-tracking branch 'upstream/develop' into SimonBrandner/ta…
SimonBrandner 4625ed7
Merge pull request #2695 from matrix-org/SimonBrandner/task/gc-merge
SimonBrandner a2981ef
Add `MatrixClient` group call tests (#2692)
SimonBrandner af6f9d4
Add `CallEventHandler` tests (#2696)
SimonBrandner ab39ee3
Add more `MatrixCall` tests (#2697)
SimonBrandner e48d919
Fix ICE restarts (#2702)
dbkr 9355177
Merge branch 'develop' into robertlong/group-call
robintown ce3b72c
Merge pull request #2712 from robintown/merge
robintown c0a5299
Don't block muting/unmuting on network requests
robintown d521f97
Merge pull request #2754 from robintown/unblock-mute
robintown 3c33c42
Merge branch 'develop' into robertlong/group-call
robintown dfe535b
More debugging for multiple group calls (#2766)
dbkr c57c897
Fix screenshare failing after several attempts (#2771)
dbkr 5a07873
Fix connectivity regressions (#2780)
dbkr eddd0ca
Add throwOnFail to groupCall.setScreensharingEnabled (#2787)
dbkr 8cd5aac
Add event and message capabilities to RoomWidgetClient
robintown 193d8a4
Merge remote-tracking branch 'origin/develop' into dbkr/gcmerge_oct22_3
dbkr 35f697a
Merge pull request #2797 from robintown/matryoshka-events
robintown b4ab7fc
Merge branch 'robertlong/group-call' into dbkr/gcmerge_oct22_3
dbkr 450ff00
Merge pull request #2800 from matrix-org/dbkr/gcmerge_oct22_3
dbkr c374ba2
TS strict mode compliance in the call / groupcall code (#2805)
dbkr 384116c
Merge remote-tracking branch 'origin/develop' into dbkr/gcmerge_26oct22
dbkr 0d211df
Clean up group call tests (#2806)
dbkr 0f10122
Fix types
dbkr 4cd50e4
Merge pull request #2807 from matrix-org/dbkr/gcmerge_26oct22
dbkr 5679c86
More TS strict mode fixes
dbkr 87115d1
Don't commit the strict mode flag
dbkr 13c751c
Merge pull request #2808 from matrix-org/dbkr/groupcall_more_strict
dbkr dbdaa15
Let leave requests outlive the window
robintown d979302
A few more strict mode fixes
dbkr 77ef855
Merge pull request #2816 from matrix-org/dbkr/groupcall_more_strict
dbkr 9ff6b35
Merge branch 'develop' into robertlong/group-call
dbkr 4c6e1e5
Replace the keepAlive flag with request options
robintown 849e3d6
Merge pull request #2815 from robintown/keepalive-leave
robintown f0d4ef7
Merge remote-tracking branch 'origin/develop' into robertlong/group-call
dbkr b9cccf9
Resolve races between initLocalCallFeed and leave
robintown 94072a0
Merge pull request #2826 from robintown/init-leave-race
robintown 6729c7d
Merge remote-tracking branch 'origin/develop' into robertlong/group-call
dbkr cb8123d
Add public/private modifiers
dbkr 476f6f7
Add more access modifiers
dbkr 7ec726e
Give everything that isn't web rtc back to element-web
dbkr 7fb313c
Merge remote-tracking branch 'origin/develop' into robertlong/group-call
dbkr 32d535c
Don't remove our own member for a split second when entering a call
robintown 8235b65
Merge pull request #2844 from robintown/dont-remove-self
robintown fff4cda
Merge remote-tracking branch 'origin/develop' into dbkr/gcmerge_20221104
dbkr 2dda837
Fix strict mode errors
dbkr c8dc71e
Merge pull request #2854 from matrix-org/dbkr/gcmerge_20221104
dbkr 4f63ff2
Merge branch 'develop' into robertlong/group-call
dbkr f09853c
Merge remote-tracking branch 'origin/develop' into robertlong/group-call
dbkr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @matrix-org/element-web | ||
* @matrix-org/element-call-reviewers | ||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
Copyright 2022 The Matrix.org Foundation C.I.C. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
// Jest now uses @sinonjs/fake-timers which exposes tickAsync() and a number of | ||
// other async methods which break the event loop, letting scheduled promise | ||
// callbacks run. Unfortunately, Jest doesn't expose these, so we have to do | ||
// it manually (this is what sinon does under the hood). We do both in a loop | ||
// until the thing we expect happens: hopefully this is the least flakey way | ||
// and avoids assuming anything about the app's behaviour. | ||
const realSetTimeout = setTimeout; | ||
export function flushPromises() { | ||
return new Promise(r => { | ||
realSetTimeout(r, 1); | ||
}); | ||
} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.