node-mac-recorder 1.2.7 → 1.2.8

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.
Files changed (2) hide show
  1. package/index.js +18 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -50,6 +50,9 @@ class MacRecorder extends EventEmitter {
50
50
  // Display cache için async initialization
51
51
  this.cachedDisplays = null;
52
52
  this.refreshDisplayCache();
53
+
54
+ // Native cursor warm-up (cold start delay'ini önlemek için)
55
+ this.warmUpCursor();
53
56
  }
54
57
 
55
58
  /**
@@ -735,6 +738,21 @@ class MacRecorder extends EventEmitter {
735
738
  }
736
739
  }
737
740
 
741
+ /**
742
+ * Native cursor modülünü warm-up yapar (cold start delay'ini önler)
743
+ */
744
+ warmUpCursor() {
745
+ // Async warm-up to prevent blocking constructor
746
+ setTimeout(() => {
747
+ try {
748
+ // Silent warm-up call
749
+ nativeBinding.getCursorPosition();
750
+ } catch (error) {
751
+ // Ignore warm-up errors
752
+ }
753
+ }, 10); // 10ms delay to not block initialization
754
+ }
755
+
738
756
  /**
739
757
  * getCurrentCursorPosition alias for getCursorPosition (backward compatibility)
740
758
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-mac-recorder",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [