mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
Fix missing screen share player
This commit is contained in:
1 parent
42190909e3
commit
acdc7a2330
6 files changed
+70
-38
No files matched your search
@@ -49,9 +49,14 @@ test("screen-share player dimensions follow source orientation and stay inside t
|
||||
|
||||
test("screen-share player keeps a visible fallback width while video metadata is pending", async () => {
|
||||
const css = await readFile(new URL("../src/styles/web-client.css", import.meta.url), "utf8");
|
||||
const component = await readFile(new URL("../src/components/web-client/ScreenSharePlayer.vue", import.meta.url), "utf8");
|
||||
const playerRule = css.match(/:deep\(\.screen-share-player\)\s*\{([^}]*)\}/)?.[1] ?? "";
|
||||
assert.match(playerRule, /width:\s*min\(100%,\s*1100px\)/);
|
||||
assert.doesNotMatch(playerRule, /width:\s*fit-content/);
|
||||
assert.doesNotMatch(component, /ResizeObserver/, "player sizing must not create a resize-feedback loop while video starts");
|
||||
assert.match(component, /if \(playerElement\.value === next\) return;/, "stable function refs must not rewrite player styles on every render");
|
||||
assert.match(component, /if \(stageElement\.value === next\) return;/, "stable function refs must not rewrite stage styles on every render");
|
||||
assert.match(playerRule, /z-index:\s*3/, "the shared video must layer above decorative activity artwork");
|
||||
});
|
||||
|
||||
test("unmount detaches video and retires a pending binding without stopping its stream", async t => {
|
||||
|
||||
@@ -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, "");
|
||||
});
|
||||
Reference in new issue
Block a user