Skip to content

Commit df2b65f

Browse files
authored
Merge pull request #2553 from matrix-org/robertlong/group-call
Add support for group calls using MSC3401
2 parents 6c54338 + f09853c commit df2b65f

37 files changed

+7772
-870
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
* @matrix-org/element-web
2+
3+
/src/webrtc @matrix-org/element-call-reviewers
4+
/spec/*/webrtc @matrix-org/element-call-reviewers

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,16 @@
5555
],
5656
"dependencies": {
5757
"@babel/runtime": "^7.12.5",
58+
"@types/sdp-transform": "^2.4.5",
5859
"another-json": "^0.2.0",
5960
"bs58": "^5.0.0",
6061
"content-type": "^1.0.4",
6162
"loglevel": "^1.7.1",
6263
"matrix-events-sdk": "0.0.1-beta.7",
64+
"matrix-widget-api": "^1.0.0",
6365
"p-retry": "4",
6466
"qs": "^6.9.6",
67+
"sdp-transform": "^2.14.1",
6568
"unhomoglyph": "^1.0.6"
6669
},
6770
"devDependencies": {
@@ -102,6 +105,7 @@
102105
"exorcist": "^2.0.0",
103106
"fake-indexeddb": "^4.0.0",
104107
"jest": "^29.0.0",
108+
"jest-environment-jsdom": "^28.1.3",
105109
"jest-localstorage-mock": "^2.4.6",
106110
"jest-mock": "^29.0.0",
107111
"jsdoc": "^3.6.6",

spec/test-utils/flushPromises.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
Copyright 2022 The Matrix.org Foundation C.I.C.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// Jest now uses @sinonjs/fake-timers which exposes tickAsync() and a number of
18+
// other async methods which break the event loop, letting scheduled promise
19+
// callbacks run. Unfortunately, Jest doesn't expose these, so we have to do
20+
// it manually (this is what sinon does under the hood). We do both in a loop
21+
// until the thing we expect happens: hopefully this is the least flakey way
22+
// and avoids assuming anything about the app's behaviour.
23+
const realSetTimeout = setTimeout;
24+
export function flushPromises() {
25+
return new Promise(r => {
26+
realSetTimeout(r, 1);
27+
});
28+
}

0 commit comments

Comments
 (0)