Improve behavior in macOS sandbox

This commit is contained in:
yash-signal
2026-03-03 17:24:12 -06:00
committed by GitHub
parent f1c285f58e
commit 0b5b7dc137
7 changed files with 22 additions and 5 deletions

View File

@@ -108,6 +108,15 @@ export class DesktopCapturer {
step: Step.NativeMacOS,
stream: this.#getNativeMacOSStream(),
};
} else if (process.mas) {
// MAS without native ScreenCaptureKit support: desktopCapturer.getSources()
// is unavailable in the App Store sandbox. Gracefully report an error.
this.#state = { step: Step.Error };
options.onError(
new Error(
'Screen sharing requires macOS 15+ on the Mac App Store version'
)
);
} else {
this.#state = { step: Step.RequestingMedia, promise: this.#getStream() };
}