Don't cause the local tile to disappear when joining

Before you're connected to the SFU the local participant object will have the empty string as its ID. This changes to your actual ID once you've connected. Apparently I tried to fix this by forcing the local ID to always be the string 'local' but then I just forgot to use it correctly :)
This commit is contained in:
Robin
2024-10-24 17:20:56 -04:00
parent fbf754972b
commit 339a98d1e1
2 changed files with 9 additions and 9 deletions

View File

@@ -199,7 +199,7 @@ test("participants are retained during a focus switch", () => {
a: {
type: "grid",
spotlight: undefined,
grid: [":0", `${aliceId}:0`, `${bobId}:0`],
grid: ["local:0", `${aliceId}:0`, `${bobId}:0`],
},
},
);
@@ -243,12 +243,12 @@ test("screen sharing activates spotlight layout", () => {
a: {
type: "grid",
spotlight: undefined,
grid: [":0", `${aliceId}:0`, `${bobId}:0`],
grid: ["local:0", `${aliceId}:0`, `${bobId}:0`],
},
b: {
type: "spotlight-landscape",
spotlight: [`${aliceId}:0:screen-share`],
grid: [":0", `${aliceId}:0`, `${bobId}:0`],
grid: ["local:0", `${aliceId}:0`, `${bobId}:0`],
},
c: {
type: "spotlight-landscape",
@@ -256,17 +256,17 @@ test("screen sharing activates spotlight layout", () => {
`${aliceId}:0:screen-share`,
`${bobId}:0:screen-share`,
],
grid: [":0", `${aliceId}:0`, `${bobId}:0`],
grid: ["local:0", `${aliceId}:0`, `${bobId}:0`],
},
d: {
type: "spotlight-landscape",
spotlight: [`${bobId}:0:screen-share`],
grid: [":0", `${aliceId}:0`, `${bobId}:0`],
grid: ["local:0", `${aliceId}:0`, `${bobId}:0`],
},
e: {
type: "spotlight-landscape",
spotlight: [`${aliceId}:0`],
grid: [":0", `${aliceId}:0`, `${bobId}:0`],
grid: ["local:0", `${aliceId}:0`, `${bobId}:0`],
},
},
);