import { VloudStats } from './stats';
import { BloudClient } from './client';
import { AudioProfile, VideoProfile, ScreenProfile } from './Value';
export interface BJYStream {
    audioTrack: MediaStreamTrack;
    videoTrack: MediaStreamTrack;
    player: {
        _element: HTMLVideoElement;
    };
    stream: MediaStream;
    play: (elementId: string | HTMLVideoElement, options: {
        fit?: 'contain' | 'cover';
        muted?: boolean;
    }) => Promise<any>;
    unplay: () => void;
    stop: () => void;
    close: () => void;
    muteAudio: () => boolean;
    unmuteAudio: () => boolean;
    muteVideo: () => boolean;
    unmuteVideo: () => boolean;
    changeOutputDevice: (deviceId: string) => Promise<any>;
    getAudioLevel: () => number;
    hasAudio: () => boolean;
    hasVideo: () => boolean;
    getAudioTrack: () => MediaStreamTrack;
    getVideoTrack: () => MediaStreamTrack;
    on: (eventName: string, handler: Function) => void;
    off: (eventName: string, handler: Function) => void;
}
export interface AgroStream {
    stream: MediaStream;
    play: (elementId: string, options: {
        fit?: 'contain' | 'cover';
        muted?: boolean;
    }) => Promise<any>;
    stop: () => void;
    close: () => void;
    muteAudio: () => boolean;
    unmuteAudio: () => boolean;
    muteVideo: () => boolean;
    unmuteVideo: () => boolean;
    getId: () => string;
    setAudioOutput(deviceId: string, onSuccess?: Function, onFailure?: Function): void;
    setAudioVolume: (volume: number) => void;
    getAudioLevel: () => number;
    hasAudio: () => boolean;
    hasVideo: () => boolean;
    getAudioTrack: () => MediaStreamTrack;
    getVideoTrack: () => MediaStreamTrack;
    on: (eventName: string, handler: Function) => void;
    off: (eventName: string, handler: Function) => void;
    getStats<T>(): Promise<T>;
}
export interface TencentStream {
    mediaStream_: MediaStream;
    play: (elementId: string | HTMLVideoElement, options: {
        objectFit?: 'contain' | 'cover';
        muted?: boolean;
    }) => Promise<any>;
    stop: () => void;
    close: () => void;
    muteAudio: () => boolean;
    unmuteAudio: () => boolean;
    muteVideo: () => boolean;
    unmuteVideo: () => boolean;
    getId: () => string;
    getUserId: () => string;
    setAudioOutput: (deviceId: string) => Promise<any>;
    setAudioVolume: (volume: number) => void;
    getAudioLevel: () => number;
    hasAudio: () => boolean;
    hasVideo: () => boolean;
    getAudioTrack: () => MediaStreamTrack;
    getVideoTrack: () => MediaStreamTrack;
    on: (eventName: string, handler: Function) => void;
    off: (eventName: string, handler: Function) => void;
    _volumeMeter: ScriptProcessorNode;
    getType: () => 'main' | 'auxiliary';
}
export interface BJYLocalStream extends BJYStream {
    addTrack: (track: MediaStreamTrack) => Promise<any>;
    removeTrack: (track: MediaStreamTrack) => Promise<any>;
    replaceTrack: (track: MediaStreamTrack) => Promise<any>;
    switchDevice: (type: 'audio' | 'video', deviceId: string) => Promise<any>;
}
export interface TencentLocalStream extends TencentStream {
    initialize: () => Promise<any>;
    setAudioProfile: (profile: AudioProfile) => void;
    setVideoProfile: (profile: VideoProfile) => void;
    setScreenProfile: (profile: ScreenProfile) => void;
    switchDevice: (type: 'audio' | 'video', deviceId: string) => Promise<any>;
    addTrack: (track: MediaStreamTrack) => Promise<any>;
    removeTrack: (track: MediaStreamTrack) => Promise<any>;
    replaceTrack: (track: MediaStreamTrack) => Promise<any>;
}
export interface AgroLocalStream extends AgroStream {
    init: (onSuccess?: Function, onFailure?: Function) => void;
    setAudioProfile: (profile: AudioProfile) => void;
    setVideoProfile: (profile: VideoProfile) => void;
    setScreenProfile: (profile: ScreenProfile) => void;
    switchDevice: (type: 'audio' | 'video', deviceId: string) => Promise<any>;
    addTrack: (track: MediaStreamTrack, onSuccess?: Function, onFailure?: Function) => void;
    removeTrack: (track: MediaStreamTrack, onSuccess?: Function, onFailure?: Function) => void;
    replaceTrack: (track: MediaStreamTrack, onSuccess?: Function, onFailure?: Function) => void;
}
export interface BloudStream {
    getID(): string;
    getParticipant(): any;
    publish(options: {
        acodec: string;
        vcodec: string;
        video?: boolean;
        audio?: boolean;
        audio_enable?: boolean;
        video_enable?: boolean;
    }, room: BloudClient, client: any, user: any): Promise<any>;
    unpublish(retry: boolean): Promise<any>;
    subscribe(options: {
        audio: boolean;
        video: boolean;
        vcodec: string;
    }): Promise<any>;
    audioEnabled(): boolean;
    videoEnabled(): boolean;
    addTrack(): Promise<any>;
    removeTrack(): Promise<any>;
    replaceStream(mediaStream: MediaStream, unstop?: boolean): Promise<any>;
    unsubscribe(): Promise<any>;
    getWrStream(): MediaStream;
    getAudioLevel(): number;
    getStats(): VloudStats | void;
    getAudioTrack(): MediaStreamTrack;
    getVideoTrack(): MediaStreamTrack;
    setVideoEnabled(enable: boolean): Promise<any>;
    setAudioEnabled(enable: boolean): Promise<any>;
    on(event: string, handler: Function): void;
    one(event: string, handler: Function): void;
    off(event: string, handler: Function): void;
    removeAllListeners(event?: string): void;
    dispose(retry: boolean): any;
    _volumeMeter: ScriptProcessorNode;
    startCollect(interval: number): void;
    stopCollect(): void;
    muteVideo(): Promise<any>;
    unmuteVideo(): Promise<any>;
    muteAudio(): Promise<any>;
    unmuteAudio(): Promise<any>;
}
