Skip to content

Commit eabb27b

Browse files
committed
Merge branch 'livekit' into af/docker/slim
2 parents 78ba046 + 5f8a8d4 commit eabb27b

20 files changed

+603
-358
lines changed

.github/workflows/blocked.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Prevent blocked
22
on:
33
pull_request_target:
4-
types: [opened, labeled, unlabeled]
4+
types: [opened, labeled, unlabeled, synchronize]
55
jobs:
66
prevent-blocked:
77
name: Prevent blocked

backend/dev_nginx.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ server {
4343
# MatrixRTC reverse proxy
4444
# - MatrixRTC Authorization Service
4545
# - LiveKit SFU websocket signaling connection
46+
upstream jwt-auth-services {
47+
server auth-server:6080;
48+
server host.docker.internal:6080;
49+
}
50+
4651
server {
4752
listen 80;
4853
listen [::]:80;
@@ -63,7 +68,8 @@ server {
6368
proxy_set_header X-Forwarded-Proto $scheme;
6469

6570
# JWT Service running at port 6080
66-
proxy_pass http://auth-server:6080/;
71+
proxy_pass http://jwt-auth-services/;
72+
6773
}
6874

6975
location ^~ /livekit/sfu/ {

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
"@livekit/track-processors": "^0.5.5",
4545
"@mediapipe/tasks-vision": "^0.10.18",
4646
"@opentelemetry/api": "^1.4.0",
47-
"@opentelemetry/core": "^1.25.1",
48-
"@opentelemetry/exporter-trace-otlp-http": "^0.57.0",
49-
"@opentelemetry/resources": "^1.25.1",
50-
"@opentelemetry/sdk-trace-base": "^1.25.1",
51-
"@opentelemetry/sdk-trace-web": "^1.9.1",
47+
"@opentelemetry/core": "^2.0.0",
48+
"@opentelemetry/exporter-trace-otlp-http": "^0.201.0",
49+
"@opentelemetry/resources": "^2.0.0",
50+
"@opentelemetry/sdk-trace-base": "^2.0.0",
51+
"@opentelemetry/sdk-trace-web": "^2.0.0",
5252
"@opentelemetry/semantic-conventions": "^1.25.1",
5353
"@playwright/test": "^1.52.0",
5454
"@radix-ui/react-dialog": "^1.0.4",
@@ -77,8 +77,8 @@
7777
"@typescript-eslint/eslint-plugin": "^8.31.0",
7878
"@typescript-eslint/parser": "^8.31.0",
7979
"@use-gesture/react": "^10.2.11",
80-
"@vector-im/compound-design-tokens": "^3.0.0",
81-
"@vector-im/compound-web": "^7.2.0",
80+
"@vector-im/compound-design-tokens": "^4.0.0",
81+
"@vector-im/compound-web": "^7.12.0",
8282
"@vitejs/plugin-react": "^4.0.1",
8383
"@vitest/coverage-v8": "^3.0.0",
8484
"babel-plugin-transform-vite-meta-env": "^1.0.3",
@@ -89,7 +89,7 @@
8989
"eslint-plugin-deprecate": "^0.8.2",
9090
"eslint-plugin-import": "^2.26.0",
9191
"eslint-plugin-jsx-a11y": "^6.5.1",
92-
"eslint-plugin-matrix-org": "^2.0.0",
92+
"eslint-plugin-matrix-org": "2.1.0",
9393
"eslint-plugin-react": "^7.29.4",
9494
"eslint-plugin-react-hooks": "^5.0.0",
9595
"eslint-plugin-rxjs": "^5.0.3",
@@ -126,7 +126,7 @@
126126
"unique-names-generator": "^4.6.0",
127127
"vaul": "^1.0.0",
128128
"vite": "^6.0.0",
129-
"vite-plugin-generate-file": "^0.2.0",
129+
"vite-plugin-generate-file": "^0.3.0",
130130
"vite-plugin-html": "^3.2.2",
131131
"vite-plugin-svgr": "^4.0.0",
132132
"vitest": "^3.0.0",

src/FullScreenView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import classNames from "classnames";
1010
import { useTranslation } from "react-i18next";
1111
import * as Sentry from "@sentry/react";
1212
import { logger } from "matrix-js-sdk/lib/logger";
13-
import { ErrorIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
13+
import { ErrorSolidIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
1414

1515
import { Header, HeaderLogo, LeftNav, RightNav } from "./Header";
1616
import styles from "./FullScreenView.module.css";
@@ -67,7 +67,7 @@ export const ErrorPage = ({ error, widget }: ErrorPageProps): ReactElement => {
6767
) : (
6868
<ErrorView
6969
widget={widget}
70-
Icon={ErrorIcon}
70+
Icon={ErrorSolidIcon}
7171
title={t("error.generic")}
7272
rageshake
7373
fatal

src/__snapshots__/Modal.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`the content is rendered when the modal is open 1`] = `
44
<div
55
aria-labelledby="radix-:r4:"
6-
class="overlay animate modal dialog _glass_1x9g9_17"
6+
class="overlay animate modal dialog _glass_sepwu_8"
77
data-state="open"
88
id="radix-:r3:"
99
role="dialog"
@@ -17,7 +17,7 @@ exports[`the content is rendered when the modal is open 1`] = `
1717
class="header"
1818
>
1919
<h2
20-
class="_typography_yh5dq_162 _font-heading-md-semibold_yh5dq_121"
20+
class="_typography_6v6n8_153 _font-heading-md-semibold_6v6n8_112"
2121
id="radix-:r4:"
2222
>
2323
My modal

src/__snapshots__/Toast.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ exports[`Toast > renders 1`] = `
1212
type="button"
1313
>
1414
<h3
15-
class="_typography_yh5dq_162 _font-body-sm-semibold_yh5dq_45"
15+
class="_typography_6v6n8_153 _font-body-sm-semibold_6v6n8_36"
1616
id="radix-:r4:"
1717
>
1818
Hello world!

src/analytics/RageshakeSpanProcessor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ export class RageshakeSpanProcessor implements SpanProcessor {
107107
startTime,
108108
duration,
109109
references:
110-
span.parentSpanId === undefined
110+
span.parentSpanContext?.spanId === undefined
111111
? []
112112
: [
113113
{
114114
refType: "CHILD_OF",
115115
traceID: traceId,
116-
spanID: span.parentSpanId,
116+
spanID: span.parentSpanContext?.spanId,
117117
},
118118
],
119119
tags: dumpAttributes(span.attributes),

src/button/__snapshots__/ReactionToggleButton.test.tsx.snap

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ exports[`Can close reaction dialog 1`] = `
1010
aria-expanded="true"
1111
aria-haspopup="true"
1212
aria-labelledby=":rb5:"
13-
class="_button_i91xf_17 _has-icon_i91xf_66 _icon-only_i91xf_59"
13+
class="_button_vczzf_8 _has-icon_vczzf_57 _icon-only_vczzf_50"
1414
data-kind="primary"
1515
data-size="lg"
1616
role="button"
@@ -26,7 +26,7 @@ exports[`Can close reaction dialog 1`] = `
2626
>
2727
<path
2828
clip-rule="evenodd"
29-
d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm3.536-6.464a1 1 0 0 0-1.415-1.415A2.988 2.988 0 0 1 12 15a2.988 2.988 0 0 1-2.121-.879 1 1 0 1 0-1.414 1.415A4.987 4.987 0 0 0 12 17c1.38 0 2.632-.56 3.536-1.464ZM10 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm5.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"
29+
d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10m3.536-6.464a1 1 0 0 0-1.415-1.415A3 3 0 0 1 12 15a3 3 0 0 1-2.121-.879 1 1 0 1 0-1.414 1.415A5 5 0 0 0 12 17c1.38 0 2.632-.56 3.536-1.464M10 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m5.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3"
3030
fill-rule="evenodd"
3131
/>
3232
</svg>
@@ -44,7 +44,7 @@ exports[`Can fully expand emoji picker 1`] = `
4444
aria-expanded="true"
4545
aria-haspopup="true"
4646
aria-labelledby=":r7m:"
47-
class="_button_i91xf_17 _has-icon_i91xf_66 _icon-only_i91xf_59"
47+
class="_button_vczzf_8 _has-icon_vczzf_57 _icon-only_vczzf_50"
4848
data-kind="primary"
4949
data-size="lg"
5050
role="button"
@@ -60,7 +60,7 @@ exports[`Can fully expand emoji picker 1`] = `
6060
>
6161
<path
6262
clip-rule="evenodd"
63-
d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm3.536-6.464a1 1 0 0 0-1.415-1.415A2.988 2.988 0 0 1 12 15a2.988 2.988 0 0 1-2.121-.879 1 1 0 1 0-1.414 1.415A4.987 4.987 0 0 0 12 17c1.38 0 2.632-.56 3.536-1.464ZM10 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm5.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"
63+
d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10m3.536-6.464a1 1 0 0 0-1.415-1.415A3 3 0 0 1 12 15a3 3 0 0 1-2.121-.879 1 1 0 1 0-1.414 1.415A5 5 0 0 0 12 17c1.38 0 2.632-.56 3.536-1.464M10 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m5.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3"
6464
fill-rule="evenodd"
6565
/>
6666
</svg>
@@ -75,7 +75,7 @@ exports[`Can lower hand 1`] = `
7575
aria-expanded="false"
7676
aria-haspopup="true"
7777
aria-labelledby=":r36:"
78-
class="_button_i91xf_17 _has-icon_i91xf_66 _icon-only_i91xf_59"
78+
class="_button_vczzf_8 _has-icon_vczzf_57 _icon-only_vczzf_50"
7979
data-kind="secondary"
8080
data-size="lg"
8181
role="button"
@@ -91,7 +91,7 @@ exports[`Can lower hand 1`] = `
9191
>
9292
<path
9393
clip-rule="evenodd"
94-
d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm3.536-6.464a1 1 0 0 0-1.415-1.415A2.988 2.988 0 0 1 12 15a2.988 2.988 0 0 1-2.121-.879 1 1 0 1 0-1.414 1.415A4.987 4.987 0 0 0 12 17c1.38 0 2.632-.56 3.536-1.464ZM10 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm5.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"
94+
d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10m3.536-6.464a1 1 0 0 0-1.415-1.415A3 3 0 0 1 12 15a3 3 0 0 1-2.121-.879 1 1 0 1 0-1.414 1.415A5 5 0 0 0 12 17c1.38 0 2.632-.56 3.536-1.464M10 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m5.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3"
9595
fill-rule="evenodd"
9696
/>
9797
</svg>
@@ -109,7 +109,7 @@ exports[`Can open menu 1`] = `
109109
aria-expanded="true"
110110
aria-haspopup="true"
111111
aria-labelledby=":r0:"
112-
class="_button_i91xf_17 _has-icon_i91xf_66 _icon-only_i91xf_59"
112+
class="_button_vczzf_8 _has-icon_vczzf_57 _icon-only_vczzf_50"
113113
data-kind="primary"
114114
data-size="lg"
115115
role="button"
@@ -125,7 +125,7 @@ exports[`Can open menu 1`] = `
125125
>
126126
<path
127127
clip-rule="evenodd"
128-
d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm3.536-6.464a1 1 0 0 0-1.415-1.415A2.988 2.988 0 0 1 12 15a2.988 2.988 0 0 1-2.121-.879 1 1 0 1 0-1.414 1.415A4.987 4.987 0 0 0 12 17c1.38 0 2.632-.56 3.536-1.464ZM10 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm5.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"
128+
d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10m3.536-6.464a1 1 0 0 0-1.415-1.415A3 3 0 0 1 12 15a3 3 0 0 1-2.121-.879 1 1 0 1 0-1.414 1.415A5 5 0 0 0 12 17c1.38 0 2.632-.56 3.536-1.464M10 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m5.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3"
129129
fill-rule="evenodd"
130130
/>
131131
</svg>
@@ -140,7 +140,7 @@ exports[`Can raise hand 1`] = `
140140
aria-expanded="false"
141141
aria-haspopup="true"
142142
aria-labelledby=":r1j:"
143-
class="_button_i91xf_17 raisedButton _has-icon_i91xf_66 _icon-only_i91xf_59"
143+
class="_button_vczzf_8 raisedButton _has-icon_vczzf_57 _icon-only_vczzf_50"
144144
data-kind="primary"
145145
data-size="lg"
146146
role="button"
@@ -155,7 +155,7 @@ exports[`Can raise hand 1`] = `
155155
xmlns="http://www.w3.org/2000/svg"
156156
>
157157
<path
158-
d="M11 3a1 1 0 1 1 2 0v8.5a.5.5 0 0 0 1 0V4a1 1 0 1 1 2 0v10.2l3.284-2.597a1.081 1.081 0 0 1 1.47 1.577c-.613.673-1.214 1.367-1.818 2.064-1.267 1.463-2.541 2.934-3.944 4.235A6 6 0 0 1 5 15V7a1 1 0 0 1 2 0v5.5a.5.5 0 0 0 1 0V4a1 1 0 0 1 2 0v7.5a.5.5 0 0 0 1 0V3Z"
158+
d="M11 3a1 1 0 1 1 2 0v8.5a.5.5 0 0 0 1 0V4a1 1 0 1 1 2 0v10.2l3.284-2.597a1.081 1.081 0 0 1 1.47 1.577c-.613.673-1.214 1.367-1.818 2.064-1.267 1.463-2.541 2.934-3.943 4.235A6 6 0 0 1 5 15V7a1 1 0 0 1 1.999 0v5.5a.5.5 0 0 0 1 0V4a1 1 0 0 1 2 0v7.5a.5.5 0 0 0 1 0z"
159159
/>
160160
</svg>
161161
</button>

src/e2ee/sharedKeyManagement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const getRoomSharedKeyLocalStorageKey = (roomId: string): string =>
2121

2222
const useInternalRoomSharedKey = (roomId: string): string | null => {
2323
const key = getRoomSharedKeyLocalStorageKey(roomId);
24-
const roomSharedKey = useLocalStorage(key)[0];
24+
const [roomSharedKey] = useLocalStorage(key);
2525

2626
return roomSharedKey;
2727
};

src/livekit/useLivekit.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export function useLivekit(
131131
// @livekit/components-react. JSON.stringify() is used in deps of a
132132
// useEffect() with an argument that references itself, if E2EE is enabled
133133
const room = useMemo(() => {
134+
logger.info("[LivekitRooms] Create LiveKit room with options", roomOptions);
134135
const r = new Room(roomOptions);
135136
r.setE2EEEnabled(e2eeSystem.kind !== E2eeType.NONE).catch((e) => {
136137
logger.error("Failed to set E2EE enabled on room", e);

src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ window.setLKLogLevel = setLKLogLevel;
2929
initRageshake().catch((e) => {
3030
logger.error("Failed to initialize rageshake", e);
3131
});
32-
setLKLogLevel("warn");
32+
setLKLogLevel("info");
3333
setLKLogExtension((level, msg, context) => {
3434
// we pass a synthetic logger name of "livekit" to the rageshake to make it easier to read
3535
global.mx_rage_logger.log(level, "livekit", msg, context);

src/otel/otel.ts

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
55
Please see LICENSE in the repository root for full details.
66
*/
77

8-
import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
8+
import {
9+
SimpleSpanProcessor,
10+
type SpanProcessor,
11+
} from "@opentelemetry/sdk-trace-base";
912
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
1013
import { WebTracerProvider } from "@opentelemetry/sdk-trace-web";
1114
import opentelemetry, { type Tracer } from "@opentelemetry/api";
12-
import { Resource } from "@opentelemetry/resources";
13-
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
15+
import { resourceFromAttributes } from "@opentelemetry/resources";
16+
import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions";
1417
import { logger } from "matrix-js-sdk/lib/logger";
1518

1619
import { PosthogSpanProcessor } from "../analytics/PosthogSpanProcessor";
@@ -59,34 +62,34 @@ export class ElementCallOpenTelemetry {
5962
collectorUrl: string | undefined,
6063
rageshakeUrl: string | undefined,
6164
) {
62-
// This is how we can make Jaeger show a reasonable service in the dropdown on the left.
63-
const providerConfig = {
64-
resource: new Resource({
65-
[SemanticResourceAttributes.SERVICE_NAME]: SERVICE_NAME,
66-
}),
67-
};
68-
this._provider = new WebTracerProvider(providerConfig);
65+
const spanProcessors: SpanProcessor[] = [];
6966

7067
if (collectorUrl) {
7168
logger.info("Enabling OTLP collector with URL " + collectorUrl);
7269
this.otlpExporter = new OTLPTraceExporter({
7370
url: collectorUrl,
7471
});
75-
this._provider.addSpanProcessor(
76-
new SimpleSpanProcessor(this.otlpExporter),
77-
);
72+
spanProcessors.push(new SimpleSpanProcessor(this.otlpExporter));
7873
} else {
7974
logger.info("OTLP collector disabled");
8075
}
8176

8277
if (rageshakeUrl) {
8378
this.rageshakeProcessor = new RageshakeSpanProcessor();
84-
this._provider.addSpanProcessor(this.rageshakeProcessor);
79+
spanProcessors.push(this.rageshakeProcessor);
8580
}
8681

87-
this._provider.addSpanProcessor(new PosthogSpanProcessor());
88-
opentelemetry.trace.setGlobalTracerProvider(this._provider);
82+
spanProcessors.push(new PosthogSpanProcessor());
8983

84+
this._provider = new WebTracerProvider({
85+
resource: resourceFromAttributes({
86+
// This is how we can make Jaeger show a reasonable service in the dropdown on the left.
87+
[ATTR_SERVICE_NAME]: SERVICE_NAME,
88+
}),
89+
spanProcessors,
90+
});
91+
92+
opentelemetry.trace.setGlobalTracerProvider(this._provider);
9093
this._tracer = opentelemetry.trace.getTracer(
9194
// This is not the serviceName shown in jaeger
9295
"my-element-call-otl-tracer",

src/room/GroupCallErrorBoundary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
} from "react";
1717
import { Trans, useTranslation } from "react-i18next";
1818
import {
19-
ErrorIcon,
19+
ErrorSolidIcon,
2020
HostIcon,
2121
OfflineIcon,
2222
WebBrowserIcon,
@@ -63,7 +63,7 @@ const ErrorPage: FC<ErrorPageProps> = ({
6363
icon = WebBrowserIcon;
6464
break;
6565
default:
66-
icon = ErrorIcon;
66+
icon = ErrorSolidIcon;
6767
}
6868

6969
const actions: { label: string; onClick: () => void }[] = [];

0 commit comments

Comments
 (0)