import { MediaConfig } from "media/MediaConfig";
export declare class MediaDevice {
    Id: string;
    Name: string;
}
declare class DeviceInfoInternal extends MediaDevice {
    fallbackLabel: string;
    isLabelGuessed: boolean;
    kind: MediaDeviceKind;
}
export interface DeviceApiOnChanged {
    (): void;
}
type DeviceDictionary = {
    [id: string]: DeviceInfoInternal;
};
export declare class DeviceApi {
    static ENUM_FAILED: string;
    private static sVideoDeviceInfo;
    private static sAudioInputDeviceInfo;
    private static sAccessStream;
    private static sLastUpdate;
    /**
     * Returns time in ms when the device list was last updated
     */
    static get LastUpdate(): number;
    /** True if the device list was updated at least once
     *
     */
    static get HasInfo(): boolean;
    private static sIsPending;
    /** True if a device list was requiested
     * but the results are not yet available
     */
    static get IsPending(): boolean;
    private static sLastError;
    /** Returns the last error detected
     *
     */
    private static get LastError();
    /**List of event handlers that are triggered when
     * the device list was updated
     */
    private static sUpdateEvents;
    /** Adds a new event handler
     *
     * @param evt
     */
    static AddOnChangedHandler(evt: DeviceApiOnChanged): void;
    /** Removes an event handler
     *
     * @param evt
     */
    static RemOnChangedHandler(evt: DeviceApiOnChanged): void;
    private static TriggerChangedEvent;
    private static InternalOnEnum;
    static get VideoDevices(): DeviceDictionary;
    static GetVideoDevices(): string[];
    static GetVideoInputDevices(): MediaDevice[];
    static GetAudioInputDevices(): MediaDevice[];
    static Reset(): void;
    private static InternalOnErrorCatch;
    private static InternalOnErrorString;
    private static InternalOnStream;
    /**Updates the device list based on the current
     * access. Gives the devices numbers if the name isn't known.
     */
    static Update(): void;
    /**Updates the device list and allows to wait until the results
     * are available
     *
     * @returns
     */
    static UpdateAsync(): Promise<void>;
    /**Checks if the API is available in the browser.
     * false - browser doesn't support this API
     * true - browser supports the API (might still refuse to give
     * us access later on)
     */
    static IsApiAvailable(): boolean;
    /**Asks the user for access first to get the full
     * device names.
     */
    static RequestUpdate(): void;
    static GetDeviceId(label: string): string;
    static IsUserMediaAvailable(): boolean;
    static ToConstraints(config: MediaConfig): MediaStreamConstraints;
    static getBrowserUserMedia(constraints?: MediaStreamConstraints): Promise<MediaStream>;
    static getAssetUserMedia(config: MediaConfig): Promise<MediaStream>;
}
export {};
