import { AudioTrackType, VideoTrackType } from '../types';
import type { BlockedAudioTracker } from './BlockedAudioTracker';
import type { TrackSubscriptionManager } from './TrackSubscriptionManager';
import { CallState } from '../store';
import { SpeakerManager } from '../devices';
import { Tracer } from '../stats';
/**
 * A manager class that handles dynascale related tasks like:
 *
 * - binding video elements to session ids
 * - binding audio elements to session ids
 */
export declare class DynascaleManager {
    private logger;
    private callState;
    private speaker;
    private readonly tracer;
    private useWebAudio;
    private audioContext;
    private trackSubscriptionManager;
    private blockedAudioTracker;
    /**
     * Creates a new DynascaleManager instance.
     */
    constructor(callState: CallState, speaker: SpeakerManager, tracer: Tracer, trackSubscriptionManager: TrackSubscriptionManager, blockedAudioTracker: BlockedAudioTracker);
    /**
     * Closes the audio context if it was created.
     */
    dispose: () => Promise<void>;
    /**
     * Sets whether to use WebAudio API for audio playback.
     * Must be set before joining the call.
     *
     * @internal
     *
     * @param useWebAudio whether to use WebAudio API.
     */
    setUseWebAudio: (useWebAudio: boolean) => void;
    /**
     * Binds a DOM <video> element to the given session id.
     * This method will make sure that the video element will play
     * the correct video stream for the given session id.
     *
     * Under the hood, it would also keep track of the video element dimensions
     * and update the subscription accordingly in order to optimize the bandwidth.
     *
     * If a "viewport" is configured, the video element will be automatically
     * tracked for visibility and the subscription will be updated accordingly.
     *
     * @param videoElement the video element to bind to.
     * @param sessionId the session id.
     * @param trackType the kind of video.
     */
    bindVideoElement: (videoElement: HTMLVideoElement, sessionId: string, trackType: VideoTrackType) => (() => void) | undefined;
    /**
     * Binds a DOM <audio> element to the given session id.
     *
     * This method will make sure that the audio element will
     * play the correct audio stream for the given session id.
     *
     * @param audioElement the audio element to bind to.
     * @param sessionId the session id.
     * @param trackType the kind of audio.
     * @returns a cleanup function that will unbind the audio element.
     */
    bindAudioElement: (audioElement: HTMLAudioElement, sessionId: string, trackType: AudioTrackType) => (() => void) | undefined;
    private getOrCreateAudioContext;
    private resumeAudioContext;
}
