import TIM from '@tencentcloud/chat';
import TencentCloudChat from '@tencentcloud/chat';
import TRTCCloud, { TRTCDeviceInfo, TRTCScreenCaptureSourceInfo } from 'trtc-cloud-js-sdk';
import { TUIRoomInfo, TUIVideoStreamType, TUIVideoQuality, TUIAudioQuality, TUIRole, TUIRoomEvents, TUIRoomType, TUISeatInfo, TUIRequestCallback, TUISpeechMode, TUIMediaDevice, TUISeatLockParams, TUILoginUserInfo, TUIUserInfo, TUIRequest, TUIVideoEncoderParams, TUIResolutionMode, TUISeatMode } from './types';
export * from './types';
export { TRTCDeviceType, TRTCDeviceState, TRTCDeviceInfo, TRTCVideoMirrorType, TRTCVideoRotation, TRTCVideoFillMode, TRTCVideoStreamType, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureSourceType, Rect, TRTCVideoEncParam, TRTCVideoResolution, TRTCVideoResolutionMode, TRTCVolumeInfo, TRTCLogLevel, } from 'trtc-cloud-js-sdk';
export { TRTCCloud, TIM, TencentCloudChat };
/**
 * TUIRoomEngine 提供了音视频房间的能力
 *
 * @class TUIRoomEngine
 */
declare class TUIRoomEngine {
    static className: string;
    private static isReady;
    private roomEngineWASM;
    private static userId;
    private static sdkAppId;
    private static Module;
    private logger;
    private roomId;
    private localVideoQuality;
    private localAudioQuality;
    static setModule(Module: any): void;
    static once(event: string, func: (...args: any[]) => void): void;
    constructor();
    /**
     * @private
     * 调用 TUIRoomEngineWASM 的静态方法
     */
    private static JSCallNativeFunctionPromise;
    /**
     * @private
     * 调用 TUIRoomEngineWASM 的异步方法
     * @param funcName
     * @param args
     */
    private JSCallNativeFunctionPromise;
    private JSCallNativeRequestFunctionPromise;
    /**
     * 登录 TUIRoomEngine
     *
     * @param {object} options
     * @param {number} options.sdkAppId sdkAppId <br>
     * 在 [实时音视频控制台](https://console.cloud.tencent.com/trtc) 单击 **应用管理** > **创建应用** 创建新应用之后，即可在 **应用信息** 中获取 sdkAppId 信息。
     * @param {string} options.userId 用户ID <br>
     * 建议限制长度为32字节，只允许包含大小写英文字母(a-zA-Z)、数字(0-9)及下划线和连词符。
     * @param {string} options.userSig userSig 签名 <br>
     * 计算 userSig 的方式请参考 [UserSig 相关](https://cloud.tencent.com/document/product/647/17275)。
     * @returns {Promise<void>}
     *
     * @example
     * // 登录 TUIRoomEngine
     * await TUIRoomEngine.login({
     *  sdkAppId: 0,   // 填写您申请的 sdkAppId
     *  userId: '',    // 填写您业务对应的 userId
     *  userSig: '',   // 填写服务器或本地计算的 userSig
     * })
     */
    static login(options: {
        sdkAppId: number;
        userId: string;
        userSig: string;
        tim?: TIM;
    }): Promise<void>;
    /**
     * 设置当前用户基本信息（用户名、用户头像）
     *
     * @param {object} options
     * @param {string} options.userName 用户名，必填
     * @param {string} options.avatarUrl 用户头像，必填
     * @param {object=} options.customInfo 用户自定义资料
     * App 管理员可以通过 [即时通信 IM 控制台 > 用户自定义字段](https://console.cloud.tencent.com/im/user-data) 新增自定义资料字段
     * 用户自定义字段生效以后，用户可以调用 setSelfInfo 接口设置自定义资料
     * @returns {Promise<void>}
     *
     * @example
     * // 设置当前用户用户名及用户头像
     * await TUIRoomEngine.setSelfInfo({
     *  userName: '',     // 填写您的新用户名
     *  avatarUrl: '',    // 填写您的新头像地址
     * })
     *
     * // 设置当前用户用户名, 用户头像及用户自定义消息
     * await TUIRoomEngine.setSelfInfo({
     *  userName: '',     // 填写您的新用户名
     *  avatarUrl: '',    // 填写您的新头像地址
     *  customInfo: {     // 填写用户自定义消息
     *    Tag_Profile_Custom_Test: 'value1',
     *    Tag_Profile_Custom_profile: 'value2,
     *  },
     * })
     */
    static setSelfInfo(options: {
        userName: string;
        avatarUrl: string;
        customInfo?: Record<string, any>;
    }): Promise<void>;
    /** 获取当前用户信息接口
     * @returns {Promise<TUILoginUserInfo>} loginUserInfo
     * 该接口返回用户信息
     *
     * @example
     * await TUIRoomEngine.getSelfInfo();
     */
    static getSelfInfo(): Promise<TUILoginUserInfo>;
    /**
     * 登出 TUIRoomEngine, 登出 TUIRoomEngine 时将销毁所有 roomEngine 实例
     *
     * @example
     * await TUIRoomEngine.logout();
     */
    static logout(): Promise<void>;
    /**
     * 主持人创建房间，调用 createRoom 的用户为房间的所有者。创建房间时可设置房间 Id，房间名称，房间类型，发言模式以及房间是否允许加入用户开启音视频，发送消息等功能。
     *
     * @param {object} options
     * @param {string} options.roomId 房间 Id，必填, roomId 限制长度为64字节，且仅支持以下范围的字符集：<br>
     * - 大小写英文字母（a-zA-Z）
     * - 数字（0-9）
     * - 空格 ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ ,
     * @param {string=} [options.roomName=roomId] 房间名称，默认值为 roomId，传入的值不能为空字符串
     * @param {TUIRoomType=} [options.roomType=TUIRoomType.kConference] 房间类型, 默认值为 TUIRoomType.kConference <br>
     * 办公协同、医疗问诊、远程会议、教育场景，roomType 设置为 TUIRoomType.kConference
     * 电商直播、语聊房场景，roomType 设置为 TUIRoomType.kLivingRoom
     * @param {boolean=} [options.isSeatEnabled=false] 是否开启麦位控制，默认值为 false
     * @param {TUISeatMode=} [options.seatMode=TUISeatMode.kFreeToTake] 上麦模式(开启麦位控制后生效)，默认值为 TUISeatMode.kFreeToTake <br>
     * 自由上麦模式，台下观众可以自由上麦，无需申请，seatMode 设置为 TUISeatMode.kFreeToTake
     * 申请上麦模式，台下观众上麦需要房主或者管理员同意后才能上麦，seatMode 设置为 TUISeatMode.kApplyToTake
     * @param {boolean=} [options.isMicrophoneDisableForAllUser=false] 是否开启全员禁麦，默认不开启全员禁麦（创建房间可选参数）
     * @param {boolean=} [options.isCameraDisableForAllUser=false] 是否开启全员禁画，默认不开启全员禁画（创建房间可选参数）
     * @param {boolean=} [options.isMessageDisableForAllUser=false] 是否允许成员发送消息，默认不禁止（创建房间可选参数）
     * @param {number=} options.maxSeatCount 最大麦位数量 （创建房间可选参数）<br>
     * roomType 为 TUIRoomType.kConference (教育及会议场景) 时，maxSeatCount 值不做限制；
     * roomType 为 TUIRoomType.kLivingRoom (直播场景) 时，maxSeatCount 最大限制为 16；
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.createRoom({
     *  roomId: '12345',   // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
     *  roomName: 'Test Room',     // 填入您的房间名称, 房间名称默认为 roomId，最长 30 字节
     *  roomType: TUIRoomType.kConference, // 设置房间类型为 TUIRoomType.kConference 类型
     *  isSeatEnabled: false, // 不开启麦位控制
     * });
     */
    createRoom(options: {
        roomId: string;
        roomName?: string;
        roomType?: TUIRoomType;
        isSeatEnabled?: boolean;
        seatMode?: TUISeatMode;
        isMicrophoneDisableForAllUser?: boolean;
        isCameraDisableForAllUser?: boolean;
        isMessageDisableForAllUser?: boolean;
        maxSeatCount?: number;
    }): Promise<void>;
    /**
     * 进入房间接口
     * @param {object} options
     * @param {string} options.roomId 房间号，字符串类型
     * @returns {Promise<TUIRoomInfo>} roomInfo
     * 该接口返回当前房间信息
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const roomDetailInfo = await roomEngine.enterRoom({
     *  roomId: '12345',
     * });
     */
    enterRoom(options: {
        roomId: string;
    }): Promise<TUIRoomInfo>;
    /**
     * 解散房间接口，解散房间必须由房间所有者发起，解散房间之后房间不可进入
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.destroyRoom();
     */
    destroyRoom(): Promise<void>;
    /**
     * 离开房间接口，用户在执行 enterRoom 之后可通过 exitRoom 离开房间
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.exitRoom();
     */
    exitRoom(): Promise<void>;
    /**
     * 获取房间信息
     * @returns {Promise<TUIRoomInfo>} roomInfo
     * 获取房间信息
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const roomInfo = await roomEngine.fetchRoomInfo();
     */
    fetchRoomInfo(): Promise<TUIRoomInfo>;
    /**
     * 更新房间的名字（仅群主或者管理员可以调用）
     * @param {object} options
     * @param {string} options.roomName 更新当前房间的名字
     * @returns {Promise<void>}
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.createRoom({ roomId: '12345' });
     * await roomEngine.updateRoomNameByAdmin({ roomName: '新的名字' });
     */
    updateRoomNameByAdmin(options: {
        roomName: string;
    }): Promise<void>;
    /**
     * 更新房间的发言模式（仅群主或者管理员可以调用）
     * @deprecated 该接口自 v2.0.0 版本废弃
     * @param {object} options
     * @param {TUISpeechMode} options.speechMode 发言类型
     * @returns {Promise<void>}
     */
    updateRoomSpeechModeByAdmin(options: {
        speechMode: TUISpeechMode;
    }): Promise<void>;
    /**
     * 更新房间上麦模式（仅群主或者管理员可以调用）
     * 房间上麦模式更新后，roomEngine 会通过 TUIRoomEvents.onRoomSeatModeChanged 回调通知房间内用户
     * @since v2.0.0
     * @param {object} options
     * @param {TUISeatMode} options.seatMode 发言类型
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.updateRoomSeatModeByAdmin({
     *   seatMode: TUISeatMode.kApplyToTake,  // 更新为申请上麦模式
     * });
     */
    updateRoomSeatModeByAdmin(options: {
        seatMode: TUISeatMode;
    }): Promise<void>;
    /**
     * 获取当前房间用户列表，注意该接口一次拉取的用户列表量最大为 100 个
     *
     * @param {object=} options 获取用户列表的参数
     * @param {number=} options.nextSequence 偏移量，默认从 0 开始拉取用户<br/>
     * @return {Promise<object>} result
     * result.nextSequence 下一次拉取群组用户的偏移量，如果 nextSequence 为 0 则代表 userList 全部拉下来了
     * result.userInfoList 本次拉取的 userList
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const userList = [];
     * let result;
     * do {
     *  result = await roomEngine.getUserList();
     *  userList.push(...result.userInfoList);
     * } while (result.nextSequence !== 0)
     */
    getUserList(options?: {
        nextSequence?: number;
    }): Promise<Array<TUIUserInfo>>;
    /**
     * 获取用户的详细信息
     * @param {object} options 获取用户信息的参数
     * @param {string} options.userId 根据 userId 获取该用户的详细信息
     * @returns Promise<TUIUserInfo> userInfo
     * 该接口返回指定用户的用户信息
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const userInfo = await roomEngine.getUserInfo({
     *   userId: 'user_12345',
     * });
     */
    getUserInfo(options: {
        userId: string;
    }): Promise<any>;
    /**
     * 设置本地视频流的渲染位置
     * @param {object} options 设置本地视频流的渲染位置的参数
     * @param {string | Array<string>} options.view 本地视频流的渲染位置
     * @returns {Promise<void>}
     * @desc 自 v1.6.1 版本起，setLocalVideoView 不再需要传入 streamType 参数
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     *
     * // 设置本地摄像头流的播放区域为 id 是 'preview-camera' 的 div 元素
     * roomEngine.setLocalVideoView({
     *  view: 'preview-camera',
     * });
     */
    setLocalVideoView(options: {
        view: string | Array<string>;
        streamType?: TUIVideoStreamType;
    }): void;
    /**
     * 打开本地摄像头，开始视频流采集
     * @param {object} options 设置本地流的参数
     * @returns {Promise<void>}
     * @example
     * const roomEngine = new TUIRoomEngine();
     *
     * // 桌面端打开摄像头
     * await roomEngine.openLocalCamera();
     *
     * // 移动端使用前置摄像头打开视频预览
     * await roomEngine.openLocalCamera({ isFrontCamera: true });
     * // 移动端使用后置摄像头打开视频预览
     * await roomEngine.openLocalCamera({ isFrontCamera: false });
     */
    openLocalCamera(options?: {
        isFrontCamera?: boolean;
    }): Promise<void>;
    /**
     * 关闭本地摄像头
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.closeLocalCamera();
     */
    closeLocalCamera(): Promise<void>;
    /**
     * 打开麦克风
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.openLocalMicrophone();
     */
    openLocalMicrophone(): Promise<void>;
    /**
     * 关闭本地麦克风, 停止采集音频流
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.closeLocalMicrophone();
     */
    closeLocalMicrophone(): Promise<void>;
    /**
     * 设置本地视频流的编码参数
     * @param {object} options
     * @param {TUIVideoQuality} options.quality
     *
     * - 360p TUIVideoQuality.kVideoQuality_360p <br/>
     * - 540p TUIVideoQuality.kVideoQuality_540p <br/>
     * - 720p TUIVideoQuality.kVideoQuality_720p <br/>
     * - 1080p TUIVideoQuality.kVideoQuality_1080p <br/>
     *
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.updateVideoQuality({
     *  quality: TUIVideoQuality.kVideoQuality_360p,
     * });
     */
    updateVideoQuality(options: {
        quality: TUIVideoQuality;
    }): Promise<void>;
    /**
     * 设置本地视频流的分辨率模式
     * @param {object} options
     * @param {TUIVideoStreamType} options.streamType
     * @param {TUIResolutionMode} options.resolutionMode
     *
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.setVideoResolutionMode({
     *  type: TUIVideoStreamType.kCameraStream,
     *  resolutionMode: TUIResolutionMode.kResolutionMode_Landscape,
     * });
     */
    setVideoResolutionMode(options: {
        streamType: TUIVideoStreamType;
        resolutionMode: TUIResolutionMode;
    }): Promise<void>;
    /**
     * 设置本地视频流的详细编码参数
     * @param {object} options
     * @param {TUIVideoStreamType} options.streamType
     * @param {TUIVideoEncoderParams} options.encoderParams
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.updateVideoQualityEx({
     *  streamType: TUIVideoStreamType.kCameraStream,
     *  encoderParams: {
     *   videoResolution: TUIVideoQuality.kVideoQuality_720p,
     *   fps: 15,
     *   bitrate: 2000,
     *   resMode: TUIResolutionMode.kResolutionMode_Landscape,
     *  }
     * });
     */
    updateVideoQualityEx(options: {
        streamType: TUIVideoStreamType;
        encoderParams: TUIVideoEncoderParams;
    }): Promise<void>;
    /**
     * 设置本地音频的参数<br/>
     * @param {object} options 设置本地音频的参数
     * @param {TUIAudioQuality} options.quality
     *
     * - TUIAudioQuality.kAudioProfileSpeech：语言模式；采样率：16k<br/>
     * - TUIAudioQuality.kAudioProfileDefault：标准模式（或者默认模式）；采样率：48k<br/>
     * - TUIAudioQuality.kAudioProfileMusic：音乐模式；采样率：48k
     *
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.updateAudioQuality({
     *  quality: TUIAudioQuality.kAudioProfileSpeech,
     * });
     */
    updateAudioQuality(options: {
        quality: TUIAudioQuality;
    }): Promise<void>;
    /**
     * 开始向远端推本地视频流
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.startPushLocalVideo();
     */
    startPushLocalVideo(): Promise<void>;
    /**
     * 停止向远端推本地视频流
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.startPushLocalVideo();
     */
    stopPushLocalVideo(): Promise<void>;
    /**
     * 开始向远端推本地音频流
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.startPushLocalAudio();
     */
    startPushLocalAudio(): Promise<void>;
    /**
     * 停止向远端推本地音频流
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.stopPushLocalAudio();
     */
    stopPushLocalAudio(): Promise<void>;
    /**
     * 开始向远端推本地音频流
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.muteLocalAudio();
     * @since 1.5.1
     */
    muteLocalAudio(): Promise<void>;
    /**
     * 停止向远端推本地音频流
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.unmuteLocalAudio();
     * @since 1.5.1
     */
    unmuteLocalAudio(): Promise<void>;
    /**
     * 设置远端流渲染的区域
     *
     * @param {object} options 设设置远端流渲染区域的参数
     * @param {string} options.userId 用户 Id
     * @param {TUIVideoStreamType} options.streamType 用户流类型
     * @param {string | Array<string>} options.view 播放远端用户流的 div 元素的 id
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     *
     * // 设置远端用户视频流在 id 为 'remote_preview_camera' 的区域播放
     * roomEngine.setRemoteVideoView()({
     *  userId: 'user_1234',
     *  streamType: TUIVideoStreamType.kCameraStream,
     *  view: 'remote_preview_camera',
     * });
     *
     * // 设置远端用户屏幕分享流在 id 为 'remote_preview_screen' 的区域播放
     * roomEngine.setRemoteVideoView()({
     *  userId: 'user_1234',
     *  streamType: TUIVideoStreamType.kScreenStream,
     *  view: 'remote_preview_screen',
     * });
     */
    setRemoteVideoView(options: {
        userId: string;
        streamType: TUIVideoStreamType;
        view: string | Array<string>;
    }): Promise<void>;
    /**
     * 开始播放远端用户视频流
     *
     * @param {object} options 开始播放远端用户视频流的参数
     * @param {string} options.userId 用户 Id
     * @param {TUIVideoStreamType} options.streamType 用户流类型
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.startPlayRemoteVideo({
     *  userId: 'user_1234',
     *  streamType: TUIVideoStreamType.kCameraStream,
     * });
     */
    startPlayRemoteVideo(options: {
        userId: string;
        streamType: TUIVideoStreamType;
    }): Promise<void>;
    /**
     * 停止播放远端用户视频流
     *
     * @param {object} options 停止播放远端用户视频流的参数
     * @param {string} options.userId 用户 Id
     * @param {TUIVideoStreamType} options.streamType 用户流类型<br/>
     *
     * - TUIVideoStreamType.kCameraStream 视频流<br/>
     * - TUIVideoStreamType.kScreenStream 屏幕分享流<br/>
     * - TUIVideoStreamType.kCameraStreamLow 低清视频流
     *
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.stopPlayRemoteVideo({
     *  userId: 'user_1234',
     *  streamType: TUIVideoStreamType.kCameraStream,
     * });
     */
    stopPlayRemoteVideo(options: {
        userId: string;
        streamType: TUIVideoStreamType;
    }): Promise<void>;
    /**
     * 停止远端用户的音频流
     * @param {object} options 停止远端用户音频流的参数
     * @param {string} options.userId 停止远端用户的userId
     * @param {boolean} options.isMute 是否停止远端用户的音频
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.muteRemoteAudioStream({
     *  userId: 'user_1234',
     *  isMute: true,
     * });
     */
    muteRemoteAudioStream(options: {
        userId: string;
        isMute: boolean;
    }): Promise<void>;
    /**
     * 请求远端用户打开媒体设备
     * @param {object} options 请求远端用户打开摄像头的参数
     * @param {string} options.userId 用户 Id
     * @param {TUIMediaDevice} options.device 请求的设备
     * @param {number} options.timeout 超时时间。若 timeout 设置为 0 ，则无超时时间
     * @param {Function} 请求回调，用来通知发起方请求被接受/拒绝/取消/超时/错误的回调
     * @return {Promise<number>} <br/>
     * 该接口返回 requestId，用户可使用该 requestId 调用 cancelRequest 接口取消请求
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const requestId = roomEngine.openRemoteDeviceByAdmin({
     *   userId: 'user_1234',
     *   device: TUIMediaDevice.kMicrophone  //请求的设备为麦克风
     *   timeout: 0,
     *   requestCallback: ({ requestCallbackType, requestId, userId, code, message }) => {
     *    switch (requestCallbackType) {
     *      case TUIRequestCallbackType.kRequestAccepted:
     *        // 请求被接受
     *        break;
     *      case TUIRequestCallbackType.kRequestRejected:
     *        // 请求被拒绝
     *        break;
     *      case TUIRequestCallbackType.kRequestCancelled:
     *        // 请求已取消
     *        break;
     *      case TUIRequestCallbackType.kRequestTimeout:
     *        // 请求超时
     *        break;
     *      case TUIRequestCallbackType.kRequestError:
     *        // 请求错误
     *        break;
     *      default:
     *        break;
     *    }
     *  },
     * });
     */
    openRemoteDeviceByAdmin(options: {
        userId: string;
        device: TUIMediaDevice;
        timeout: number;
        requestCallback?: (callbackInfo: TUIRequestCallback) => void;
    }): Promise<TUIRequest>;
    /**
     * 参会者向主持人申请打开设备
     *
     * @param {object} options 请求远端用户打开摄像头的参数
     * @param {TUIMediaDevice} options.device 请求的设备
     * @param {number} options.timeout 超时时间。若 timeout 设置为 0 ，则无超时时间
     * @param {Function} 请求回调，用来通知发起方请求被接受/拒绝/取消/超时/错误的回调
     * @return {Promise<number>} <br/>
     * 该接口返回 requestId，用户可使用该 requestId 调用 cancelRequest 接口取消请求
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const requestId = roomEngine.applyToAdminToOpenLocalDevice({
     *   device: TUIMediaDevice.kMicrophone, //请求打开麦克风
     *   timeout: 0,
     *   requestCallback: ({ requestCallbackType, requestId, userId, code, message }) => {
     *    switch (requestCallbackType) {
     *      case TUIRequestCallbackType.kRequestAccepted:
     *        // 请求被接受
     *        break;
     *      case TUIRequestCallbackType.kRequestRejected:
     *        // 请求被拒绝
     *        break;
     *      case TUIRequestCallbackType.kRequestCancelled:
     *        // 请求已取消
     *        break;
     *      case TUIRequestCallbackType.kRequestTimeout:
     *        // 请求超时
     *        break;
     *      case TUIRequestCallbackType.kRequestError:
     *        // 请求错误
     *        break;
     *      default:
     *        break;
     *    }
     *  },
     * });
     */
    applyToAdminToOpenLocalDevice(options: {
        device: TUIMediaDevice;
        timeout: number;
        requestCallback?: (callbackInfo: TUIRequestCallback) => void;
    }): Promise<TUIRequest>;
    /**
     * 关闭远端用户媒体设备
     *
     * @param {object} options 关闭远端用户摄像头的参数
     * @param {string} options.userId 用户 Id
     * @param {TUIMediaDevice} options.device 用户 Id
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.closeRemoteDeviceByAdmin({
     *   userId: 'user_1234',
     *   device: TUIMediaDevice.kMicrophone, //关闭掉麦克风
     * });
     */
    closeRemoteDeviceByAdmin(options: {
        userId: string;
        device: TUIMediaDevice;
    }): Promise<void>;
    /**
     * 取消已经发出的请求
     * @param {object} options 取消已经发出请求的参数
     * @param {string} options.requestId 请求 Id
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.cancelRequest({
     *  requestId: '',    // 请使用实际 requestId
     * });
     */
    cancelRequest(options: {
        requestId: string;
    }): Promise<void>;
    /**
     * 回复远端用户的请求
     * @param {object} options 回复远端用户的请求的参数
     * @param {string} options.requestId 请求 Id
     * @param {boolean} options.agree 是否同意
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     *
     * // 同意远端的请求
     * await roomEngine.responseRemoteRequest({
     *  requestId: '',    // 请使用实际 requestId
     *  agree: true,
     * });
     *
     * // 拒绝远端的请求
     * await roomEngine.responseRemoteRequest({
     *  requestId: '',    // 请使用实际 requestId
     *  agree: false,
     * });
     */
    responseRemoteRequest(options: {
        requestId: string;
        agree: boolean;
    }): Promise<any>;
    /**
     * 禁止/允许所有用户打开媒体设备（此接口对于房主和管理员无效）
     * @param {object} options
     * @param {TUIMediaDevice} options.device 操作的媒体设备
     * @param {boolean} options.isDisable 是否被禁止
     * @returns {Promise<void>}
     * @example
     * // Example 1: 禁止所有用户打开麦克风
     * await roomEngine.disableDeviceForAllUserByAdmin({
     *  device: TUIMediaDevice.kMicrophone,
     *  isDisable: true,
     * })
     * // Example 2: 允许所有用户打开麦克风
     * await roomEngine.disableDeviceForAllUserByAdmin({
     *  device: TUIMediaDevice.kMicrophone,
     *  isDisable: false,
     * })
     */
    disableDeviceForAllUserByAdmin(options: {
        device: TUIMediaDevice;
        isDisable: boolean;
    }): Promise<void>;
    /**
     * 禁止/允许所有用户发送消息
     * @param {object} options
     * @param {boolean} options.isDisable 是否被禁止
     * @returns {Promise<void>}
     * @example
     * await roomEngine.disableSendingMessageForAllUser({
     *  isDisable: true,
     * })
  
     */
    disableSendingMessageForAllUser(options: {
        isDisable: boolean;
    }): Promise<void>;
    /**
     * 禁止/允许某个用户发送消息
     * @param {object} options
     * @param {string} options.userId 用户的 Id
     * @param {boolean} options.isDisable 是否被禁止
     * @returns {Promise<void>}
     * @example
     * await roomEngine.disableSendingMessageByAdmin({
     *  userId: 'user_1234',
     *  isDisable: true,
     * })
     */
    disableSendingMessageByAdmin(options: {
        userId: string;
        isDisable: boolean;
    }): Promise<void>;
    /**
     * 改变用户的角色，仅主持人可调用该接口
     * @param {object} options 改变用户的角色，仅主持人可调用该接口的参数
     * @param {string} options.userId 用户 Id
     * @param {TUIRole} options.userRole 用户角色
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * // 将房间移交给用户 user_1234
     * await roomEngine.changeUserRole({
     *  userId: 'user_1234',
     *  userRole: TUIRole.kRoomOwner,
     * });
     *
     * // 将用户 user_1234 设置为房间管理员
     * await roomEngine.changeUserRole({
     *  userId: 'user_1234',
     *  userRole: TUIRole.kAdministrator,
     * });
     */
    changeUserRole(options: {
        userId: string;
        userRole: TUIRole;
    }): Promise<void>;
    /**
     * 将用户踢出房间，仅主持人和管理员可调用该接口
     * @param {object} options
     * @param {string} options.userId 用户 Id
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.kickRemoteUserOutOfRoom({
     *  userId: 'user_1234',
     * });
     */
    kickRemoteUserOutOfRoom(options: {
        userId: string;
    }): Promise<void>;
    /**
     * 设置房间麦位最大值
     * @param {object} options
     * @param {number} options.maxSeatCount 设置房间麦位最大值<br/>
     * roomType 为 TUIRoomType.kConference (教育及会议场景) 时，maxSeatCount 值不做限制；
     * roomType 为 TUIRoomType.kLivingRoom (直播场景) 时，maxSeatCount 最大限制为 16；
     * @returns {Promise<void>}
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.createRoom({ roomId: '12345' });
     * await roomEngine.setMaxSeatCount({ maxSeatCount: 16 })
     */
    setMaxSeatCount(options: {
        maxSeatCount: number;
    }): Promise<void>;
    /**
     * 获取麦位列表
     * @returns {Promise<TUISeatInfo[]>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const seatList = await roomEngine.getSeatList();
     * ;
     */
    getSeatList(): Promise<TUISeatInfo[]>;
    /**
     * 麦下用户可调用 takeSeat 成为麦上用户，仅麦上用户可发布本地音视频流。<br/>
     * 主持人&管理员调用 takeSeat 成功后即为麦上用户。<br/>
     * roomInfo.SpeechMode 为 TUISpeechMode.kFreeToSpeak 模式时，普通用户调用 takeSeat 方法成功后即为麦上用户。<br/>
     * roomInfo.SpeechMode 为 TUISpeechMode.kSpeakAfterTakingSeat 模式时，普通用户调用 takeSeat 方法需要等待主持人/管理员的同意后成为麦上用户。<br/>
     * 麦上用户的变更通过 TUIRoomEvents.onSeatListChanged 通知所有用户。<br/>
     * @param {object} options 获取麦位的参数
     * @param {number} options.seatIndex 麦位 index, 无麦位序号时设置为 -1
     * @param {number} options.timeout 超时时间。若 timeout 设置为 0，则无超时时间
     * @param {Function} options.requestCallback 请求回调，用来通知发起方请求被接受/拒绝/取消/超时/错误的回调
     * @returns {Promise<number>} <br/>
     * 该接口返回 request 结构体，当 request.requestId 不为 '' 时，用户可调用 cancelRequest 接口取消上麦请求。
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     *
     * // 情景一：主持人/管理员上麦
     * // 情景二：roomInfo.SpeechMode 为 TUISpeechMode.kFreeToSpeak 模式时，普通用户上麦
     * await roomEngine.takeSeat({
     *  seatIndex: -1,
     *  timeout: 0,
     * });
     *
     * // 情景三：roomInfo.SpeechMode 为 TUISpeechMode.kSpeakAfterTakingSeat 模式时，普通用户上麦
     * const request = await roomEngine.instance?.takeSeat({
     *  seatIndex: -1,
     *  timeout: 0,
     *  requestCallback: ({ requestCallbackType, requestId, userId, code, message }) => {
     *    switch (requestCallbackType) {
     *      case TUIRequestCallbackType.kRequestAccepted:
     *        // 请求被接受
     *        break;
     *      case TUIRequestCallbackType.kRequestRejected:
     *        // 请求被拒绝
     *        break;
     *      case TUIRequestCallbackType.kRequestCancelled:
     *        // 请求已取消
     *        break;
     *      case TUIRequestCallbackType.kRequestTimeout:
     *        // 请求超时
     *        break;
     *      case TUIRequestCallbackType.kRequestError:
     *        // 请求错误
     *        break;
     *      default:
     *        break;
     *    }
     *  },
     * });
     */
    takeSeat(options: {
        seatIndex: number;
        timeout: number;
        requestCallback?: (callbackInfo: TUIRequestCallback) => void;
    }): Promise<TUIRequest>;
    /**
     * 离开麦位
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.leaveSeat();
     */
    leaveSeat(): Promise<void>;
    /**
     * 邀请其他人上麦（仅房间主持人和管理员可调用此方法）
     * @param {object} options 邀请其他人上麦的参数
     * @param {number} options.seatIndex  麦位 index, roomType 为 TUIRoomType.kConference 时无需关心，填 -1 即可
     * @param {string} options.userId  用户 Id
     * @param {number} options.timeout  超时时间，设置为 0 时，无超时时间
     * @param {Function} options.requestCallback 请求回调，用来通知发起方请求被接受/拒绝/取消/超时/错误的回调
     * @returns {Promise<number>} <br/>
     * 该接口返回 requestId，用户可使用该 requestId 调用 cancelRequest 接口取消请求
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const requestId = await roomEngine.takeUserOnSeatByAdmin({
     *   seatIndex: 0,
     *   userId: 'user_1234',
     *   timeout: 0,
     *   requestCallback: ({ requestCallbackType, requestId, userId, code, message }) => {
     *    switch (requestCallbackType) {
     *      case TUIRequestCallbackType.kRequestAccepted:
     *        // 请求被接受
     *        break;
     *      case TUIRequestCallbackType.kRequestRejected:
     *        // 请求被拒绝
     *        break;
     *      case TUIRequestCallbackType.kRequestCancelled:
     *        // 请求已取消
     *        break;
     *      case TUIRequestCallbackType.kRequestTimeout:
     *        // 请求超时
     *        break;
     *      case TUIRequestCallbackType.kRequestError:
     *        // 请求错误
     *        break;
     *      default:
     *        break;
     *    }
     *  },
     * });
     */
    takeUserOnSeatByAdmin(options: {
        seatIndex: number;
        userId: string;
        timeout: number;
        requestCallback?: (callbackInfo: TUIRequestCallback) => void;
    }): Promise<TUIRequest>;
    /**
     * 将其他人踢下麦（仅房间主持人和管理员可调用此方法）
     * @param {object} options 要求其他人下麦的参数
     * @param {number} options.seatIndex 麦位 index
     * @param {string} options.userId 用户 Id
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.kickUserOffSeatByAdmin({
     *   seatIndex: 0,
     *   userId: 'user_1234',
     * });
     */
    kickUserOffSeatByAdmin(options: {
        seatIndex: number;
        userId: string;
    }): Promise<void>;
    /**
     * 锁定某个麦位状态（仅房间主持人和管理员可调用此方法）
     *
     * @param {object} options 锁定某个麦位需要的参数
     * @param {number} options.seatIndex 麦位索引
     * @param {TUISeatLockParams} options.lockParams 锁麦参数
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.lockSeatByAdmin({
     *  seatIndex: -1,
     *  lockParams: {
     *    lockSeat: true,
     *    lockVideo: true,
     *    lockAudio: true,
     *  }
     * });
     */
    lockSeatByAdmin(options: {
        seatIndex: number;
        lockParams: TUISeatLockParams;
    }): Promise<any>;
    /**
     * 发送文本消息
     * @deprecated 该接口自 v2.0.0 版本废弃，请使用 {@link getTIM} 方法获取 tim 实例发送消息
     * @param {object} options
     * @param {string} options.messageText 文本消息内容
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.sendTextMessage({
     *  messageText: 'hello, everyone',
     * });
     */
    sendTextMessage(options: {
        messageText: string;
    }): Promise<void>;
    /**
     * 发送自定义消息
     * @param {object} options
     * @param {string} options.messageText 自定义消息内容
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.sendCustomMessage({
     *  messageText: '{ data:'', description: ''}',
     * });
     */
    sendCustomMessage(options: {
        messageText: string;
    }): Promise<void>;
    /**
     * 开始屏幕共享
     * @param {object=} options
     * @param {boolean=} [options.screenAudio=false] web 端屏幕共享是否可选共享系统声音, screenAudio 默认值为 false
     * @param {string=} options.view 非必填，本地预览屏幕分享的 dom 元素的 id
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * // example 1: 开始屏幕分享
     * await roomEngine.startScreenSharing();
     * // example 2: 开始屏幕分享(可采集系统音频)
     * await roomEngine.startScreenSharing({ screenAudio: true });
     * // example 3: 开始屏幕分享并在本地预览
     * await roomEngine.startScreenSharing({ view: 'screen-preview' });
     */
    startScreenSharing(options?: {
        screenAudio?: boolean;
        view?: string;
    }): Promise<void>;
    /**
     * 停止屏幕共享
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.stopScreenSharing();
     */
    stopScreenSharing(): Promise<void>;
    /**
     * 开始屏幕共享 Electron
     * @param {object} options Electron 开始屏幕共享参数
     * @param {string} options.targetId 分享窗口 id, 可从 getScreenSharingTarget 获取
     * @param {string=} options.view 非必填，本地预览屏幕分享的 dom 元素的 id
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * // example 1: 开始屏幕共享
     * await roomEngine.startScreenSharingElectron({ targetId: 'xxx' });
     * // example 2: 开始屏幕共享并在本地预览
     * await roomEngine.startScreenSharingElectron({ targetId: 'xxx', view: 'screen-preview' });
     *
     */
    startScreenSharingElectron(options: {
        targetId: string;
        view?: string;
    } | string): Promise<void>;
    /**
     * 停止屏幕共享 Electron
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.stopScreenSharingElectron();
     */
    stopScreenSharingElectron(): Promise<void>;
    /**
     * 获取屏幕分享列表 Electron
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const screenList = await roomEngine.getScreenSharingTarget();
     */
    getScreenSharingTarget(): Promise<Array<TRTCScreenCaptureSourceInfo>>;
    /**
     * 切换屏幕分享窗口 Electron
     * @param {object} options Electron 切换屏幕分享窗口参数
     * @param {string} options.targetId 分享窗口 id, 可从 getScreenSharingTarget 获取
     *
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.selectScreenSharingTarget({ targetId: 'xxx' });
     */
    selectScreenSharingTarget(options: {
        targetId: string;
    } | string): Promise<void>;
    /**
     * 监听 roomEngine 的事件
     * @param event TUIRoomEvents
     * @param func function
     * @returns {void}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * roomEngine.on(event, func);
     */
    on(event: TUIRoomEvents, func: (...args: any[]) => void): void;
    private setObserver;
    /**
     * 取消监听 roomEngine 的事件
     * @param event TUIRoomEvents
     * @param func function
     * @returns {void}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * roomEngine.off(event, func);
     */
    off(event: string, func: (...args: any[]) => void): void;
    private handleTrtcCloudBindEvent;
    /**
     * 获取摄像头设备列表<br>
     * @returns {Promise<TRTCDeviceInfo[]>} 摄像头列表
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const cameralist = await roomEngine.getCameraDevicesList();
     * for (i = 0; i < cameralist.length; i++) {
     *    var camera = cameralist[i];
     *    console.info("camera deviceName: " + camera.deviceName + " deviceId:" + camera.deviceId);
     * }
     */
    getCameraDevicesList(): Promise<any>;
    /**
     * 获取麦克风设备列表<br>
     * @returns {Promise<TRTCDeviceInfo[]>} 麦克风列表
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const micList = await roomEngine.getMicDevicesList();
     * for (i = 0; i < micList.length; i++) {
     *    var mic = micList[i];
     *    console.info("mic deviceName: " + mic.deviceName + " deviceId:" + mic.deviceId);
     * }
     */
    getMicDevicesList(): Promise<any>;
    /**
     * 获取扬声器设备列表<br>
     * @returns {Promise<TRTCDeviceInfo[]>} 扬声器列表
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const speakerList = await roomEngine.getSpeakerDevicesList();
     * for (i = 0; i < speakerList.length; i++) {
     *    var speaker = speakerList[i];
     *    console.info("speaker deviceName: " + speaker.deviceName + " deviceId:" + speaker.deviceId);
     * }
     */
    getSpeakerDevicesList(): Promise<any>;
    /**
     * 设置要使用的摄像头设备<br>
     * @param {Object} options
     * @param {String} options.deviceId - 从 getCameraDevicesList 中得到的设备 ID
     * @returns {Promise<void>}
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.setCurrentCameraDevice({ deviceId: '' });
     */
    setCurrentCameraDevice(options: {
        deviceId: string;
    }): Promise<void>;
    /**
     * 切换前后置摄像头，该接口只适用于移动端浏览器
     * @param {Object} options
     * @param {boolean} options.isFrontCamera 是否切换为前置摄像头
     *
     * // 移动端切换为前置摄像头
     * await roomEngine.switchCamera({ isFrontCamera: true });
     * // 移动端切换为后置摄像头
     * await roomEngine.switchCamera({ isFrontCamera: false });
     */
    switchCamera(options: {
        isFrontCamera: boolean;
    }): Promise<void>;
    /**
     * 设置要使用的麦克风设备<br>
     * @param {Object} options
     * @param {String} options.deviceId - 从 getMicDevicesList 中得到的设备 ID
     * @returns {Promise<void>}
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.setCurrentMicDevice({ deviceId: '' });
     */
    setCurrentMicDevice(options: {
        deviceId: string;
    }): Promise<void>;
    /**
     * 设置要使用的扬声器设备<br>
     * @param {Object} options
     * @param {String} options.deviceId - 从 getSpeakerDevicesList 中得到的设备 ID
     * @returns {Promise<void>}
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.setCurrentSpeakerDevice({ deviceId: '' });
     */
    setCurrentSpeakerDevice(options: {
        deviceId: string;
    }): Promise<void>;
    /**
     * 获取当前正在使用的摄像头设备
     * @returns {TRTCDeviceInfo} 设备信息，能获取设备 ID 和设备名称
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const currentCameraDevice = roomEngine.getCurrentCameraDevice();
     */
    getCurrentCameraDevice(): TRTCDeviceInfo;
    /**
     * 获取当前正在使用的麦克风设备
     * @returns {TRTCDeviceInfo} 设备信息，能获取设备 ID 和设备名称
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const currentMicDevice = roomEngine.getCurrentMicDevice();
     */
    getCurrentMicDevice(): TRTCDeviceInfo;
    /**
     * 获取当前正在使用的扬声器设备
     * @returns {TRTCDeviceInfo} 设备信息，能获取设备 ID 和设备名称
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const currentSpeakerDevice = roomEngine.getCurrentSpeakerDevice();
     */
    getCurrentSpeakerDevice(): TRTCDeviceInfo;
    /**
     * 开始进行摄像头测试
     * @param {string} view 显示摄像头测试的视频区域, 传入的 view 为承载预览画面 div 元素的 id
     * @returns {Promise<void>}
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.startCameraDeviceTest({ view: 'test-preview' });
     */
    startCameraDeviceTest(options: {
        view: string;
    }): Promise<void>;
    /**
     * 停止摄像头测试
     * @returns {void}
     * @example
     * const roomEngine = new TUIRoomEngine();
     * await roomEngine.stopCameraDeviceTest();
     */
    stopCameraDeviceTest(): Promise<void>;
    /**
     * 开始进行麦克风测试
     * @param options
     * @param {number} options.interval 麦克风音量的回调时间
     */
    startMicDeviceTest(options: {
        interval: number;
    }): Promise<void>;
    /**
     * 停止进行麦克风测试
     */
    stopMicDeviceTest(): Promise<void>;
    /**
     * 获取 trtcCloud 实例
     * @returns {TRTCCloud} trtcCloud
     * web 端 trtcCloud 能力请查看：https://web.sdk.qcloud.com/trtc/webrtc/trtcCloud/doc/TRTCCloud.html
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const trtcCloud = roomEngine.getTRTCCloud();
     */
    getTRTCCloud(): any;
    /**
     * 获取 tim 实例
     * @returns {TIM} tim
     * web 端 tim 能力请查看：https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html
     *
     * @example
     * const roomEngine = new TUIRoomEngine();
     * const trtcCloud = roomEngine.getTIM();
     */
    getTIM(): any;
    destroy(): void;
    /**
     * 实验性接口
     * @private
     * @param jsonStr jason 字符串
     * @returns
     */
    callExperimentalAPI(jsonStr: string): Promise<void>;
    private handleSetFramework;
}
export default TUIRoomEngine;
