import { AudioPlayer, type AudioPlayerOptions } from './AudioPlayer'; import { AudioPlaybackArbiter } from './AudioPlaybackArbiter'; import type { AudioPlaybackArbiterState } from './AudioPlaybackArbiter'; export type AudioPlayerPoolState = AudioPlaybackArbiterState; export type AudioPlayerPoolOptions = { /** * Decides which player may play and owns the element they share. Pools given the same arbiter * cannot play over each other (`Channel` and `Thread` pools share one). Defaults to an arbiter * used by this pool alone. */ arbiter?: AudioPlaybackArbiter; }; export declare class AudioPlayerPool { private pool; private readonly arbiter; constructor({ arbiter }?: AudioPlayerPoolOptions); /** Playback state is the arbiter's, so every pool sharing one reports the same active player. */ get state(): import("@stream-io/state-store").StateStore; get players(): AudioPlayer[]; get activeAudioPlayer(): AudioPlayer | null; getOrAdd: (params: Omit) => AudioPlayer; /** @see {@link AudioPlaybackArbiter.acquire} */ acquireElement: ({ owner, src }: { owner: AudioPlayer; src: string; }) => HTMLAudioElement; /** @see {@link AudioPlaybackArbiter.release} */ releaseElement: (owner: AudioPlayer) => void; setActiveAudioPlayer: (activeAudioPlayer: AudioPlayer | null) => void; /** * Removes the player from the pool, and clears the active player if it is that one. * @param id - ID of the player to deregister. */ deregister(id: string): void; /** * Disposes the player with `requestRemoval`, which deregisters it from the pool. * @param id - ID of the player to remove. */ remove: (id: string) => void; /** Removes and cleans up all the players from the pool */ clear: () => void; registerSubscriptions: () => void; } //# sourceMappingURL=AudioPlayerPool.d.ts.map