/** Group Audio Protocol client wrapper. */ import { PayloadCodec } from "./native"; import { MlsContext } from "./mls"; import { GroupNode, OutboundFrame } from "./node"; /** Outcome of {@link GapClient.accept}. */ export interface GapAcceptResult { status: "new" | "late" | "error" | string; source?: number; seq?: number; bytes?: number; reason?: string; } /** * Group Audio Protocol client. * * Maintains a per-source ``rtp_sequence`` window and validates * ``key_phase`` against the current group epoch. */ export declare class GapClient { /** Native handle (i32). */ handle: number; private constructor(); /** Create a fresh GAP client. */ static create(): GapClient; /** * Send an Opus audio frame. * @param codec - payload encoding; use `PayloadCodec.FlatBuffers` for lowest latency. */ send(node: GroupNode, mls: MlsContext, target: number, mediaSourceId: number, rtpTimestamp: bigint, opus: Buffer, codec?: PayloadCodec): OutboundFrame; /** * Accept a plaintext payload delivered by the GBP layer. * `codec` must match the `codec` field of the `payload_received` event. */ accept(plaintext: Buffer, currentEpoch: bigint | number, codec?: PayloadCodec): GapAcceptResult; /** Clear the replay window. Intended for use after an epoch change. */ reset(): void; /** Release the native handle. Idempotent. */ close(): void; [Symbol.dispose](): void; } //# sourceMappingURL=gap.d.ts.map