Skip to content

Commit fd20ac4

Browse files
committed
Merge branch 'livekit' into valere/async_error_show_boundary
2 parents 96ce6a2 + 4a2f44a commit fd20ac4

File tree

8 files changed

+38
-23
lines changed

8 files changed

+38
-23
lines changed

.github/workflows/blocked.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Prevent blocked
22
on:
3-
pull_request:
3+
pull_request_target:
44
types: [opened, labeled, unlabeled]
55
jobs:
66
prevent-blocked:

demo.jpg

-179 KB
Binary file not shown.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"prettier:check": "prettier -c .",
1414
"prettier:format": "prettier -w .",
1515
"lint": "yarn lint:types && yarn lint:eslint && yarn lint:knip",
16-
"lint:eslint": "eslint --max-warnings 0 src",
17-
"lint:eslint-fix": "eslint --max-warnings 0 src --fix",
16+
"lint:eslint": "eslint --max-warnings 0 src playwright",
17+
"lint:eslint-fix": "eslint --max-warnings 0 src playwright --fix",
1818
"lint:knip": "knip",
1919
"lint:types": "tsc",
2020
"i18n": "i18next",
@@ -95,7 +95,7 @@
9595
"i18next-parser": "^9.1.0",
9696
"jsdom": "^26.0.0",
9797
"knip": "^5.27.2",
98-
"livekit-client": "^2.5.7",
98+
"livekit-client": "2.9.1",
9999
"lodash-es": "^4.17.21",
100100
"loglevel": "^1.9.1",
101101
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#8395919f0fd1af7cab1e793d736f2cdf18ef7686",

playwright/access.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ test("As a guest, create a call, share link and other join", async ({
9191
await expect(creatorPage.getByTestId("modal_inviteLink")).toBeVisible();
9292
await creatorPage.getByTestId("modal_inviteLink").click();
9393

94-
let inviteLink = (await creatorPage.evaluate(
94+
const inviteLink = (await creatorPage.evaluate(
9595
"navigator.clipboard.readText()",
9696
)) as string;
9797
expect(inviteLink).toContain("room/#/");

src/livekit/useECConnectionState.test.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@ import { GroupCallErrorBoundary } from "../room/GroupCallErrorBoundary.tsx";
2222

2323
test.each<[string, ConnectionError]>([
2424
[
25-
"LiveKit",
25+
"LiveKit hits track limit",
2626
new ConnectionError("", ConnectionErrorReason.InternalError, 503),
2727
],
2828
[
29-
"LiveKit Cloud",
29+
"LiveKit hits room participant limit",
30+
new ConnectionError("", ConnectionErrorReason.ServerUnreachable, 200),
31+
],
32+
[
33+
"LiveKit Cloud hits connection limit",
3034
new ConnectionError("", ConnectionErrorReason.NotAllowed, 429),
3135
],
3236
])(

src/livekit/useECConnectionState.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,16 @@ async function connectAndPublish(
144144
websocketTimeout: window.websocketTimeout ?? 45000,
145145
});
146146
} catch (e) {
147-
// LiveKit uses 503 to indicate that the server has hit its track limits
148-
// or equivalently, 429 in LiveKit Cloud
149-
// For reference, the 503 response is generated at: https://github.com/livekit/livekit/blob/fcb05e97c5a31812ecf0ca6f7efa57c485cea9fb/pkg/service/rtcservice.go#L171
150-
151-
if (e instanceof ConnectionError && (e.status === 503 || e.status === 429))
147+
// LiveKit uses 503 to indicate that the server has hit its track limits.
148+
// https://github.com/livekit/livekit/blob/fcb05e97c5a31812ecf0ca6f7efa57c485cea9fb/pkg/service/rtcservice.go#L171
149+
// It also errors with a status code of 200 (yes, really) for room
150+
// participant limits.
151+
// LiveKit Cloud uses 429 for connection limits.
152+
// Either way, all these errors can be explained as "insufficient capacity".
153+
if (
154+
e instanceof ConnectionError &&
155+
(e.status === 503 || e.status === 200 || e.status === 429)
156+
)
152157
throw new InsufficientCapacityError();
153158
throw e;
154159
}

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"include": [
5151
"./node_modules/matrix-js-sdk/src/@types/*.d.ts",
5252
"./src/**/*.ts",
53-
"./src/**/*.tsx"
53+
"./src/**/*.tsx",
54+
"./playwright/**/*.ts"
5455
]
5556
}

yarn.lock

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5395,6 +5395,11 @@ fs.realpath@^1.0.0:
53955395
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
53965396
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
53975397

5398+
5399+
version "2.3.2"
5400+
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
5401+
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
5402+
53985403
fsevents@~2.3.2, fsevents@~2.3.3:
53995404
version "2.3.3"
54005405
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
@@ -6346,20 +6351,20 @@ lines-and-columns@^1.1.6:
63466351
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
63476352
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
63486353

6349-
livekit-client@^2.5.7:
6350-
version "2.9.5"
6351-
resolved "https://registry.yarnpkg.com/livekit-client/-/livekit-client-2.9.5.tgz#b9bcce5972ccf194ee36eabbf8d93b20dd672b19"
6352-
integrity sha512-2EJmiB4XItaRjTEmL4XxGzsahLYTer9T5N6lKyhBHQxwH4GrjBWewPySvJEO8zCpD2nvWZCmCQjIJx0+w+y6DA==
6354+
livekit-client@2.9.1:
6355+
version "2.9.1"
6356+
resolved "https://registry.yarnpkg.com/livekit-client/-/livekit-client-2.9.1.tgz#7286d845dc3a063354a92caf5821d4e9d7584de0"
6357+
integrity sha512-MqBxnOmkOB88+n2Whq2pgXVwevfJ+yhERNf0tZf/7RG1ZpCWF+pk7/muRVzZeCxal4fwGOB3Z3MIT0KBJoT0RQ==
63536358
dependencies:
63546359
"@livekit/mutex" "1.1.1"
63556360
"@livekit/protocol" "1.33.0"
63566361
events "^3.3.0"
6357-
loglevel "^1.9.2"
6358-
sdp-transform "^2.15.0"
6362+
loglevel "^1.8.0"
6363+
sdp-transform "^2.14.1"
63596364
ts-debounce "^4.0.0"
63606365
tslib "2.8.1"
63616366
typed-emitter "^2.1.0"
6362-
webrtc-adapter "^9.0.1"
6367+
webrtc-adapter "^9.0.0"
63636368

63646369
locate-path@^5.0.0:
63656370
version "5.0.0"
@@ -6400,7 +6405,7 @@ [email protected]:
64006405
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.9.1.tgz#d63976ac9bcd03c7c873116d41c2a85bafff1be7"
64016406
integrity sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==
64026407

6403-
loglevel@^1.7.1, loglevel@^1.9.1, loglevel@^1.9.2:
6408+
loglevel@^1.7.1, loglevel@^1.8.0, loglevel@^1.9.1:
64046409
version "1.9.2"
64056410
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.9.2.tgz#c2e028d6c757720107df4e64508530db6621ba08"
64066411
integrity sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==
@@ -7923,7 +7928,7 @@ scheduler@^0.23.2:
79237928
dependencies:
79247929
loose-envify "^1.1.0"
79257930

7926-
sdp-transform@^2.14.1, sdp-transform@^2.15.0:
7931+
sdp-transform@^2.14.1:
79277932
version "2.15.0"
79287933
resolved "https://registry.yarnpkg.com/sdp-transform/-/sdp-transform-2.15.0.tgz#79d37a2481916f36a0534e07b32ceaa87f71df42"
79297934
integrity sha512-KrOH82c/W+GYQ0LHqtr3caRpM3ITglq3ljGUIb8LTki7ByacJZ9z+piSGiwZDsRyhQbYBOBJgr2k6X4BZXi3Kw==
@@ -9006,7 +9011,7 @@ webpack-virtual-modules@^0.6.2:
90069011
resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz#057faa9065c8acf48f24cb57ac0e77739ab9a7e8"
90079012
integrity sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==
90089013

9009-
webrtc-adapter@^9.0.1:
9014+
webrtc-adapter@^9.0.0:
90109015
version "9.0.1"
90119016
resolved "https://registry.yarnpkg.com/webrtc-adapter/-/webrtc-adapter-9.0.1.tgz#d4efa22ca9604cb2c8cdb9e492815ba37acfa0b2"
90129017
integrity sha512-1AQO+d4ElfVSXyzNVTOewgGT/tAomwwztX/6e3totvyyzXPvXIIuUUjAmyZGbKBKbZOXauuJooZm3g6IuFuiNQ==

0 commit comments

Comments
 (0)