import { Observable } from 'rxjs';
import { Call } from '../Call';
import { TrackPublishOptions } from '../rtc';
import { DeviceManagerState } from './DeviceManagerState';
import { ScopedLogger } from '../logger';
import { TrackType } from '../gen/video/sfu/models/models';
import { MediaStreamFilter, MediaStreamFilterRegistrationResult } from './filters';
export declare abstract class DeviceManager<S extends DeviceManagerState<C>, C = MediaTrackConstraints> {
    /**
     * if true, stops the media stream when call is left
     */
    stopOnLeave: boolean;
    logger: ScopedLogger;
    state: S;
    /**
     * When `true`, the `apply()` method will skip automatically enabling/disabling
     * the device based on server defaults (`mic_default_on`, `camera_default_on`).
     *
     * This is useful when application code wants to handle device preferences
     * (e.g., persisted user preferences) and prevent server defaults from
     * overriding them.
     *
     * @default false
     *
     * @internal
     */
    deferServerDefaults: boolean;
    protected readonly call: Call;
    protected readonly trackType: TrackType;
    protected subscriptions: Function[];
    private areSubscriptionsSetUp;
    private isTrackStoppedDueToTrackEnd;
    private filters;
    private statusChangeConcurrencyTag;
    private filterRegistrationConcurrencyTag;
    protected constructor(call: Call, state: S, trackType: TrackType);
    setup(): void;
    /**
     * Lists the available audio/video devices
     *
     * Note: It prompts the user for a permission to use devices (if not already granted)
     *
     * @returns an Observable that will be updated if a device is connected or disconnected
     */
    listDevices(): Observable<MediaDeviceInfo[]>;
    /**
     * Returns `true` when this device is in enabled state.
     */
    get enabled(): boolean;
    /**
     * Starts stream.
     */
    enable(): Promise<void>;
    /**
     * Stops or pauses the stream based on state.disableMode
     */
    disable(options: {
        forceStop?: boolean;
    }): Promise<void>;
    disable(forceStop?: boolean): Promise<void>;
    /**
     * Returns a promise that resolves when all pe
     */
    statusChangeSettled(): Promise<void>;
    /**
     * If status was previously enabled, it will re-enable the device.
     */
    resume(): Promise<void>;
    /**
     * If the current device status is disabled, it will enable the device,
     * else it will disable it.
     */
    toggle(): Promise<void>;
    /**
     * Registers a filter that will be applied to the stream.
     *
     * The registered filter will get the existing stream, and it should return
     * a new stream with the applied filter.
     *
     * @param filter the filter to register.
     * @returns MediaStreamFilterRegistrationResult
     */
    registerFilter(filter: MediaStreamFilter): MediaStreamFilterRegistrationResult;
    /**
     * Will set the default constraints for the device.
     *
     * @param constraints the constraints to set.
     */
    setDefaultConstraints(constraints: C): void;
    /**
     * Selects a device.
     *
     * Note: This method is not supported in React Native
     * @param deviceId the device id to select.
     */
    select(deviceId: string | undefined): Promise<void>;
    /**
     * Disposes the manager.
     *
     * @internal
     */
    dispose: () => void;
    protected applySettingsToStream(): Promise<void>;
    protected abstract getDevices(): Observable<MediaDeviceInfo[]>;
    protected abstract getStream(constraints: C): Promise<MediaStream>;
    protected publishStream(stream: MediaStream, options?: TrackPublishOptions): Promise<void>;
    protected stopPublishStream(): Promise<void>;
    protected getTracks(): MediaStreamTrack[];
    protected muteStream(stopTracks?: boolean): Promise<void>;
    private disableTracks;
    private enableTracks;
    private stopTracks;
    private muteLocalStream;
    protected unmuteStream(): Promise<void>;
    private get mediaDeviceKind();
    private handleDisconnectedOrReplacedDevices;
    private findDevice;
}
