/** * The RTCMediaManager class provides a default set of behavior to handle * input and output audio to the Realtime model. It may be sufficient for some * basic use cases, but for more advanced integrations, you will probably want * to configure the RTCPeerConnection and media streams manually via the * `configurePeerConnection` option of the client's `start` method. * * The media manager can be controlled (if present) via the `mediaManager` * property of the Realtime client object. */ export default class RTCMediaManager { /** * RTCPeerConnection established by the Realtime client after `start` is * called. */ peerConnection: RTCPeerConnection; /** * Audio element created to facilitate audio playback from the model */ audioElement?: HTMLAudioElement; /** * Current audio input stream fetched from getUserMedia */ currentInputStream?: MediaStream; /** logger passed from the client */ private log; /** error logger passed from the client */ private error; /** * Create a basic media handler for the connection to the Realtime model. * * @param peerConnection RTCPeerConnection to configure */ constructor(peerConnection: RTCPeerConnection, log: (content: any) => void, error: (content: any) => void); /** * Attach listeners, get access to local devices, create and configure media * streams. */ init(): Promise; /** * Configure audio input, with a listener to replace the current stream if * the input devices change. */ private setupAudioInput; /** * Disable input audio to the model. */ pauseAudioInput(): void; /** * Resume input audio to the model. */ resumeAudioInput(): void; /** * Disable output audio from the model. */ pauseAudioOutput(): void; /** * Resume output audio from the model. */ resumeAudioOutput(): void; /** * Cleanup for internal state */ stop(): void; } //# sourceMappingURL=RTCMediaManager.d.ts.map