add logging

Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Timo K
2025-08-28 11:18:38 +02:00
parent 8ffb360114
commit 33bc78eec1
2 changed files with 29 additions and 8 deletions

View File

@@ -45,7 +45,7 @@ async function makeFocusInternal(
// Prioritize the .well-known/matrix/client, if available, over the configured SFU
const domain = rtcSession.room.client.getDomain();
if (localStorage.getItem("timo-focus-url")) {
const timoFocusUrl = JSON.parse(localStorage.getItem("timo-focus-url")!);
const timoFocusUrl = localStorage.getItem("timo-focus-url")!;
const focusFromUrl: LivekitFocus = {
type: "livekit",
livekit_service_url: timoFocusUrl,

View File

@@ -459,8 +459,8 @@ function getRoomMemberFromRtcMember(
return { id, member };
}
// TODO-MULTI-SFU Add all device syncing logic from useLivekit
class Connection {
// TODO-MULTI-SFU Add all device syncing logic from useLivekit
private readonly sfuConfig = getSFUConfigWithOpenID(
this.client,
this.serviceUrl,
@@ -521,13 +521,34 @@ class Connection {
)
.filter((f) => f.livekit_service_url === this.serviceUrl)
.map((f) => f.membership);
return publishingMembers
.map((m) =>
participants.find(
(p) => p.identity === `${m.sender}:${m.deviceId}`,
),
)
const publishingP = publishingMembers
.map((m) => {
logger.log(
"Publishing participants: all participants at: ",
this.livekitAlias,
this.serviceUrl,
participants,
);
return participants.find((p) => {
logger.log(
"Publishing participants: compare",
p.identity,
"===",
`${m.sender}:${m.deviceId}`,
);
return p.identity === `${m.sender}:${m.deviceId}`;
});
})
.filter((p): p is RemoteParticipant => !!p);
logger.log(
"Publishing participants: find participants for url ",
this.serviceUrl,
publishingMembers,
"Publishing participants: ",
publishingP,
);
return publishingP;
}),
),
[],