import { P2PDerivedTiming } from '../Loaders/P2PDerivedTiming'; /** What the XHR P2P branch knows about one segment while it waits for peer bytes. */ export interface P2PWaitState { /** V2 outcome: 'peer' once a peer was asked, 'cdn' once V2 gave up, undefined while the election runs. */ dispatch?: 'peer' | 'cdn'; /** When the peer was asked (ms epoch), 0 when no peer was asked. */ requestedAt: number; /** When the XHR started waiting (ms epoch). */ startedAt: number; /** Bytes received from the peer so far. */ receivedBytes: number; } /** * Whether the XHR P2P branch should stop waiting for peer bytes and go to the CDN, and why; '' means keep * waiting. Android `P2pProvider.fetch` timing: as soon as no peer is elected the request goes to the CDN; * with a peer, the first byte must arrive within `firstByteTimeoutMs` of asking it and the whole segment * within `fallbackBudgetMs`. If V2 has not decided after one election window plus one first-byte wait, * the request stops waiting too. */ export declare function p2pWaitGiveUpReason(state: P2PWaitState, timing: P2PDerivedTiming, now: number): string;