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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-mac-recorder",
3
- "version": "2.21.35",
3
+ "version": "2.21.36",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -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(@"🔧 CRITICAL FIX: Forcing AVFoundation for Electron stability");
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: 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;
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: Using AVFoundation for stability");
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: ALWAYS use AVFoundation in Electron for stability
396
- // ScreenCaptureKit has severe thread safety issues in Electron causing SIGTRAP crashes
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");