import type { ComputeAwareConfig, ComputeAwareDecision, SegmentPerfStat } from "@hevcjs/core"; type HlsInstance = any; export interface HlsComputeAwareOptions extends ComputeAwareConfig { /** * Optional sink for telemetry — called on every observation, not just * cap changes. Useful for plotting speedX over time in a demo. * * `reason` is the decider's verdict on this observation: * `init` (window not full yet) | `hold` (no change) | * `lower` (cap stepped down) | `raise` (cap stepped up) | * `floor` (would step down, already on the lowest variant). */ onObservation?: (stat: SegmentPerfStat, avgSpeedX: number, capIndex: number | null, reason: ComputeAwareDecision["reason"]) => void; } /** * Attach the compute-aware ABR feedback loop to an Hls instance. * * Safe to call before `loadSource()`: levels are looked up lazily as * segments arrive. * * @returns cleanup function — unsubscribes the perf-bus listener. * Does NOT clear any cap already applied. To restore an unbounded ABR * after detaching, set `hls.autoLevelCapping = -1`. */ export declare function attachHlsComputeAware(hls: HlsInstance, options?: HlsComputeAwareOptions): () => void; export {}; //# sourceMappingURL=compute-aware.d.ts.map