@camstack/addon-pipeline 1.2.332 → 1.2.333

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.
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.2.311",
21
+ version: "1.2.312",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_stream_broker_widgets",
@@ -36,7 +36,7 @@ async function r() {
36
36
  }
37
37
  },
38
38
  "@camstack/types": {
39
- version: "1.2.311",
39
+ version: "1.2.312",
40
40
  scope: "default",
41
41
  shareConfig: {
42
42
  singleton: !0,
@@ -24391,6 +24391,11 @@ var AdaptiveSession = class AdaptiveSession {
24391
24391
  /** Throttle: minimum interval between PLI-triggered keyframe re-sends (ms). */
24392
24392
  static PLI_RESEND_COOLDOWN_MS = 500;
24393
24393
  lastPliResendAt = 0;
24394
+ /** Minimum interval between two "PLI refused while recorded owns the
24395
+ * track" lines; the refusals in between are counted into the next one. */
24396
+ static RECORDED_PLI_LOG_INTERVAL_MS = 1e4;
24397
+ lastRecordedPliLogAt = 0;
24398
+ recordedPliRefusedSinceLog = 0;
24394
24399
  /**
24395
24400
  * Per-session H.265 RTP repacketizer (lazy-init). The H.265 path
24396
24401
  * forwards source RTP from the broker through this repacketizer so
@@ -25560,10 +25565,31 @@ var AdaptiveSession = class AdaptiveSession {
25560
25565
  sessionId: this.sessionId
25561
25566
  } });
25562
25567
  }
25568
+ logRecordedPliRefusal(now) {
25569
+ this.recordedPliRefusedSinceLog += 1;
25570
+ if (now - this.lastRecordedPliLogAt < AdaptiveSession.RECORDED_PLI_LOG_INTERVAL_MS) return;
25571
+ this.lastRecordedPliLogAt = now;
25572
+ const refused = this.recordedPliRefusedSinceLog;
25573
+ this.recordedPliRefusedSinceLog = 0;
25574
+ this.logger.info("PLI during recorded playback — live pre-buffer NOT replayed (recorded owns the track)", {
25575
+ tags: { deviceId: this.deviceId },
25576
+ meta: {
25577
+ phase: "session",
25578
+ sessionId: this.sessionId,
25579
+ deviceId: this.deviceId,
25580
+ refused,
25581
+ windowMs: AdaptiveSession.RECORDED_PLI_LOG_INTERVAL_MS
25582
+ }
25583
+ });
25584
+ }
25563
25585
  handlePli() {
25564
25586
  const now = Date.now();
25565
25587
  if (now - this.lastPliResendAt < AdaptiveSession.PLI_RESEND_COOLDOWN_MS) return;
25566
25588
  this.lastPliResendAt = now;
25589
+ if (this.liveFeedGated) {
25590
+ this.logRecordedPliRefusal(now);
25591
+ return;
25592
+ }
25567
25593
  if (this.activeRtpReplay?.active) {
25568
25594
  this.logger.debug("PLI received — paced pre-buffer replay already in flight", { meta: {
25569
25595
  phase: "session",
@@ -26170,6 +26196,10 @@ var AdaptiveSession = class AdaptiveSession {
26170
26196
  /** When gated, incoming live broker frames are dropped so recorded playback owns the track. */
26171
26197
  setLiveFeedGate(gated) {
26172
26198
  this.liveFeedGated = gated;
26199
+ if (gated) {
26200
+ this.activeRtpReplay?.abort();
26201
+ this.activeRtpReplay = null;
26202
+ }
26173
26203
  this.rtpRebasePending = true;
26174
26204
  this.recordedAudioRebasePending = true;
26175
26205
  }
@@ -24387,6 +24387,11 @@ var AdaptiveSession = class AdaptiveSession {
24387
24387
  /** Throttle: minimum interval between PLI-triggered keyframe re-sends (ms). */
24388
24388
  static PLI_RESEND_COOLDOWN_MS = 500;
24389
24389
  lastPliResendAt = 0;
24390
+ /** Minimum interval between two "PLI refused while recorded owns the
24391
+ * track" lines; the refusals in between are counted into the next one. */
24392
+ static RECORDED_PLI_LOG_INTERVAL_MS = 1e4;
24393
+ lastRecordedPliLogAt = 0;
24394
+ recordedPliRefusedSinceLog = 0;
24390
24395
  /**
24391
24396
  * Per-session H.265 RTP repacketizer (lazy-init). The H.265 path
24392
24397
  * forwards source RTP from the broker through this repacketizer so
@@ -25556,10 +25561,31 @@ var AdaptiveSession = class AdaptiveSession {
25556
25561
  sessionId: this.sessionId
25557
25562
  } });
25558
25563
  }
25564
+ logRecordedPliRefusal(now) {
25565
+ this.recordedPliRefusedSinceLog += 1;
25566
+ if (now - this.lastRecordedPliLogAt < AdaptiveSession.RECORDED_PLI_LOG_INTERVAL_MS) return;
25567
+ this.lastRecordedPliLogAt = now;
25568
+ const refused = this.recordedPliRefusedSinceLog;
25569
+ this.recordedPliRefusedSinceLog = 0;
25570
+ this.logger.info("PLI during recorded playback — live pre-buffer NOT replayed (recorded owns the track)", {
25571
+ tags: { deviceId: this.deviceId },
25572
+ meta: {
25573
+ phase: "session",
25574
+ sessionId: this.sessionId,
25575
+ deviceId: this.deviceId,
25576
+ refused,
25577
+ windowMs: AdaptiveSession.RECORDED_PLI_LOG_INTERVAL_MS
25578
+ }
25579
+ });
25580
+ }
25559
25581
  handlePli() {
25560
25582
  const now = Date.now();
25561
25583
  if (now - this.lastPliResendAt < AdaptiveSession.PLI_RESEND_COOLDOWN_MS) return;
25562
25584
  this.lastPliResendAt = now;
25585
+ if (this.liveFeedGated) {
25586
+ this.logRecordedPliRefusal(now);
25587
+ return;
25588
+ }
25563
25589
  if (this.activeRtpReplay?.active) {
25564
25590
  this.logger.debug("PLI received — paced pre-buffer replay already in flight", { meta: {
25565
25591
  phase: "session",
@@ -26166,6 +26192,10 @@ var AdaptiveSession = class AdaptiveSession {
26166
26192
  /** When gated, incoming live broker frames are dropped so recorded playback owns the track. */
26167
26193
  setLiveFeedGate(gated) {
26168
26194
  this.liveFeedGated = gated;
26195
+ if (gated) {
26196
+ this.activeRtpReplay?.abort();
26197
+ this.activeRtpReplay = null;
26198
+ }
26169
26199
  this.rtpRebasePending = true;
26170
26200
  this.recordedAudioRebasePending = true;
26171
26201
  }
@@ -30,7 +30,7 @@ async function d(e) {
30
30
  }
31
31
  }
32
32
  async function f() {
33
- return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CC0JSUlW.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-a3HMFtd5.mjs")).catch((e) => {
34
34
  throw l = void 0, e;
35
35
  }), l;
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-pipeline",
3
- "version": "1.2.332",
3
+ "version": "1.2.333",
4
4
  "description": "Pipeline bundle — runner, detection, motion, audio + stream broker. Multi-entry npm package shipping pipeline addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",