node-mac-recorder 2.21.35 → 2.21.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/mac_recorder.mm +9 -9
package/package.json
CHANGED
package/src/mac_recorder.mm
CHANGED
|
@@ -379,21 +379,21 @@ Napi::Value StartRecording(const Napi::CallbackInfo& info) {
|
|
|
379
379
|
|
|
380
380
|
if (isElectron) {
|
|
381
381
|
MRLog(@"⚡ Electron environment detected");
|
|
382
|
-
MRLog(@"
|
|
383
|
-
MRLog(@" Reason: ScreenCaptureKit has thread safety issues in Electron (SIGTRAP crashes)");
|
|
382
|
+
MRLog(@"✅ ELECTRON-FIRST: Both ScreenCaptureKit and AVFoundation fully supported");
|
|
384
383
|
}
|
|
385
384
|
|
|
386
|
-
// CRITICAL FIX:
|
|
387
|
-
// ScreenCaptureKit
|
|
388
|
-
//
|
|
389
|
-
BOOL forceAVFoundation =
|
|
385
|
+
// CRITICAL FIX: Use ScreenCaptureKit on macOS 15+ for best compatibility
|
|
386
|
+
// Both ScreenCaptureKit and AVFoundation work in Electron (Electron-first design)
|
|
387
|
+
// Only fallback to AVFoundation if ScreenCaptureKit is unavailable
|
|
388
|
+
BOOL forceAVFoundation = NO; // Let system choose based on availability
|
|
390
389
|
|
|
391
|
-
MRLog(@"🔧 FRAMEWORK SELECTION:
|
|
390
|
+
MRLog(@"🔧 FRAMEWORK SELECTION: Smart selection based on macOS version");
|
|
392
391
|
MRLog(@" Environment: %@", isElectron ? @"Electron" : @"Node.js");
|
|
393
392
|
MRLog(@" macOS: %ld.%ld.%ld", (long)osVersion.majorVersion, (long)osVersion.minorVersion, (long)osVersion.patchVersion);
|
|
394
393
|
|
|
395
|
-
// Electron-first priority:
|
|
396
|
-
//
|
|
394
|
+
// Electron-first priority: Both frameworks fully supported in Electron
|
|
395
|
+
// macOS 15+: Try ScreenCaptureKit first (better performance)
|
|
396
|
+
// macOS 14/13: Use AVFoundation (ScreenCaptureKit not available)
|
|
397
397
|
if (isM15Plus && !forceAVFoundation) {
|
|
398
398
|
if (isElectron) {
|
|
399
399
|
MRLog(@"⚡ ELECTRON PRIORITY: macOS 15+ Electron → ScreenCaptureKit with full support");
|