native-recorder-nodejs 1.0.7 → 1.0.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.
package/CMakeLists.txt CHANGED
@@ -29,6 +29,7 @@ if(WIN32)
29
29
  )
30
30
  add_definitions(-DNAPI_CPP_EXCEPTIONS -DWIN32_LEAN_AND_MEAN)
31
31
  elseif(APPLE)
32
+ set(CMAKE_OSX_DEPLOYMENT_TARGET "13.0")
32
33
  set(CMAKE_OBJCXX_FLAGS "${CMAKE_OBJCXX_FLAGS} -fobjc-arc")
33
34
  list(APPEND ENGINE_SOURCES
34
35
  native/mac/AVFEngine.mm
package/README.md CHANGED
@@ -21,8 +21,8 @@ High-performance, low-latency native audio recording SDK for Node.js. Supports b
21
21
  | ------------- | ------------ | ----------- | ----------------------- |
22
22
  | Windows 10/11 | x64 | Supported | Supported (per-device) |
23
23
  | Windows 10/11 | ia32 | Supported | Supported (per-device) |
24
- | macOS 12.3+ | arm64 | Supported | Supported (system-wide) |
25
- | macOS 12.3+ | x64 | Supported | Supported (system-wide) |
24
+ | macOS 13.0+ | arm64 | Supported | Supported (system-wide) |
25
+ | macOS 13.0+ | x64 | Supported | Supported (system-wide) |
26
26
 
27
27
  ### Platform Differences
28
28
 
@@ -31,7 +31,7 @@ High-performance, low-latency native audio recording SDK for Node.js. Supports b
31
31
  | Input Devices | Multiple (WASAPI) | Multiple (AVFoundation) |
32
32
  | Output Devices | Multiple (per-device) | Single "System Audio" device |
33
33
  | Permissions | None required | Microphone + Screen Recording |
34
- | Min OS Version | Windows 10+ | macOS 12.3+ (for system audio) |
34
+ | Min OS Version | Windows 10+ | macOS 13.0+ (for system audio) |
35
35
 
36
36
  ## Installation
37
37
 
@@ -77,10 +77,10 @@ void AVFEngine::Start(const std::string &deviceType, const std::string &deviceId
77
77
  return;
78
78
  }
79
79
 
80
- if (@available(macOS 12.3, *)) {
80
+ if (@available(macOS 13.0, *)) {
81
81
  [impl->sckCapture startWithCallback:dataCb errorCallback:errorCb];
82
82
  } else {
83
- if (errorCb) errorCb("System audio recording requires macOS 12.3 or later.");
83
+ if (errorCb) errorCb("System audio recording requires macOS 13.0 or later.");
84
84
  }
85
85
  return;
86
86
  }
@@ -166,7 +166,7 @@ std::vector<AudioDevice> AVFEngine::GetDevices() {
166
166
  }
167
167
 
168
168
  // Add system audio output device (only one on macOS)
169
- if (@available(macOS 12.3, *)) {
169
+ if (@available(macOS 13.0, *)) {
170
170
  AudioDevice systemDevice;
171
171
  systemDevice.id = AudioEngine::SYSTEM_AUDIO_DEVICE_ID;
172
172
  systemDevice.name = "System Audio";
@@ -217,7 +217,7 @@ PermissionStatus AVFEngine::CheckPermission() {
217
217
  // Check screen capture permission (for system audio)
218
218
  // ScreenCaptureKit doesn't have a direct permission check API,
219
219
  // but we can check if we can get shareable content
220
- if (@available(macOS 12.3, *)) {
220
+ if (@available(macOS 13.0, *)) {
221
221
  __block BOOL hasScreenPermission = NO;
222
222
  dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
223
223
 
@@ -255,7 +255,7 @@ bool AVFEngine::RequestPermission(PermissionType type) {
255
255
  }
256
256
  else if (type == PermissionType::System) {
257
257
  // Request screen capture permission for system audio
258
- if (@available(macOS 12.3, *)) {
258
+ if (@available(macOS 13.0, *)) {
259
259
  // Attempting to get shareable content will trigger the permission prompt
260
260
  // if not already granted
261
261
  [SCShareableContent getShareableContentWithCompletionHandler:^(SCShareableContent * _Nullable shareableContent, NSError * _Nullable error) {
@@ -29,7 +29,7 @@
29
29
  self.dataCallback = dataCb;
30
30
  self.errorCallback = errorCb;
31
31
 
32
- if (@available(macOS 12.3, *)) {
32
+ if (@available(macOS 13.0, *)) {
33
33
  [SCShareableContent getShareableContentExcludingDesktopWindows:YES
34
34
  onScreenWindowsOnly:NO
35
35
  completionHandler:^(SCShareableContent *content, NSError *error) {
@@ -76,12 +76,12 @@
76
76
  });
77
77
  }];
78
78
  } else {
79
- if (self.errorCallback) self.errorCallback("ScreenCaptureKit is only available on macOS 12.3+");
79
+ if (self.errorCallback) self.errorCallback("ScreenCaptureKit audio capture requires macOS 13.0+");
80
80
  }
81
81
  }
82
82
 
83
83
  - (void)stop {
84
- if (@available(macOS 12.3, *)) {
84
+ if (@available(macOS 13.0, *)) {
85
85
  if (self.stream) {
86
86
  [self.stream stopCaptureWithCompletionHandler:nil];
87
87
  self.stream = nil;
@@ -92,7 +92,7 @@
92
92
  - (void)stream:(SCStream *)stream didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer ofType:(SCStreamOutputType)type {
93
93
  if (type != SCStreamOutputTypeAudio || !self.dataCallback) return;
94
94
 
95
- if (@available(macOS 12.3, *)) {
95
+ if (@available(macOS 13.0, *)) {
96
96
  CMFormatDescriptionRef formatDesc = CMSampleBufferGetFormatDescription(sampleBuffer);
97
97
  const AudioStreamBasicDescription *asbd = CMAudioFormatDescriptionGetStreamBasicDescription(formatDesc);
98
98
 
@@ -203,7 +203,7 @@
203
203
 
204
204
  // SCStreamDelegate method
205
205
  - (void)stream:(SCStream *)stream didStopWithError:(NSError *)error {
206
- if (@available(macOS 12.3, *)) {
206
+ if (@available(macOS 13.0, *)) {
207
207
  if (error && self.errorCallback) {
208
208
  self.errorCallback("Stream stopped with error: " + std::string(error.localizedDescription.UTF8String));
209
209
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-recorder-nodejs",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Cross-platform (Win/Mac) Native Audio SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",