Merge branch 'livekit' into robin/audio-output-controls
This commit is contained in:
@@ -145,11 +145,11 @@ server {
|
|||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
proxy_pass http://element-web:81;
|
proxy_pass http://element-web:8081;
|
||||||
proxy_ssl_verify off;
|
proxy_ssl_verify off;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ services:
|
|||||||
image: ghcr.io/element-hq/lk-jwt-service:latest-ci
|
image: ghcr.io/element-hq/lk-jwt-service:latest-ci
|
||||||
hostname: auth-server
|
hostname: auth-server
|
||||||
environment:
|
environment:
|
||||||
- LK_JWT_PORT=8080
|
- LIVEKIT_JWT_PORT=8080
|
||||||
- LIVEKIT_URL=wss://matrix-rtc.m.localhost/livekit/sfu
|
- LIVEKIT_URL=wss://matrix-rtc.m.localhost/livekit/sfu
|
||||||
- LIVEKIT_KEY=devkey
|
- LIVEKIT_KEY=devkey
|
||||||
- LIVEKIT_SECRET=secret
|
- LIVEKIT_SECRET=secret
|
||||||
@@ -73,11 +73,11 @@ services:
|
|||||||
image: ghcr.io/element-hq/element-web:develop
|
image: ghcr.io/element-hq/element-web:develop
|
||||||
pull_policy: always
|
pull_policy: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./backend/ew.test.config.json:/app/config.json
|
- ./backend/ew.test.config.json:/app/config.json:Z
|
||||||
environment:
|
environment:
|
||||||
ELEMENT_WEB_PORT: 81
|
ELEMENT_WEB_PORT: 8081
|
||||||
ports:
|
ports:
|
||||||
- "8081:81"
|
- "8081:8081"
|
||||||
networks:
|
networks:
|
||||||
- ecbackend
|
- ecbackend
|
||||||
|
|
||||||
@@ -91,7 +91,6 @@ services:
|
|||||||
- ./backend/dev_tls_m.localhost.crt:/root/ssl/cert.pem:Z
|
- ./backend/dev_tls_m.localhost.crt:/root/ssl/cert.pem:Z
|
||||||
ports:
|
ports:
|
||||||
# HOST_PORT:CONTAINER_PORT
|
# HOST_PORT:CONTAINER_PORT
|
||||||
- "80:80"
|
|
||||||
- "443:443"
|
- "443:443"
|
||||||
- "8008:80"
|
- "8008:80"
|
||||||
- "4443:443"
|
- "4443:443"
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"loglevel": "^1.9.1",
|
"loglevel": "^1.9.1",
|
||||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#head=toger5/add-room-key-fallback-on-encryption-manager-not-supported",
|
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#head=toger5/add-room-key-fallback-on-encryption-manager-not-supported",
|
||||||
"matrix-widget-api": "1.11.0",
|
"matrix-widget-api": "^1.13.0",
|
||||||
"normalize.css": "^8.0.1",
|
"normalize.css": "^8.0.1",
|
||||||
"observable-hooks": "^4.2.3",
|
"observable-hooks": "^4.2.3",
|
||||||
"pako": "^2.0.4",
|
"pako": "^2.0.4",
|
||||||
@@ -133,8 +133,7 @@
|
|||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"@livekit/components-core/rxjs": "^7.8.1",
|
"@livekit/components-core/rxjs": "^7.8.1",
|
||||||
"@livekit/track-processors/@mediapipe/tasks-vision": "^0.10.18",
|
"@livekit/track-processors/@mediapipe/tasks-vision": "^0.10.18"
|
||||||
"matrix-widget-api": "1.11.0"
|
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@4.7.0"
|
"packageManager": "yarn@4.7.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|||||||
Please see LICENSE in the repository root for full details.
|
Please see LICENSE in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { BaseKeyProvider, createKeyMaterialFromBuffer } from "livekit-client";
|
import { BaseKeyProvider } from "livekit-client";
|
||||||
import { logger } from "matrix-js-sdk/lib/logger";
|
import { logger } from "matrix-js-sdk/lib/logger";
|
||||||
import {
|
import {
|
||||||
type MatrixRTCSession,
|
type MatrixRTCSession,
|
||||||
@@ -44,20 +44,29 @@ export class MatrixKeyProvider extends BaseKeyProvider {
|
|||||||
encryptionKeyIndex: number,
|
encryptionKeyIndex: number,
|
||||||
participantId: string,
|
participantId: string,
|
||||||
): void => {
|
): void => {
|
||||||
createKeyMaterialFromBuffer(encryptionKey).then(
|
crypto.subtle
|
||||||
(keyMaterial) => {
|
.importKey("raw", encryptionKey, "HKDF", false, [
|
||||||
this.onSetEncryptionKey(keyMaterial, participantId, encryptionKeyIndex);
|
"deriveBits",
|
||||||
|
"deriveKey",
|
||||||
|
])
|
||||||
|
.then(
|
||||||
|
(keyMaterial) => {
|
||||||
|
this.onSetEncryptionKey(
|
||||||
|
keyMaterial,
|
||||||
|
participantId,
|
||||||
|
encryptionKeyIndex,
|
||||||
|
);
|
||||||
|
|
||||||
logger.debug(
|
logger.debug(
|
||||||
`Sent new key to livekit room=${this.rtcSession?.room.roomId} participantId=${participantId} encryptionKeyIndex=${encryptionKeyIndex}`,
|
`Sent new key to livekit room=${this.rtcSession?.room.roomId} participantId=${participantId} encryptionKeyIndex=${encryptionKeyIndex}`,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
(e) => {
|
(e) => {
|
||||||
logger.error(
|
logger.error(
|
||||||
`Failed to create key material from buffer for livekit room=${this.rtcSession?.room.roomId} participantId=${participantId} encryptionKeyIndex=${encryptionKeyIndex}`,
|
`Failed to create key material from buffer for livekit room=${this.rtcSession?.room.roomId} participantId=${participantId} encryptionKeyIndex=${encryptionKeyIndex}`,
|
||||||
e,
|
e,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,10 +121,9 @@ export async function enterRTCSession(
|
|||||||
...(useDeviceSessionMemberEvents !== undefined && {
|
...(useDeviceSessionMemberEvents !== undefined && {
|
||||||
useLegacyMemberEvents: !useDeviceSessionMemberEvents,
|
useLegacyMemberEvents: !useDeviceSessionMemberEvents,
|
||||||
}),
|
}),
|
||||||
membershipServerSideExpiryTimeout:
|
delayedLeaveEventDelayMs:
|
||||||
matrixRtcSessionConfig?.membership_server_side_expiry_timeout,
|
matrixRtcSessionConfig?.membership_server_side_expiry_timeout,
|
||||||
membershipKeepAlivePeriod:
|
networkErrorRetryMs: matrixRtcSessionConfig?.membership_keep_alive_period,
|
||||||
matrixRtcSessionConfig?.membership_keep_alive_period,
|
|
||||||
makeKeyDelay: matrixRtcSessionConfig?.key_rotation_on_leave_delay,
|
makeKeyDelay: matrixRtcSessionConfig?.key_rotation_on_leave_delay,
|
||||||
useExperimentalToDeviceTransport,
|
useExperimentalToDeviceTransport,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"target": "es2022",
|
"target": "es2022",
|
||||||
"module": "es2022",
|
"module": "es2022",
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"lib": ["es2022", "dom", "dom.iterable"],
|
"lib": ["es2024", "dom", "dom.iterable"],
|
||||||
|
|
||||||
// From Matrix-JS-SDK
|
// From Matrix-JS-SDK
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|||||||
10
yarn.lock
10
yarn.lock
@@ -7008,7 +7008,7 @@ __metadata:
|
|||||||
lodash-es: "npm:^4.17.21"
|
lodash-es: "npm:^4.17.21"
|
||||||
loglevel: "npm:^1.9.1"
|
loglevel: "npm:^1.9.1"
|
||||||
matrix-js-sdk: "github:matrix-org/matrix-js-sdk#head=toger5/add-room-key-fallback-on-encryption-manager-not-supported"
|
matrix-js-sdk: "github:matrix-org/matrix-js-sdk#head=toger5/add-room-key-fallback-on-encryption-manager-not-supported"
|
||||||
matrix-widget-api: "npm:1.11.0"
|
matrix-widget-api: "npm:^1.13.0"
|
||||||
normalize.css: "npm:^8.0.1"
|
normalize.css: "npm:^8.0.1"
|
||||||
observable-hooks: "npm:^4.2.3"
|
observable-hooks: "npm:^4.2.3"
|
||||||
pako: "npm:^2.0.4"
|
pako: "npm:^2.0.4"
|
||||||
@@ -9633,13 +9633,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"matrix-widget-api@npm:1.11.0":
|
"matrix-widget-api@npm:^1.10.0, matrix-widget-api@npm:^1.13.0":
|
||||||
version: 1.11.0
|
version: 1.13.1
|
||||||
resolution: "matrix-widget-api@npm:1.11.0"
|
resolution: "matrix-widget-api@npm:1.13.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/events": "npm:^3.0.0"
|
"@types/events": "npm:^3.0.0"
|
||||||
events: "npm:^3.2.0"
|
events: "npm:^3.2.0"
|
||||||
checksum: 10c0/ac35ed8fb2b5df6d186beb64b5faf907ec113d708ad8353bdd8f9196fb3da255561b8807e2e845f39d4cf7ae6af36f90b54c230a0a100556ac7ebd8f18bee848
|
checksum: 10c0/25ded744922755b3eb65f4e171cf6cff1a2e0fe43fc3fecbb13e565e41d8af066daa817dd2c3c7d921b996af399eec3b23df70ab7b682cf422d9cee7ca202512
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user