feat: emit HLS interstitial EXT-X-DATERANGE tags for configured ad breaks - #393
Merged
Conversation
…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
commented
Sep 4, 2026
birme
left a comment
Contributor
Author
There was a problem hiding this comment.
pr-reviewer verdict: APPROVE
- PROOF:
npm run build→ clean;npm test→94 specs, 0 failures, 7 pending specs. - Emits
EXT-X-DATERANGEwithCLASS="com.apple.hls.interstitial", ID/START-DATE/PLANNED-DURATION/X-ASSET-URI via the existingaddMetadata/rangeMetadatadaterange pathway (no vodlib change).com.apple.hls.interstitialis 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
daterangeAttributedoesn't escape attribute values;X-ASSET-URIis 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EXT-X-DATERANGEtags for a configured ad break (builds on the feat: add ad-break/interstitial channel configuration surface #367 config surface). Asset resolution via the ad-serving endpoint is feat: integrate configurable ad-serving endpoint for interstitial asset resolution #370; slate/duration alignment is feat: coordinate slate playout with interstitial ad breaks #369.Changes
engine/session.js: add_addInterstitialMetadata(vod, timestamp), invoked at the two content-VOD creation sites (after the existingtimedMetadataloop). Reuses the existing per-VODaddMetadata/rangeMetadatadaterange pathway — the same mechanism slate VODs already use — so no@eyevinn/hls-vodtolivechange is needed (verified the vodlib renders arbitrary daterange keys).#EXT-X-DATERANGE:CLASS="com.apple.hls.interstitial",ID=...,START-DATE=...,PLANNED-DURATION=...,X-ASSET-URI=....CLASSis the Apple HLS-interstitial spec identifier. Asset source: configuredslate.uri, falling back toadServerUri.PLANNED-DURATIONderived from slate repetitions×duration (omitted when no slate duration).adBreak.enabled: when disabled (the default) the helper is a no-op and manifests are byte-identical to before.Test plan
npm run build→ clean (no errors)npm test→94 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