import LocalStream from '../singleMode/stream/LocalStream';
import RemoteStream from '../singleMode/stream/RemoteStream';
import { PromiseHold, BloudRoomOptions, BloudParticipant } from './type';
import { BJYStream, AgroStream, TencentStream, VloudStream, SubscribeStreamType, PublishStreamType } from './stream';
import { TencentTransportStats, TencentLocalAudioStats, TencentLocalVideoStats, TencentRemoteAudioStats, TencentRemoteVideoStats, ReportStats } from './stats';
export interface BJYClient {
    area: string;
    quit(): void;
    off(eventType: string, callback: any): void;
    on(eventType: string, callback: any): void;
    publish(stream: BJYStream, options: {
        server: string | null;
        video: {
            bandwidth: number;
            firPeriod: number;
            codec: string;
        };
        audio: {
            bandwidth: number;
        };
    }): Promise<{
        server: string;
        userId: string;
        userNumber: string;
    }>;
    unpublish(stream: BJYStream): Promise<any>;
    subscribe(user: {
        userId: string;
        userNumber: string;
    }, options: {
        server?: string | null;
        video?: boolean;
        audio?: boolean;
    }): Promise<{
        server: string;
        userId: string;
        userNumber: string;
        stream: BJYStream;
    }>;
    unsubscribe(userId: string): Promise<any>;
    switchUpServer(server: string): Promise<any>;
    switchDownServer(user: {
        userId: string;
        userNumber: string;
    }, server: string): Promise<any>;
    switchArea(area: string): Promise<any>;
    getStats<T>(userId: string): Promise<T>;
}
export interface AgroClient {
    init(appId: string, onSuccess?: Function, onFailure?: Function): void;
    join(tokenOrKey: string | null, channel: string, uid: number | string | null, onSuccess?: Function, onFailure?: Function): void;
    leave(onSuccess?: Function, onFailure?: Function): void;
    off(eventType: string, callback: any): void;
    on(eventType: string, callback: any): void;
    publish(stream: AgroStream, onFailure?: Function): void;
    unpublish(stream: AgroStream, onFailure?: Function): void;
    subscribe(stream: AgroStream, options?: {
        audio?: boolean;
        video?: boolean;
    }, onFailure?: Function): void;
    unsubscribe(stream: AgroStream, onFailure?: Function): void;
}
export interface TencentClient {
    join({ roomId: string }: {
        roomId: any;
    }): Promise<any>;
    leave(): Promise<any>;
    off(eventType: string, callback?: any): void;
    on(eventType: string, callback: any): void;
    publish(stream: TencentStream): Promise<any>;
    unpublish(stream: TencentStream): Promise<any>;
    subscribe(stream: TencentStream, options?: {
        audio?: boolean;
        video?: boolean;
    }): Promise<any>;
    unsubscribe(stream: TencentStream): Promise<any>;
    setDefaultMuteRemoteStreams(muted: boolean): void;
    getRemoteMutedState(): {
        audioMuted: boolean;
        hasAudio: boolean;
        hasVideo: boolean;
        userId: string;
        videoMuted: boolean;
    }[];
    getTransportStats(): Promise<TencentTransportStats>;
    getLocalAudioStats(): Promise<Record<string, TencentLocalAudioStats>>;
    getLocalVideoStats(): Promise<Record<string, TencentLocalVideoStats>>;
    getRemoteAudioStats(): Promise<Record<string, TencentRemoteAudioStats>>;
    getRemoteVideoStats(): Promise<Record<string, TencentRemoteVideoStats>>;
}
export interface BloudRecorder {
    addEventListener(event: string, handler: Function): void;
    on(event: string, handler: Function): void;
    removeEventListener(event: string, handler: Function): void;
    removeAllListeners(event?: string): void;
    addStream(stream: any): any;
    removeStream(stream: any): any;
    muteAudio(mute: boolean): any;
    start(): any;
    stop(): any;
}
export interface SpeakerDetector {
    addEventListener(event: string, handler: Function): void;
    on(event: string, handler: Function): void;
    removeEventListener(event: string, handler: Function): void;
    removeAllListeners(event?: string): void;
    addStream(stream: any): any;
    removeStream(stream: any): any;
}
export interface BloudRloud {
    constructor(service: string, token: string): BloudRloud;
    Room(options: BloudRoomOptions): BloudClient;
    SharingStream(options: any): VloudStream;
    getUserMedia(options: any): MediaStream;
}
export interface BloudClient {
    getID(): string;
    changeMaster(masterId: string, isKeep?: boolean): any;
    getCreator(): string;
    getName(): string;
    evictUser2(masterId: string, userId: string, withoutBlack: boolean): any;
    evictUser(userId: string): any;
    updateUser(target: string, info: any): any;
    getClient(): any;
    getMessages(startSeq: number, endSeq: number): any;
    getMsgSeq(): number;
    setSecret(secret: string | undefined): any;
    getLimits(): number;
    getSwitch(): Boolean;
    getMaster(): any;
    syncRoom(): Promise<any>;
    getUsers(pageIndex?: number, permission?: string, pageSize?: number): Promise<{
        participants: any[];
        total: number;
    }>;
    update(options: any): Promise<any>;
    getTotalUsers(): number;
    sendMessage(message: string, to: string | undefined): Promise<any>;
    customMessage(message: string, to: string | undefined): Promise<any>;
    getLocalParticipant(): BloudParticipant;
    getRemoteParticipant(pid: string): BloudParticipant;
    getMsgOff(): any;
    getLock(): any;
    setAudioOff(audiooff: boolean, selfopenaudio: boolean): Promise<any>;
    setVideoOff(videooff: boolean): any;
    setMsgOff(msgoff: boolean): any;
    setLock(lock: boolean): any;
    getAudioOff(): boolean;
    getSelfOpenAudio(): boolean;
    getVideoOff(): boolean;
    searchUsers(nickname: string, pageSize: string): Promise<any>;
    subscribe(opt: SubscribeStreamType): Promise<any>;
    unpublish(retry: boolean): Promise<any>;
    publish(opt: PublishStreamType, realRoom: any, realClient: any, realParticipant: any): Promise<any>;
    unsubscribe(): Promise<any>;
    setSwitch(switch_: boolean): any;
    getInfo(): any;
    updateCustomStats(opts: any, replace: boolean): Promise<any>;
    searchUsers(nickname: string, pageSize: number): Promise<any>;
    getCustomStats(): any;
    release(): any;
    syncUser(pageSize?: number): Promise<any>;
    connect(options?: {
        device?: string;
        version?: string;
        platform?: string;
        network?: string;
        role?: string;
    }, sessionId?: string): Promise<{
        sessionId: string;
        callId: string;
    }>;
    options: any;
    duration: number;
    lock: boolean;
    leave(): Promise<any>;
    addEventListener(event: string, handler: Function): void;
    on(event: string, handler: Function): void;
    removeEventListener(event: string, handler: Function): void;
    removeAllListeners(event?: string): void;
    close(): void;
    renewToken(token: string): Promise<any>;
    collectStats(streamId: string, stats: ReportStats, isLocal: boolean, remoteId?: string): void;
    reportAction(type: string, error: boolean, sendTs?: number, receiveTs?: number, options?: string[]): void;
    Recorder(opts: any): BloudRecorder;
    SpeakerDetector(): SpeakerDetector;
}
export interface Client {
    client: BJYClient | AgroClient | TencentClient;
    webrtcType: number;
    appId: string;
    webrtcAppId: string | number;
    token: string;
    roomId: string;
    userId: string;
    sign: string;
    area: string;
    serverUrl: string;
    mode: string;
    codec: string;
    promiseHoldMap: Record<string, PromiseHold>;
    publishStream: LocalStream;
    publishOnly: boolean;
    remoteStreamMap: Record<string, RemoteStream>;
    addRemoteStream(remoteStream: RemoteStream, key: number | string): void;
    getRemoteStream(userId: string): RemoteStream;
    removeRemoteStream(userId: string): RemoteStream;
    unsubscribe(stream: RemoteStream): Promise<any>;
    unpublish(stream: LocalStream): Promise<any>;
    leave(type?: string): Promise<any>;
    reportAction(type: string, error: number, sendTs?: number, receiveTs?: number, options?: string[]): void;
}
export declare type EventType = {
    eventName: string;
    callback: Function;
};
