Remove unused method
The doc comment here was about to become stale, so let's just remove it.
This commit is contained in:
@@ -6,10 +6,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 {
|
import { type LivekitTransport } from "matrix-js-sdk/lib/matrixrtc";
|
||||||
type LivekitTransport,
|
|
||||||
type ParticipantId,
|
|
||||||
} from "matrix-js-sdk/lib/matrixrtc";
|
|
||||||
import { combineLatest, map, of, switchMap, tap } from "rxjs";
|
import { combineLatest, map, of, switchMap, tap } from "rxjs";
|
||||||
import { type Logger } from "matrix-js-sdk/lib/logger";
|
import { type Logger } from "matrix-js-sdk/lib/logger";
|
||||||
import { type RemoteParticipant } from "livekit-client";
|
import { type RemoteParticipant } from "livekit-client";
|
||||||
@@ -57,34 +54,20 @@ export class ConnectionManagerData {
|
|||||||
const key = transport.livekit_service_url + "|" + transport.livekit_alias;
|
const key = transport.livekit_service_url + "|" + transport.livekit_alias;
|
||||||
return this.store.get(key)?.[1] ?? [];
|
return this.store.get(key)?.[1] ?? [];
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Get all connections where the given participant is publishing.
|
|
||||||
* In theory, there could be several connections where the same participant is publishing but with
|
|
||||||
* only well behaving clients a participant should only be publishing on a single connection.
|
|
||||||
* @param participantId
|
|
||||||
*/
|
|
||||||
public getConnectionsForParticipant(
|
|
||||||
participantId: ParticipantId,
|
|
||||||
): Connection[] {
|
|
||||||
const connections: Connection[] = [];
|
|
||||||
for (const [connection, participants] of this.store.values()) {
|
|
||||||
if (participants.some((p) => p.identity === participantId)) {
|
|
||||||
connections.push(connection);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return connections;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
scope: ObservableScope;
|
scope: ObservableScope;
|
||||||
connectionFactory: ConnectionFactory;
|
connectionFactory: ConnectionFactory;
|
||||||
inputTransports$: Behavior<Epoch<LivekitTransport[]>>;
|
inputTransports$: Behavior<Epoch<LivekitTransport[]>>;
|
||||||
logger: Logger;
|
logger: Logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO - write test for scopes (do we really need to bind scope)
|
// TODO - write test for scopes (do we really need to bind scope)
|
||||||
export interface IConnectionManager {
|
export interface IConnectionManager {
|
||||||
connectionManagerData$: Behavior<Epoch<ConnectionManagerData>>;
|
connectionManagerData$: Behavior<Epoch<ConnectionManagerData>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crete a `ConnectionManager`
|
* Crete a `ConnectionManager`
|
||||||
* @param scope the observable scope used by this object.
|
* @param scope the observable scope used by this object.
|
||||||
|
|||||||
Reference in New Issue
Block a user