import type { ComputeAwareConfig, SegmentPerfStat } from "@hevcjs/core"; type ShakaPlayer = any; export interface ShakaComputeAwareOptions 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). */ onObservation?: (stat: SegmentPerfStat, avgSpeedX: number, capIndex: number | null, reason: "init" | "hold" | "lower" | "raise") => void; } /** * Attach the compute-aware ABR feedback loop to a Shaka player. * * Must be called after `new shaka.Player()`. Safe to call before * `player.load()`: variants are looked up lazily as segments arrive. * * @returns cleanup function — unsubscribes the perf-bus listener. * Does NOT clear any restriction already applied to the player. If you * want to restore an unbounded ABR, call * `player.configure({ abr: { restrictions: { maxHeight: Infinity, maxBandwidth: Infinity }}})` * after detaching. */ export declare function attachShakaComputeAware(player: ShakaPlayer, options?: ShakaComputeAwareOptions): () => void; export {}; //# sourceMappingURL=compute-aware.d.ts.map