/** * Channel classes for managing capture channels with pause/resume functionality */ import type { BinaryChannel, TrackTypeValue } from './types'; /** * Base Channel class representing a capture channel */ export declare class Channel { #private; readonly id: string; readonly name: string; readonly type: 'audio' | 'video'; store: boolean; isPrimary: boolean; constructor(data: BinaryChannel, client?: ChannelClient); /** * Set the client reference for pause/resume operations * @internal */ setClient(client: ChannelClient): void; /** * Get the track type for this channel * @internal */ protected getTrackType(): TrackTypeValue | null; /** * Pause this channel * @throws Error if client is not set or track type is unknown */ pause(): Promise; /** * Resume this channel * @throws Error if client is not set or track type is unknown */ resume(): Promise; /** * Convert channel to dictionary for API requests */ toDict(): { channel_id: string; type: string; name: string; store: boolean; is_primary: boolean; }; toString(): string; } /** * Audio channel class for microphone and system audio */ export declare class AudioChannel extends Channel { constructor(data: BinaryChannel, client?: ChannelClient); toString(): string; } /** * Video channel class for screen/display capture */ export declare class VideoChannel extends Channel { constructor(data: BinaryChannel, client?: ChannelClient); toString(): string; } /** * List subclass with a default property for channel collections */ export declare class ChannelList extends Array { /** * Get the first (default) channel, or undefined if empty */ get default(): T | undefined; } /** * Container for available channels, grouped by type */ export declare class Channels { /** Microphone channels */ mics: ChannelList; /** Display/screen channels */ displays: ChannelList; /** System audio channels */ systemAudio: ChannelList; /** Camera channels (not yet supported for capture) */ cameras: ChannelList; constructor(mics?: AudioChannel[], displays?: VideoChannel[], systemAudio?: AudioChannel[], cameras?: VideoChannel[]); /** * Return a flat list of all capturable channels (excludes cameras) */ all(): Channel[]; toString(): string; } /** * Interface for the CaptureClient methods needed by Channel * This avoids circular dependency with CaptureClient */ export interface ChannelClient { pauseTracks(tracks: TrackTypeValue[]): Promise; resumeTracks(tracks: TrackTypeValue[]): Promise; } /** * Factory function to create typed channels from binary channel data */ export declare function createChannel(data: BinaryChannel, client?: ChannelClient): Channel; /** * Group channels by type into a Channels container */ export declare function groupChannels(channels: Array>, client?: ChannelClient): Channels;