@apocaliss92/nodelink-js 0.4.5 → 0.4.7

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.
@@ -3740,6 +3740,19 @@ var BaichuanVideoStream = class _BaichuanVideoStream extends EventEmitter {
3740
3740
  // Stateful AES decryptor for fragmented BcMedia packets (full_aes mode)
3741
3741
  // In CFB mode, continuation frames must use the cipher state from previous frames.
3742
3742
  aesStreamDecryptor = null;
3743
+ /**
3744
+ * Pending startup error stashed when emitSafeError is called before any
3745
+ * "error" listener is registered (e.g. camera returns 400 during start()).
3746
+ * The rfc4571-server's waitForKeyframe can consume this immediately instead
3747
+ * of waiting for the full keyframe timeout.
3748
+ */
3749
+ _pendingStartupError;
3750
+ /** Consume and clear any pending startup error. */
3751
+ consumePendingStartupError() {
3752
+ const err = this._pendingStartupError;
3753
+ this._pendingStartupError = void 0;
3754
+ return err;
3755
+ }
3743
3756
  emitSafeError(err) {
3744
3757
  if (!this.active) {
3745
3758
  this.logger?.warn?.(
@@ -3751,6 +3764,7 @@ var BaichuanVideoStream = class _BaichuanVideoStream extends EventEmitter {
3751
3764
  this.logger?.warn?.(
3752
3765
  `[BaichuanVideoStream] Unhandled stream error: ${err.message}`
3753
3766
  );
3767
+ this._pendingStartupError = err;
3754
3768
  return;
3755
3769
  }
3756
3770
  this.emit("error", err);
@@ -7783,4 +7797,4 @@ export {
7783
7797
  parseRecordingFileName,
7784
7798
  ReolinkCgiApi
7785
7799
  };
7786
- //# sourceMappingURL=chunk-DEOMUWBN.js.map
7800
+ //# sourceMappingURL=chunk-TR3V5FTO.js.map