electron/shell/browser/api/electron_api_desktop_capturer_mac.mm
Keeley Hammond 309d5dade3
feat: add support for system picker in setDisplayMediaRequestHandler (#43581)
* tmp

* feat: add support for system picker in setDisplayMediaRequestHandler

* oops

* Apply suggestions from code review

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* stuff

* well...

* seems legit

* chore: update patch to handle screenCapturer

* feat: modify API to use useSystemPicker

* fix: gate ScreenCaptureKitPicker to macos 15 or higher

* fix: don't use native picker with legacy media selection

* chore: code review, boolean set & docs update

* fix: add cancelCallback

* docs: clarify session & desktopCapturer docs

---------

Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
Co-authored-by: Samuel Attard <sam@electronjs.org>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2024-09-10 16:05:57 -07:00

17 lines
406 B
Text

// Copyright (c) 2024 Salesforce, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/browser/api/electron_api_desktop_capturer.h"
namespace electron::api {
// static
bool DesktopCapturer::IsDisplayMediaSystemPickerAvailable() {
if (@available(macOS 15.0, *)) {
return true;
}
return false;
}
} // namespace electron::api