Commit Graph
35 Commits
Author SHA1 Message Date
Robin f9b601504b Stop sending livekit_alias in memberships
It's been many versions since anything used the value.
2026-09-30 00:45:19 +02:00
Robin 96a2e9b481 Merge pull request #4230 from element-hq/matthew/connection-stop-during-connect
Don't report an aborted connect as a connection error
2026-09-10 20:25:12 +02:00
Matthew Hodgson eddd95ba41 Log track encryption flag and cryptor events for remote tracks
Extends the [RemoteTracks] logging from #4235 with the per-publication
encryption flag and the ParticipantEncryptionStatusChanged /
EncryptionError room events.

If a publisher encrypts frames while the subscriber believes the
publication is unencrypted, livekit-client bypasses the cryptor and hands
raw ciphertext to the decoder, which is audible as loud noise bursts.
The reverse mismatch (or a missing/invalid key) drops frames instead.
Neither case is visible in a rageshake today.
2026-09-07 11:53:01 +01:00
Matthew Hodgson f8f5caaa09 Log remote participant and track events per LiveKit connection
Rageshakes contained nothing about the state of remote tracks, so a tile
showing the wrong mute or video state for a member could not be
diagnosed. Log connect/disconnect, publish/unpublish, subscribe/
unsubscribe, subscription failures, remote mute/unmute and stream state
changes on each Connection's logger, and remove the listeners when the
connection scope ends.
2026-09-03 16:50:30 +01:00
Matthew Hodgson 8060d10fcc Don't report an aborted connect as a connection error
When the ConnectionManager stops a Connection while livekitRoom.connect()
is still pending (which happens on every join, because the local
membership emits twice in quick succession and the connection set is
recomputed), livekit-client rejects the pending connect with "Client
initiated disconnect". Connection.start() then treated that as a failure:
it pushed an UnknownCallError into the state of a connection that was
already stopped and rethrew, and since start() is fire-and-forget the
throw surfaced as

    Unhandled promise rejection: Error: Failed to connect to Livekit server

in every rageshake, right after a "livekitRoom.connect FAILED ... Client
initiated disconnect" line. Nothing was actually wrong: the replacement
connection connects fine a moment later.

Mark the connection as stopped before disconnecting, and have start()
return quietly when the rejection is the abort we asked for.
2026-09-03 14:48:23 +01:00
Valere d0bfef0682 Improve error messages for sfu auth problems 2026-05-07 16:21:30 +02:00
Valere 869bab8253 fixup test since usage of doNetworkOperationWithRetry
doNetworkOperationWithRetry requires to properly mock the get_token endpoint, whereas retryNetworkOperation didn't require it.
2026-04-02 16:53:51 +02:00
Valere 4c7db0147e The advertised livekit_alias in membership is deprecated 2026-01-28 14:22:21 +01:00
Timo K 7dbbd763b9 Refactor how we aquire the jwt token for the local user. (only fetch it
once)

The local jwt token needs to be aquired via the right endpoint. The
endpoint defines how our rtcBackendIdentity is computed. Based on us
using sticky events or state events we also need to use the right
endpoint. This cannot be done generically in the connection manager. The
jwt token now is computed in the localTransport and the resolved sfu
config is passed to the connection manager.

Add JWT endpoint version and SFU config support Pin matrix-js-sdk to a
specific commit and update dev auth image tag. Propagate SFU config and
JWT endpoint choice through local transport, ConnectionManager and
Connection; add JwtEndpointVersion enum and LocalTransportWithSFUConfig
type. Add NO_MATRIX_2 auth error and locale string, thread
rtcBackendIdentity through UI props, and include related test, CSS and
minor imports updates
2026-01-09 13:38:26 +01:00
Timo K 385f63e83e fix tests 2026-01-07 17:46:39 +01:00
Timo K d814f60f23 review (docstrings) and remove unused artifacts. 2026-01-07 15:47:44 +01:00
Timo K df2bd22005 Merge branch 'livekit' into toger5/delayed-event-delegation 2026-01-05 21:08:21 +01:00
Will Hunt 72ec1439f4 Support MSC4143 RTC Transport endpoint (#3629)
* Use rtc-focus branch of js-sdk

* Update makeTransport to fetch backend transports and validate all transports before response.

* Fix test

* Add test

* Loads more tests

* Add tests for openid errors

* improve comment

* update to develop commit

* Add JWT parsing

* Use JWT

* Cleanup

* fixup tests

* fixup tests

* lint

* lint lint

* Fix `Reconnecting`
2025-12-29 17:45:41 +00:00
Timo K 0f5c5d8be5 cleanup based on new js-sdk impl 2025-12-29 17:38:54 +01:00
Timo K 852d2ee375 after merge cleanup 2025-12-22 13:35:40 +01:00
Timo K e78f37a6b3 Merge branch 'livekit' into toger5/lib-ec-version 2025-12-22 12:43:09 +01:00
Timo K ab7e3486b3 Make use of the new jwt service endpoint (with delayed event delegation)
This also does all the compatibility work. When to use which endpoint to
authenticate agains a jwt service.
2025-12-17 09:53:49 +01:00
Robin 2c54263b2f Don't show 'waiting for media' on connected participants
We would show 'waiting for media' on participants that were connected but had no published tracks, because we were filtering them out of the remote participants list on connections. I believe this was done in an attempt to limit our view to only the participants that have a matching MatrixRTC membership. But that's fully redundant to the "Matrix-LiveKit members" module, which actually has the right information to do this (the MatrixRTC memberships).
2025-12-15 15:26:42 -05:00
Robin e3b4ffb801 Merge branch 'livekit' into local-remote-confusion 2025-12-15 13:17:13 -05:00
Timo K 08306d663a remove duplicated connecting state and update Test setup 2025-12-11 16:04:12 +01:00
Timo K e626698fda fix connection tests 2025-12-10 21:22:55 +01:00
Timo K bf801364a6 cleanup and tests 2025-12-09 15:23:30 +01:00
Robin 47cd343d44 Prove that the remote members modules only output remote members
They had loose types that were allowing them also output local members. They don't do this, it's just misleading.
2025-12-08 23:01:44 -05:00
Timo K 2e646bfac1 Unify LiveKit and Matrix connection states 2025-12-02 19:49:13 +01:00
Timo K ab675cf00b fix test caused by remoteParticipantsWithTracks->remoteParticipants 2025-12-01 20:26:54 +01:00
Timo K af47002613 Refactor local membership publisher and connectionState related logic 2025-12-01 20:14:29 +01:00
Timo K 284a52c23c mvp 2025-12-01 12:44:41 +01:00
Timo K d22d7460fe Another larger refactor to fix sfu switches and in general proper
cleanup.
2025-11-25 20:18:34 +01:00
Valere 614762b5f8 fixup headers 2025-11-18 10:13:10 +01:00
Valere FedronicandTimo K 8ce8067956 Adding more logs (#3563)
* Adding more logs

* post merge fix

* fixup merge error

* review

---------

Co-authored-by: Timo K <toger5@hotmail.de>
2025-11-14 16:18:31 +01:00
Timo K 0115242a2b tests first batch 2025-11-13 11:35:37 +01:00
Timo KandValere 9f4d954cfa The source of the local participant is the createLocalMembership$ and
not the MatrixLivekitMembers!

Co-authored-by: Valere <bill.carson@valrsoft.com>
2025-11-12 12:09:31 +01:00
Timo K 8671d3fd67 Very bit test overhaul. All displayname tests are now done in the
Metadata file. and not in the CallViewModel anymore.
2025-11-11 15:52:35 +01:00
Timo K e741285b11 Fix lints, move CallViewModel.test.ts. Fix audio renderer 2025-11-07 14:04:40 +01:00
Timo K 92fdce33ea pull out all screen share related logic. 2025-11-07 08:44:56 +01:00