@@ -45,7 +45,7 @@ async function makeFocusInternal(
|
|||||||
// Prioritize the .well-known/matrix/client, if available, over the configured SFU
|
// Prioritize the .well-known/matrix/client, if available, over the configured SFU
|
||||||
const domain = rtcSession.room.client.getDomain();
|
const domain = rtcSession.room.client.getDomain();
|
||||||
if (localStorage.getItem("timo-focus-url")) {
|
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 = {
|
const focusFromUrl: LivekitFocus = {
|
||||||
type: "livekit",
|
type: "livekit",
|
||||||
livekit_service_url: timoFocusUrl,
|
livekit_service_url: timoFocusUrl,
|
||||||
|
|||||||
@@ -459,8 +459,8 @@ function getRoomMemberFromRtcMember(
|
|||||||
return { id, member };
|
return { id, member };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO-MULTI-SFU Add all device syncing logic from useLivekit
|
||||||
class Connection {
|
class Connection {
|
||||||
// TODO-MULTI-SFU Add all device syncing logic from useLivekit
|
|
||||||
private readonly sfuConfig = getSFUConfigWithOpenID(
|
private readonly sfuConfig = getSFUConfigWithOpenID(
|
||||||
this.client,
|
this.client,
|
||||||
this.serviceUrl,
|
this.serviceUrl,
|
||||||
@@ -521,13 +521,34 @@ class Connection {
|
|||||||
)
|
)
|
||||||
.filter((f) => f.livekit_service_url === this.serviceUrl)
|
.filter((f) => f.livekit_service_url === this.serviceUrl)
|
||||||
.map((f) => f.membership);
|
.map((f) => f.membership);
|
||||||
return publishingMembers
|
|
||||||
.map((m) =>
|
const publishingP = publishingMembers
|
||||||
participants.find(
|
.map((m) => {
|
||||||
(p) => p.identity === `${m.sender}:${m.deviceId}`,
|
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);
|
.filter((p): p is RemoteParticipant => !!p);
|
||||||
|
logger.log(
|
||||||
|
"Publishing participants: find participants for url ",
|
||||||
|
this.serviceUrl,
|
||||||
|
publishingMembers,
|
||||||
|
"Publishing participants: ",
|
||||||
|
publishingP,
|
||||||
|
);
|
||||||
|
return publishingP;
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
[],
|
[],
|
||||||
|
|||||||
Reference in New Issue
Block a user