node-mac-recorder 2.21.39 → 2.21.40

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.39",
3
+ "version": "2.21.40",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -922,15 +922,9 @@ static BOOL MRIsContinuityCamera(AVCaptureDevice *device) {
922
922
  if (CMTIME_IS_VALID(baseline)) {
923
923
  frameSeconds = CMTimeGetSeconds(CMTimeSubtract(bufferTime, baseline));
924
924
  }
925
- // Adjust camera stop limit by start offset relative to audio
925
+ // Do NOT extend camera stop limit by audio start offset.
926
+ // Clamping to the same stopLimit as audio ensures durations match.
926
927
  double effectiveStopLimit = stopLimit;
927
- if (hasAudioStart && CMTIME_IS_VALID(baseline)) {
928
- CMTime startDeltaTime = CMTimeSubtract(baseline, audioStart);
929
- double startDelta = CMTimeGetSeconds(startDeltaTime);
930
- if (startDelta > 0) {
931
- effectiveStopLimit += startDelta;
932
- }
933
- }
934
928
  double tolerance = self.expectedFrameRate > 0 ? (1.5 / self.expectedFrameRate) : 0.02;
935
929
  if (tolerance < 0.02) {
936
930
  tolerance = 0.02;
@@ -1022,16 +1016,8 @@ static BOOL MRIsContinuityCamera(AVCaptureDevice *device) {
1022
1016
 
1023
1017
  double stopLimit = MRSyncGetStopLimitSeconds();
1024
1018
  if (stopLimit > 0) {
1025
- // Adjust by camera start vs audio start so durations align closely
1026
- CMTime audioStartTS = MRSyncAudioFirstTimestamp();
1027
- if (CMTIME_IS_VALID(audioStartTS) && CMTIME_IS_VALID(self.firstSampleTime)) {
1028
- CMTime startDeltaTS = CMTimeSubtract(self.firstSampleTime, audioStartTS);
1029
- double startDelta = CMTimeGetSeconds(startDeltaTS);
1030
- if (startDelta > 0) {
1031
- stopLimit += startDelta;
1032
- }
1033
- }
1034
-
1019
+ // Do NOT extend camera stop limit by audio start offset.
1020
+ // Using the same stopLimit as audio keeps durations aligned.
1035
1021
  double frameSeconds = CMTimeGetSeconds(relativeTimestamp);
1036
1022
  double tolerance = self.expectedFrameRate > 0 ? (1.5 / self.expectedFrameRate) : 0.02;
1037
1023
  if (tolerance < 0.02) {