mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-24 23:05:49 +00:00
Merge pull request #661 from webadderallorg/fix/windows-wgc-window-capture
fix(windows): use WGC for window capture
This commit is contained in:
@@ -164,8 +164,12 @@ describe("shouldUseNativeWindowsCaptureForSource", () => {
|
||||
expect(shouldUseNativeWindowsCaptureForSource({ id: "screen:101:0" })).toBe(true);
|
||||
});
|
||||
|
||||
it("routes window sources through browser capture", () => {
|
||||
expect(shouldUseNativeWindowsCaptureForSource({ id: "window:123456:0" })).toBe(false);
|
||||
it("keeps native Windows capture on window sources", () => {
|
||||
expect(shouldUseNativeWindowsCaptureForSource({ id: "window:123456:0" })).toBe(true);
|
||||
});
|
||||
|
||||
it("keeps browser capture for non-desktop sources", () => {
|
||||
expect(shouldUseNativeWindowsCaptureForSource({ id: "browser-tab:abc" })).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -213,7 +213,10 @@ export function resolveBrowserCaptureCursorPolicy({
|
||||
export function shouldUseNativeWindowsCaptureForSource(
|
||||
source: Pick<ProcessedDesktopSource, "id"> | null | undefined,
|
||||
): boolean {
|
||||
return source?.id?.startsWith("screen:") === true;
|
||||
return (
|
||||
source?.id?.startsWith("screen:") === true ||
|
||||
source?.id?.startsWith("window:") === true
|
||||
);
|
||||
}
|
||||
|
||||
export function createProcessedMicrophoneConstraints(
|
||||
|
||||
Reference in New Issue
Block a user