Skip to content

feat: emit HLS interstitial EXT-X-DATERANGE tags for configured ad breaks - #393

Merged
birme merged 1 commit into
masterfrom
issue-368/interstitial-daterange
Sep 4, 2026
Merged

feat: emit HLS interstitial EXT-X-DATERANGE tags for configured ad breaks#393
birme merged 1 commit into
masterfrom
issue-368/interstitial-daterange

Conversation

@birme

@birme birme commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Changes

  • engine/session.js: add _addInterstitialMetadata(vod, timestamp), invoked at the two content-VOD creation sites (after the existing timedMetadata loop). Reuses the existing per-VOD addMetadata/rangeMetadata daterange pathway — the same mechanism slate VODs already use — so no @eyevinn/hls-vodtolive change is needed (verified the vodlib renders arbitrary daterange keys).
  • Emits #EXT-X-DATERANGE:CLASS="com.apple.hls.interstitial",ID=...,START-DATE=...,PLANNED-DURATION=...,X-ASSET-URI=.... CLASS is the Apple HLS-interstitial spec identifier. Asset source: configured slate.uri, falling back to adServerUri. PLANNED-DURATION derived from slate repetitions×duration (omitted when no slate duration).
  • Strictly gated on adBreak.enabled: when disabled (the default) the helper is a no-op and manifests are byte-identical to before.

Test plan

  • PROOF: npm run build → clean (no errors)
  • PROOF: npm test94 specs, 0 failures, 7 pending specs (baseline 90; +4 specs: enabled w/ slate attributes, enabled fallback to adServerUri, disabled-vs-enabled byte-identical after stripping injected lines, no-op when disabled)

Closes #368

🤖 Automated via Channel Engine Dev daily-backlog-pr skill

…eaks (closes #368)

Reuse the existing per-VOD addMetadata/rangeMetadata daterange pathway to
emit a CLASS="com.apple.hls.interstitial" EXT-X-DATERANGE (ID, START-DATE,
PLANNED-DURATION, X-ASSET-URI) at the ad-break start segment. Strictly gated
on adBreak.enabled so disabled channels serve byte-identical manifests.
Asset URI is sourced from the #367 slate/adServerUri config; the ad endpoint
integration remains out of scope (#370).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@birme birme left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pr-reviewer verdict: APPROVE

  • PROOF: npm run build → clean; npm test94 specs, 0 failures, 7 pending specs.
  • Emits EXT-X-DATERANGE with CLASS="com.apple.hls.interstitial", ID/START-DATE/PLANNED-DURATION/X-ASSET-URI via the existing addMetadata/rangeMetadata daterange pathway (no vodlib change). com.apple.hls.interstitial is the required Apple spec identifier, not a trademark issue.
  • Gate verified correct: disabled (default) = no-op; the disabled-vs-enabled spec proves byte-identity after stripping injected lines.
  • Commit message conforms.

Notes (non-blocking, follow-ups):

  • The vodlib's daterangeAttribute doesn't escape attribute values; X-ASSET-URI is operator-supplied config (not end-user), so low risk — worth upstream URI validation later.
  • Emission fires at every content-VOD boundary since no break-scheduling exists yet; break/slate alignment is deferred to #369.

@birme
birme merged commit 8d3a89b into master Sep 4, 2026
2 checks passed
@birme
birme deleted the issue-368/interstitial-daterange branch September 4, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: emit HLS interstitial (EXT-X-DATERANGE) tags for configured ad breaks

1 participant