Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { type LivekitTransportConfig } from "matrix-js-sdk/lib/matrixrtc";
import { combineLatest, map, of, switchMap } from "rxjs";
import { combineLatest, map, of, skipWhile, switchMap } from "rxjs";

Check failure on line 10 in src/state/CallViewModel/remoteMembers/ConnectionManager.ts

View workflow job for this annotation

GitHub Actions / Lint, format & type check

'skipWhile' is defined but never used
import { type Logger } from "matrix-js-sdk/lib/logger";
import { type RemoteParticipant } from "livekit-client";
import { type CallMembershipIdentityParts } from "matrix-js-sdk/lib/matrixrtc/EncryptionManager";
Expand Down Expand Up @@ -131,6 +131,12 @@
// Combine local and remote transports into one transport array
// and set the forceOldJwtEndpoint property on the local transport
map(([remoteTransports, localTransport]) => {
if (!localTransport) {
// Dont return any transports as long as there is no local transport.
// Otherwise we might end up with two connections since the local transport will already connect to the SFU.
// The local transport needs to connect with dedicated logic to also setup delayed event delegation.
return new Epoch([]);
}
let localTransportAsArray: LocalTransportWithSFUConfig[] = [];
if (localTransport) {
localTransportAsArray = [localTransport];
Expand Down
Loading