node-mac-recorder 2.6.10 → 2.6.12

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.6.10",
3
+ "version": "2.6.12",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -84,10 +84,14 @@ void updateScreenOverlays();
84
84
  // Inactive window appearance set
85
85
  }
86
86
 
87
- // No border to match screen selector
88
- self.layer.borderColor = [[NSColor clearColor] CGColor];
89
- self.layer.borderWidth = 0.0;
90
- self.layer.cornerRadius = 0.0;
87
+ // No border to match screen selector
88
+ self.layer.borderColor = [[NSColor clearColor] CGColor];
89
+ self.layer.borderWidth = 0.0;
90
+ self.layer.cornerRadius = 0.0;
91
+ self.layer.masksToBounds = YES;
92
+ self.layer.shadowOpacity = 0.0;
93
+ self.layer.shadowRadius = 0.0;
94
+ self.layer.shadowOffset = NSMakeSize(0, 0);
91
95
  }
92
96
 
93
97
  - (void)setIsActiveWindow:(BOOL)isActiveWindow {
@@ -116,6 +120,10 @@ void updateScreenOverlays();
116
120
  // Ensure no borders or decorations
117
121
  self.layer.borderWidth = 0.0;
118
122
  self.layer.cornerRadius = 0.0;
123
+ self.layer.masksToBounds = YES;
124
+ self.layer.shadowOpacity = 0.0;
125
+ self.layer.shadowRadius = 0.0;
126
+ self.layer.shadowOffset = NSMakeSize(0, 0);
119
127
  }
120
128
  return self;
121
129
  }
@@ -172,6 +180,10 @@ void updateScreenOverlays();
172
180
  // Ensure no borders or decorations
173
181
  self.layer.borderWidth = 0.0;
174
182
  self.layer.cornerRadius = 0.0;
183
+ self.layer.masksToBounds = YES;
184
+ self.layer.shadowOpacity = 0.0;
185
+ self.layer.shadowRadius = 0.0;
186
+ self.layer.shadowOffset = NSMakeSize(0, 0);
175
187
  self.isActiveScreen = NO;
176
188
  }
177
189
  return self;
@@ -618,7 +630,7 @@ void updateOverlay() {
618
630
  CABasicAnimation *floatAnimationX = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
619
631
  floatAnimationX.fromValue = @(-4.0);
620
632
  floatAnimationX.toValue = @(4.0);
621
- floatAnimationX.duration = 2.5; // Faster animation
633
+ floatAnimationX.duration = 1.0; // Much faster animation
622
634
  floatAnimationX.repeatCount = HUGE_VALF;
623
635
  floatAnimationX.autoreverses = YES;
624
636
  floatAnimationX.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
@@ -1033,11 +1045,23 @@ bool startScreenSelection() {
1033
1045
  [overlayWindow setMovable:NO];
1034
1046
  [overlayWindow setMovableByWindowBackground:NO];
1035
1047
 
1048
+ // Force remove all borders and decorations
1049
+ [overlayWindow setHasShadow:NO];
1050
+ [overlayWindow setOpaque:NO];
1051
+ [overlayWindow setBackgroundColor:[NSColor clearColor]];
1052
+
1036
1053
  // Create overlay view
1037
1054
  ScreenSelectorOverlayView *overlayView = [[ScreenSelectorOverlayView alloc] initWithFrame:screenFrame];
1038
1055
  [overlayView setScreenInfo:screenInfo];
1039
1056
  [overlayWindow setContentView:overlayView];
1040
1057
 
1058
+ // Force window layer to have no borders
1059
+ [overlayWindow setWantsLayer:YES];
1060
+ overlayWindow.layer.borderWidth = 0.0;
1061
+ overlayWindow.layer.borderColor = [[NSColor clearColor] CGColor];
1062
+ overlayWindow.layer.cornerRadius = 0.0;
1063
+ overlayWindow.layer.masksToBounds = YES;
1064
+
1041
1065
  // Create select button with more padding
1042
1066
  NSButton *selectButton = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 200, 60)];
1043
1067
  [selectButton setTitle:@"Start Record"];
@@ -1161,7 +1185,7 @@ bool startScreenSelection() {
1161
1185
  CABasicAnimation *screenFloatAnimationX = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
1162
1186
  screenFloatAnimationX.fromValue = @(-4.0);
1163
1187
  screenFloatAnimationX.toValue = @(4.0);
1164
- screenFloatAnimationX.duration = 2.8; // Slightly different timing for variety
1188
+ screenFloatAnimationX.duration = 1.2; // Much faster animation
1165
1189
  screenFloatAnimationX.repeatCount = HUGE_VALF;
1166
1190
  screenFloatAnimationX.autoreverses = YES;
1167
1191
  screenFloatAnimationX.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
@@ -1324,9 +1348,21 @@ bool showScreenRecordingPreview(NSDictionary *screenInfo) {
1324
1348
  [overlayWindow setMovable:NO];
1325
1349
  [overlayWindow setMovableByWindowBackground:NO];
1326
1350
 
1351
+ // Force remove all borders and decorations
1352
+ [overlayWindow setHasShadow:NO];
1353
+ [overlayWindow setOpaque:NO];
1354
+ [overlayWindow setBackgroundColor:[NSColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.5]];
1355
+
1327
1356
  [overlayWindow orderFront:nil];
1328
1357
  [overlayWindow makeKeyAndOrderFront:nil];
1329
1358
 
1359
+ // Force window layer to have no borders
1360
+ [overlayWindow setWantsLayer:YES];
1361
+ overlayWindow.layer.borderWidth = 0.0;
1362
+ overlayWindow.layer.borderColor = [[NSColor clearColor] CGColor];
1363
+ overlayWindow.layer.cornerRadius = 0.0;
1364
+ overlayWindow.layer.masksToBounds = YES;
1365
+
1330
1366
  // Store for cleanup (reuse recording preview window variable)
1331
1367
  if (!g_recordingPreviewWindow) {
1332
1368
  g_recordingPreviewWindow = overlayWindow;
@@ -1387,10 +1423,22 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1387
1423
  [g_overlayWindow setMovable:NO];
1388
1424
  [g_overlayWindow setMovableByWindowBackground:NO];
1389
1425
 
1426
+ // Force remove all borders and decorations
1427
+ [g_overlayWindow setHasShadow:NO];
1428
+ [g_overlayWindow setOpaque:NO];
1429
+ [g_overlayWindow setBackgroundColor:[NSColor clearColor]];
1430
+
1390
1431
  // Create overlay view
1391
1432
  g_overlayView = [[WindowSelectorOverlayView alloc] initWithFrame:initialFrame];
1392
1433
  [g_overlayWindow setContentView:g_overlayView];
1393
1434
 
1435
+ // Force window layer to have no borders
1436
+ [g_overlayWindow setWantsLayer:YES];
1437
+ g_overlayWindow.layer.borderWidth = 0.0;
1438
+ g_overlayWindow.layer.borderColor = [[NSColor clearColor] CGColor];
1439
+ g_overlayWindow.layer.cornerRadius = 0.0;
1440
+ g_overlayWindow.layer.masksToBounds = YES;
1441
+
1394
1442
  // Additional window styling to ensure no borders or decorations
1395
1443
  [g_overlayWindow setMovable:NO];
1396
1444
  [g_overlayWindow setMovableByWindowBackground:NO];
@@ -1413,6 +1461,8 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1413
1461
  [g_selectButton.layer setShadowRadius:0.0];
1414
1462
  [g_selectButton.layer setShadowOffset:NSMakeSize(0, 0)];
1415
1463
  [g_selectButton.layer setMasksToBounds:YES];
1464
+ [g_selectButton.layer setBorderWidth:0.0];
1465
+ [g_selectButton.layer setBorderColor:[[NSColor clearColor] CGColor]];
1416
1466
 
1417
1467
  // Clean white text - normal weight
1418
1468
  NSMutableAttributedString *titleString = [[NSMutableAttributedString alloc]
@@ -1452,6 +1502,8 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1452
1502
  [cancelButton.layer setShadowRadius:0.0];
1453
1503
  [cancelButton.layer setShadowOffset:NSMakeSize(0, 0)];
1454
1504
  [cancelButton.layer setMasksToBounds:YES];
1505
+ [cancelButton.layer setBorderWidth:0.0];
1506
+ [cancelButton.layer setBorderColor:[[NSColor clearColor] CGColor]];
1455
1507
 
1456
1508
  // Clean white text for cancel button
1457
1509
  NSMutableAttributedString *cancelTitleString = [[NSMutableAttributedString alloc]