node-mac-recorder 2.10.17 → 2.10.18
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/quick-test.js +31 -43
- package/src/window_selector.mm +9 -11
package/package.json
CHANGED
package/quick-test.js
CHANGED
|
@@ -1,50 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const WindowSelector = require("./window-selector");
|
|
2
4
|
|
|
3
5
|
async function quickTest() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
console.log("🧪 Quick Window Selector Test");
|
|
7
|
+
console.log("============================
|
|
8
|
+
");
|
|
9
|
+
|
|
10
|
+
const selector = new WindowSelector();
|
|
11
|
+
|
|
8
12
|
try {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
console.log(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
console.log('\n⚠️ Sistem sesi cihazı yok');
|
|
26
|
-
console.log('💡 BlackHole veya Soundflower yüklemen gerekiyor');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Kısa test kayıt
|
|
30
|
-
console.log('\n🔴 2 saniyelik test kayıt başlıyor...');
|
|
31
|
-
console.log('🎵 Şimdi müzik çal!');
|
|
32
|
-
|
|
33
|
-
await recorder.startRecording('./test-output/quick-test.mov', {
|
|
34
|
-
includeSystemAudio: true,
|
|
35
|
-
includeMicrophone: false,
|
|
36
|
-
systemAudioDeviceId: sysDevice?.id,
|
|
37
|
-
captureArea: { x: 0, y: 0, width: 200, height: 150 }
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
41
|
-
await recorder.stopRecording();
|
|
42
|
-
|
|
43
|
-
console.log('✅ Test tamamlandı! ./test-output/quick-test.mov dosyasını kontrol et');
|
|
44
|
-
|
|
13
|
+
console.log("✅ Starting window selection...");
|
|
14
|
+
console.log("🎯 Hover over windows to see highlighting (no border)");
|
|
15
|
+
console.log("🔒 Window dragging should be blocked");
|
|
16
|
+
console.log("⌛ Test will auto-stop in 15 seconds
|
|
17
|
+
");
|
|
18
|
+
|
|
19
|
+
await selector.startSelection();
|
|
20
|
+
|
|
21
|
+
// Auto stop after 15 seconds
|
|
22
|
+
setTimeout(async () => {
|
|
23
|
+
console.log("
|
|
24
|
+
⏹️ Auto-stopping test...");
|
|
25
|
+
await selector.cleanup();
|
|
26
|
+
process.exit(0);
|
|
27
|
+
}, 15000);
|
|
28
|
+
|
|
45
29
|
} catch (error) {
|
|
46
|
-
console.error(
|
|
30
|
+
console.error("❌ Test failed:", error.message);
|
|
31
|
+
await selector.cleanup();
|
|
32
|
+
process.exit(1);
|
|
47
33
|
}
|
|
48
34
|
}
|
|
49
35
|
|
|
50
|
-
|
|
36
|
+
if (require.main === module) {
|
|
37
|
+
quickTest().catch(console.error);
|
|
38
|
+
}
|
package/src/window_selector.mm
CHANGED
|
@@ -95,27 +95,17 @@ void updateScreenOverlays();
|
|
|
95
95
|
xRadius:8.0
|
|
96
96
|
yRadius:8.0];
|
|
97
97
|
|
|
98
|
-
// Fill color based on toggle state
|
|
98
|
+
// Fill color based on toggle state - no border
|
|
99
99
|
NSColor *fillColor;
|
|
100
|
-
NSColor *strokeColor;
|
|
101
|
-
CGFloat lineWidth;
|
|
102
100
|
|
|
103
101
|
if (self.isToggled) {
|
|
104
102
|
fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.4];
|
|
105
|
-
strokeColor = [NSColor colorWithRed:0.45 green:0.25 blue:0.75 alpha:0.9];
|
|
106
|
-
lineWidth = 3.0;
|
|
107
103
|
} else {
|
|
108
104
|
fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.4];
|
|
109
|
-
strokeColor = [NSColor whiteColor];
|
|
110
|
-
lineWidth = 1.0;
|
|
111
105
|
}
|
|
112
106
|
|
|
113
107
|
[fillColor setFill];
|
|
114
108
|
[highlightPath fill];
|
|
115
|
-
|
|
116
|
-
[strokeColor setStroke];
|
|
117
|
-
[highlightPath setLineWidth:lineWidth];
|
|
118
|
-
[highlightPath stroke];
|
|
119
109
|
}
|
|
120
110
|
|
|
121
111
|
- (void)updateAppearance {
|
|
@@ -1586,6 +1576,14 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
|
|
|
1586
1576
|
}
|
|
1587
1577
|
|
|
1588
1578
|
@try {
|
|
1579
|
+
// Clean up any existing overlay first
|
|
1580
|
+
if (g_overlayWindow) {
|
|
1581
|
+
[g_overlayWindow close];
|
|
1582
|
+
g_overlayWindow = nil;
|
|
1583
|
+
g_overlayView = nil;
|
|
1584
|
+
g_selectButton = nil;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1589
1587
|
// Get all windows
|
|
1590
1588
|
g_allWindows = [getAllSelectableWindows() retain];
|
|
1591
1589
|
|