Skip to content

chore: document HLS-interstitial ad-break configuration and behavior - #396

Merged
birme merged 1 commit into
masterfrom
issue-371/document-adbreak-config
Sep 4, 2026
Merged

chore: document HLS-interstitial ad-break configuration and behavior#396
birme merged 1 commit into
masterfrom
issue-371/document-adbreak-config

Conversation

@birme

@birme birme commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Changes

  • docs/reference.md: new "Ad-break configuration (HLS interstitials)" section — field tables for adBreak (enabled, adServerUri, slate.{uri,repetitions,duration}) with types/defaults/validation, plus the ad-replacement flow.
  • README.md: Features bullet, an "Ad breaks (HLS interstitials)" subsection linking to the reference, and the new example in the examples list.
  • examples/adbreak.ts: minimal channel wired with a per-channel adBreak (enabled + adServerUri + slate) and an engine-level disabled default, matching default.ts style. Vendor-neutral throughout (uses ad-endpoint.example.com).

Test plan

  • PROOF: npm run build && npm test → 113 specs, 0 failures, 7 pending. New examples/adbreak.ts compiles under the repo tsconfig (part of the TS build).

Closes #371

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

@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 && npm test → 113 specs, 0 failures, 7 pending.

Accuracy cross-checked against code (all match):

  • adBreak.enabled (bool, default false), adServerUri (required-when-enabled, validated absolute http/https) — server.ts AdBreakOpts/normalizeAdBreak.
  • slate.{uri, repetitions=10, duration=4000} — server.ts SlateOpts + defaults.
  • 2s timeout, Accept: application/json, {assetUri}|{assetList}|{assets:[]} → X-ASSET-URI/X-ASSET-LIST, EXT-X-DATERANGE com.apple.hls.interstitial emission, PLANNED-DURATION = reps×duration/1000, slate fallback on timeout/non-2xx/malformed — session.js.

No trademarks (example uses ad-endpoint.example.com). examples/adbreak.ts compiles as part of the TS build. Style matches existing examples/docs.

Non-blocking note for a future code PR: engine/server.ts:34-35 carries a stale comment saying interstitial tags aren't emitted yet (they now are) — pre-existing on master, out of scope for this docs PR. Merging.

@birme
birme merged commit e9d9a5e into master Sep 4, 2026
2 checks passed
@birme
birme deleted the issue-371/document-adbreak-config branch September 4, 2026 14:07
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.

chore: document SGAI HLS-interstitial ad-break configuration and behavior

1 participant