node-mac-recorder 2.21.36 → 2.21.39
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
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(@"
|
|
382
|
+
MRLog(@"🔧 CRITICAL FIX: Forcing AVFoundation for Electron stability");
|
|
383
|
+
MRLog(@" Reason: ScreenCaptureKit has thread safety issues in Electron (SIGTRAP crashes)");
|
|
383
384
|
}
|
|
384
385
|
|
|
385
|
-
// CRITICAL FIX:
|
|
386
|
-
//
|
|
387
|
-
//
|
|
388
|
-
BOOL forceAVFoundation =
|
|
386
|
+
// CRITICAL FIX: Always use AVFoundation for stability
|
|
387
|
+
// ScreenCaptureKit has file writing issues in Node.js environment
|
|
388
|
+
// AVFoundation works reliably in both Node.js and Electron
|
|
389
|
+
BOOL forceAVFoundation = YES;
|
|
389
390
|
|
|
390
|
-
MRLog(@"🔧 FRAMEWORK SELECTION:
|
|
391
|
+
MRLog(@"🔧 FRAMEWORK SELECTION: Using AVFoundation for stability");
|
|
391
392
|
MRLog(@" Environment: %@", isElectron ? @"Electron" : @"Node.js");
|
|
392
393
|
MRLog(@" macOS: %ld.%ld.%ld", (long)osVersion.majorVersion, (long)osVersion.minorVersion, (long)osVersion.patchVersion);
|
|
393
394
|
|
|
394
|
-
// Electron-first priority:
|
|
395
|
-
//
|
|
396
|
-
// macOS 14/13: Use AVFoundation (ScreenCaptureKit not available)
|
|
395
|
+
// Electron-first priority: ALWAYS use AVFoundation in Electron for stability
|
|
396
|
+
// ScreenCaptureKit has severe thread safety issues in Electron causing SIGTRAP crashes
|
|
397
397
|
if (isM15Plus && !forceAVFoundation) {
|
|
398
398
|
if (isElectron) {
|
|
399
399
|
MRLog(@"⚡ ELECTRON PRIORITY: macOS 15+ Electron → ScreenCaptureKit with full support");
|