import { AudioPlayer } from "./AudioPlayer"; /** * Plays an audio representation of a given message by converting the base64 payload (wav) to an ArrayBuffer * and then feeding this ArrayBuffer into the Web Audio API. * * To keep it simple this implementation makes the rather naive assumption that all messages that should be played * will be added to the queue before playing the first (initial) message is done. * This assumption is made to avoid complex Promise heavy code and/or a while loop that may completely block * the front-end. */ export declare class BufferedAudioPlayer implements AudioPlayer { /** * Singleton to prevent the existence of multiple audio players and therefore overlapping. * @returns {AudioPlayer} */ static instance(): AudioPlayer; private static INSTANCE; private readonly queue; private readonly audioContext; private state; /** * Adds a message to the Queue and starts playing queued messages. * @param {Map} message */ play(message: any): void; private playAudio; }