Fix missing screen share player

This commit is contained in:
illusia committed 2026-10-12 08:25:57 +08:00
1 parent 42190909e3
commit acdc7a2330
6 files changed
+70 -38

No files matched your search

+13
View File
@@ -139,3 +139,16 @@ test("ICE configuration belongs to each controller independently", async () => {
]);
} finally { second.stopTransport(false); }
});
test("viewer visibility follows the selected stream so the player and card cannot disagree", async () => {
assert.equal(controller.api.screenShareViewing.value, false);
assert.equal(controller.api.screenShareViewingStreamId.value, "");
controller.handleMessage({ type: "screenShareJoined", stream: remote });
assert.equal(controller.api.screenShareViewing.value, true);
assert.equal(controller.api.screenShareViewingStreamId.value, remote.streamId);
controller.handleMessage({ type: "screenShareStopped", streamId: remote.streamId });
assert.equal(controller.api.screenShareViewing.value, false);
assert.equal(controller.api.screenShareViewingStreamId.value, "");
});