import type { PluginContext } from '@openplayerjs/core'; import type { AdSessionStrategy, AdsPluginConfig } from '../types'; /** * Server-side ad insertion strategy. * * Responsibilities: * - Discover hls.js metadata TextTrack objects created by * `enableDateRangeMetadataCues` / `enableID3MetadataCues`. * - Subscribe to DOM `cuechange` events; parse SCTE-35 splice commands * from active cues (DataCue ArrayBuffer path for ID3, or custom attributes * for EXT-X-DATERANGE). * - Track active ad breaks and emit IAB quartile events via `timeupdate`. * - Report all lifecycle events through the configured `AdEventSink`. * * What this strategy does NOT do: * - Fetch VAST/VMAP (no outbound ad-tagged network requests — ad-blocker-proof). * - Render an ad