import { Client } from 'nertc-web-sdk/types/client'; import { NEAuthService } from './authService'; import { NERoomService } from './roomService'; import { NEMessageChannelService } from './messageChannelService'; import { NENosService } from './nosService'; import NIM from '@yxim/nim-web-sdk/dist/SDK/NIM_Web_NIM'; import { NERoomWhiteboardAppConfig } from './roomWhiteboardController'; import { NEExtensionService } from './extensionService'; export declare enum NEErrorCode { FAILURE = -1, SUCCESS = 0, UNAUTHORIZED = 402, TOKEN_EXPIRED = 1026, TOKEN_INCORRECT = 1027, IM_REUSE_NOT_LOGIN = 100004, IM_REUSE_ACCOUNT_NOT_MATCH = 100005 } export declare enum NEErrorMessage { SUCCESS = "success", FAILURE = "failure", NOT_SUPPORT = "not support", NOT_INIT_RTC = "not init rtc", NOT_INIT_CHATROOM = "not init chatroom", NOT_JOIN_ROOMKIT = "not join roomkit", NOT_JOIN_RTC = "not join rtc", NOT_JOIN_WHITEBOARD = "not join whiteboard", NOT_INIT_PREVIEW = "not init preview", NOT_JOIN_CHATROOM = "not join chatroom", CHATROOM_JOIN_FAIL = "join chatroom fail", NO_UUID = "lack of uuid", NO_DEVICEID = "no deviceId", GET_REMOTE_MEMBER_FAILED_BY_UUID = "get remote member fail by uuid", NO_MESSAGE_CONTENT = "lack of message content", NO_APPKEY = "lack of appKey", NOT_OPEN_VIDEO = "not open video", NOT_SHARING_SCREEN = "Member is not sharing screen", MEMBER_IS_EMPTY = "Member is empty", PARAMS_IS_INCORRECT = "params is incorrect" } export interface NECommonError { code: string | number; message: string; msg?: string; } export interface NEResult { message: NEErrorMessage | string | null; code: number; data: T; } export type NECallback = (code: number, message: string | number | null, data?: T) => void; export interface Controller { isSupported: boolean; } export declare enum NEDeviceTransportType { DeviceTransportTypeUnknown = 0 /**< 未知设备 */, DeviceTransportTypeBluetooth = 1 /**< 蓝牙设备 */, DeviceTransportTypeBluetoothA2DP = 2 /**< 蓝牙立体声设备 */, DeviceTransportTypeBluetoothLE = 3 /**< 蓝牙低功耗设备 */, DeviceTransportTypeUSB = 4 /**< USB设备 */, DeviceTransportTypeHDMI = 5 /**< HDMI设备 */, DeviceTransportTypeBuiltIn = 6 /**< 内置设备 */, DeviceTransportTypeThunderbolt = 7 /**< 雷电接口设备 */, DeviceTransportTypeAirPlay = 8 /**< AirPlay设备 */, DeviceTransportTypeVirtual = 9 /**< 虚拟设备 */, DeviceTransportTypeOther = 10 /**< 其他设备 */ } export type NEDeviceBaseInfo = { deviceId: string; deviceName: string; unavailable?: boolean; defaultDevice?: boolean; default?: boolean; originDeviceId?: string; /** * 设备类型 (electron only) */ transportType?: NEDeviceTransportType; }; export type recordType = string | number | boolean | null | undefined | Record | { value: string | number | boolean; } | NERoomPropertiesLive; export interface NERoomPropertiesLive { cid: string; cname: string; extensionConfig?: string; liveAVRoomUids: number[]; liveChatRoomIndependent: boolean; liveLayout: NERoomLiveLayout; pullHlsUrl: string; pullHttpUrl: string; pullRtmpUrl: string; pullRtsUrl?: string; pushUrl: string; state: NERoomLiveState; title: string; password?: string; backgroundUpdateSeq?: number; } export type NEDeviceSwitchInfo = { type: DeviceType; deviceId: string; }; export type DeviceType = 'camera' | 'microphone' | 'speaker'; /** * 媒体类型 */ export type NEMediaTypes = 'audio' | 'video' | 'screen' | 'audioSlave'; export interface NERoomCreateAudioEffectOption { path: string; loopCount: number; playbackVolume: number; /** * 是否将音效发送远端,默认为 true,即远端用户订阅本端音频流后可听到该伴音。 */ sendEnabled?: boolean; } export interface NERoomCreateAudioMixingOption { /** * 在线音乐文件的 URL 地址 */ path: string; /** * 指定音频文件循环播放的次数 */ loopCount?: number; audioMixingEnd: null | (() => void); /** * 是否循环播放,默认为false */ loopback: boolean; /** * 设置音频开始播放时间位置,单位为秒(s)。默认为 0,即从头开始播放 */ playStartTime: number; /** * 是否要用音频文件替换本地音频流,默认为false */ replace: boolean; /** * 音乐文件的播放音量,取值范围为 0~100。默认为 100,表示使用文件的原始音量 */ playbackVolume: number; } /** * 本地远端音频流接收统计信息 */ export interface NERoomRtcAudioRecvStats { /** * 音频编码类型 */ codecType: string; /** * 端到端延时(ms),从远端采集音频到本地播放音频的延时 */ end2EndDelay: number; /** * 音频是否静音 */ muteState: boolean; /** * 远端音频的丢包率(%) */ packetLossRate: number; /** * 远端音频的丢包率(%) */ recvBitrate: number; /** * 接收音频的音量 */ recvLevel: number; /** * 音频卡顿总时间(s) */ totalFreezeTime: number; /** * 音频播放总时长(s) */ totalPlayDuration: number; /** * TransportDelay */ transportDelay: number; volume: number; } interface NERoomRtcAudioSendStatsItem { /** * 音频编码类型。 */ codecType?: string; /** * 音频是否静音 */ muteState?: boolean; /** * 音频采集能量 */ recordingLevel?: number; /** * 音频采样率(kHz) */ samplingRate?: number; /** * 音频发送码率(Kbps) */ sendBitrate?: number; /** * 音频发送能量 */ sendLevel?: number; capVolume?: number; } /** * 本地音频流上传统计信息 */ export type NERoomRtcAudioSendStats = NERoomRtcAudioSendStatsItem | NERoomRtcAudioSendStatsItem[]; /** * 通话相关的统计信息 */ export interface NERoomRtcStats extends NERoomRtcTransportStats { /** * 在当前房间内的时长(秒) */ duration?: number; /** * 音视频总接收码率(Kbps),瞬间值 */ recvBitrate?: number; /** * 接收字节数,累计值 */ recvBytes?: number; /** * 音视频总发送码率(Kbps),瞬间值 */ sendBitrate?: number; /** * 发送字节数,累计值 */ sendBytes?: number; /** * 通信场景下,该值为当前房间内的用户人数。直播场景下,如果本地用户为主播,该值为当前房间内的主播人数;如果本地用户为观众,该值为当前房间内的主播人数 + 1 */ userCount?: number; txAudioPacketLossRate?: number; txVideoPacketLossRate?: number; rxAudioPacketLossRate?: number; rxVideoPacketLossRate?: number; txAudioKBitRate?: number; rxAudioKBitRate?: number; txVideoKBitRate?: number; rxVideoKBitRate?: number; } /** * 获取网络类型和网络连接状况统计数据 */ export interface NERoomRtcTransportStats { /** * 云信SDK到云信SDK接入节点的上行平均往返延时(RTT,Round-Trip Time),单位 ms */ upRtt?: number; /** * 云信SDK到云信SDK接入节点的下行平均往返延时(RTT,Round-Trip Time),单位 ms */ downRtt?: number; /** * 网络类型,如 Wi-Fi、蜂窝移动数据网络、蓝牙网络等 */ NetworkType?: string; /** * 上行可用带宽估计(Kbps) */ OutgoingAvailableBandwidth?: number; } export type NERoomRtcVideoRecvStats = { userUuid: string; layers: Array; layerType: number; receivedBitRate: number; }; export interface NERoomRtcVideoLayerRecvStats { /** * 端到端延时(ms),从远端采集视频到本地播放视频的延时 */ End2EndDelay: number; /** * 视频画面是否开启 */ MuteState: boolean; /** * 远端视频的丢包率(%) */ PacketLossRate: number; /** * 视频接收码率(Kbps) */ RecvBitrate: number; /** * 视频接收分辨率高度,单位为像素 */ RecvResolutionHeight: number; /** * 视频接收分辨率宽度,单位为像素 */ RecvResolutionWidth: number; /** * 渲染帧率(fps),视频解码输出帧率 */ RenderFrameRate: number; /** * 视频渲染分辨率高度,单位为像素 */ RenderResolutionHeight: number; /** * 视频渲染分辨率宽度,单位为像素 */ RenderResolutionWidth: number; /** * 视频卡顿总时间,单位为秒 */ TotalFreezeTime: number; /** * 视频播放总时间,单位为秒 */ TotalPlayDuration: number; /** * 传输延时(ms),从远端发送视频到本地接收视频的延时 */ TransportDelay: number; } export declare enum NEAudioDumpType { kNEAudioDumpTypePCM = 0 /**< 仅输出.dump文件(默认) */, kNEAudioDumpTypeAll = 1 /**< 输出.dump和.wav文件 */, kNEAudioDumpTypeWAV = 2 /**< 仅输出.wav文件 */ } /** * 本地视频流上传统计信息 */ export type NERoomRtcVideoSendStats = Array; /** * 本地视频流单条上传统计信息 */ export interface NERoomRtcVideoLayerSendStats { /** * 视频流类型: 1 主流 2 辅流 */ layerType: number; /** * 视频采集帧率(fps) */ captureFrameRate: number; /** * 视频采集分辨率高度,单位为像素 */ captureResolutionHeight: number; /** * 视频采集分辨率宽度,单位为像素 */ captureResolutionWidth: number; /** * 本地视频从采集到编码的延时(ms) */ encodeDelay: number; /** * 视频画面是否开启 */ muteState: boolean; /** * 视频发送码率(Kbps) */ sendBitrate: number; /** * 视频发送帧率(fps) */ sendFrameRate: number; /** * 视频发送分辨率高度,单位为像素 */ sendResolutionHeight: number; /** * 视频发送分辨率宽度,单位为像素 */ sendResolutionWidth: number; /** * setVideoProfile 中设置的目标发送码率(Kbps) */ targetSendBitrate: number; /** * 从视频流发布到当前时间的总时长,单位为秒 */ totalDuration: number; /** * 视频编码卡顿总时间,单位为秒 */ totalFreezeTime: number; /** * 发送的比特率(Kbps) */ sentBitRate: number; } /** * 表示已连接到房间的设备信息。 * 在多设备场景下,同一用户可能同时使用多个设备(手机、电脑、平板等)加入房间, * @see NERoomMember * @see NEClientType */ export interface NEConnectedDevice { /** * 音视频房间用户id,用于音视频传输 */ rtcUid: number; /** * 设备客户端类型 */ clientType: NEClientType; /** * 设备的唯一标识符 */ deviceId: string; /** * 当前设备的音频是否激活。在多设备场景下,一个成员可能同时使用多个设备连接会议,但同一时刻只允许,其中一个设备的音频、视频或屏幕共享处于激活状态。 */ isAudioOn: boolean; /** * 当前设备的视频是否激活。在多设备场景下,一个成员可能同时使用多个设备连接会议,但同一时刻只允许,其中一个设备的音频、视频或屏幕共享处于激活状态。 */ isVideoOn: boolean; /** * 当前设备的屏幕共享是否激活。在多设备场景下,一个成员可能同时使用多个设备连接会议,但同一时刻只允许,其中一个设备的音频、视频或屏幕共享处于激活状态。 */ isSharingScreen: boolean; /** * 当前设备的系统音频共享是否激活。在多设备场景下,一个成员可能同时使用多个设备连接会议,但同一时刻只允许,其中一个设备的音频、视频或屏幕共享处于激活状态。 */ isSharingSystemAudio: boolean; /** * 当前设备是否音频已连接 */ isAudioConnected: boolean; } export interface NERoomMember { /** * 是否音频已连接 * @description 在多设备的场景下,如果是本端成员,则该状态为本端设备的音频连接状态。如果非本端成员,则该状态为对应成员所有设备的聚合的音频连接状态 */ isAudioConnected: boolean; /** * 音频是否打开 * @description 在多设备的场景下,如果是本端成员,则该状态为本端设备的音频状态。如果非本端成员,则该状态为对应成员所有设备的聚合的音频状态 */ isAudioOn: boolean; /** * 当前成员是否在聊天室内 */ isInChatroom: boolean; /** * 当前成员是否在RTC房间内 */ isInRtcChannel: boolean; /** * 当前成员是否正在屏幕共享中 * @description 在多设备的场景下,如果是本端成员,则该状态为本端设备的屏幕共享状态。如果非本端成员,则该状态为对应成员所有设备的聚合的屏幕共享状态 */ isSharingScreen: boolean; /** * 当前成员是否正在屏幕共享中 * @description 在多设备的场景下,如果是本端成员,则该状态为本端设备的系统音频共享状态。如果非本端成员,则该状态为对应成员所有设备的聚合的系统音频共享状态 */ isSharingSystemAudio: boolean; /** * 当前是否在SIP邀请状态 */ isInSIPInviting: boolean; /** * 当前是否在App邀请状态 */ isInAppInviting: boolean; /** * 视频是否打开 * @description 在多设备的场景下,如果是本端成员,则该状态为本端设备的视频状态。如果非本端成员,则该状态为对应成员所有设备的聚合的视频状态 */ isVideoOn: boolean; /** * 当前成员是否正在共享白板 */ isSharingWhiteboard: boolean; /** * 用户名 */ name: string; /** * 属性 */ properties: StrAnyObj; /** * 角色 */ role: NERoomRole; /** * 用户id */ uuid: string; /** * 用户的终端类型[NEClientType] */ clientType: NEClientType; /** * 用户头像 */ avatar: string; /** * 是否在等候室 */ inWaitingRoom: boolean; /** * 当前成员邀请状态 */ inviteState: NERoomMemberInviteState; /** * 当前成员邀请类型 */ inviteType?: NERoomMemberInviteType; /** * 当前成员是否被禁言 */ isChatBanned?: boolean; /** * 当前成员已连接的设备列表 */ connectedDeviceList: NEConnectedDevice[]; /** * 扩展字段 */ ext?: string; /** * @ignore 不对外暴露 * rtc角色 */ rtcRole?: 'host' | 'audience'; /** * 表示该角色是否隐藏 */ hide: boolean; /** * 如果是本端成员,则代表当前设备对应的音视频房间用户id;如果是远端成员,则代表第一个加入房间的设备的音视频房间用户id */ rtcUid?: number; /** * @ignore 不对外暴露 * 成员状态[NERoomMemberState] */ state: number; /** * @ignore 不对外暴露 * 是否有本地录制权限 */ localRecordAvailable?: boolean; /** * @ignore 不对外暴露 */ _isInServerRtc?: boolean; miniAppStreamInfo?: { url?: string; subStreamUrl?: string; [key: string]: string | number | boolean | null | undefined; }; } export declare enum NEClientType { /** * 未知 */ UNKNOWN = 0, /** * iOS平台 */ IOS = 1, /** * Android平台 */ ANDROID = 2, /** * windows平台 */ PC = 3, /** * web平台 */ WEB = 4, /** * sip 平台 */ SIP = 5, /** * mac平台 */ MAC = 6, /** * miniApp 小程序平台 */ MINIAPP = 7, /** * H323平台 */ H323 = 8, /** * linux平台 */ LINUX = 9, /** * harmony平台 */ OHOS = 10 } /** * 成员邀请类型 */ export declare enum NERoomMemberInviteType { /** * 未知 */ unknown = 0, /** * SIP邀请 */ SIP = 1, /** * 应用内邀请 */ APP = 2 } /** * 成员子状态,用于标记成员被邀请的状态 */ export declare enum NERoomMemberInviteState { /** * 未知 */ unknown = 0, /** * 等待呼叫 */ waitingCall = 1, /** * 呼叫中 */ calling = 2, /** * 已拒接 */ rejected = 3, /** * 未接听 */ noAnswer = 4, /** * 呼叫异常 */ error = 5, /** * 已移除 */ removed = 6, /** * 已取消 */ canceled = 7, /** * 待入会 */ waitingJoin = 8, /** * 对方忙 */ busy = 9 } export interface NERoomMemberBase { /** * 用户头像 */ avatar: string; /** * 角色 */ role: NERoomRole; /** * 用户id */ uuid: string; /** * 用户名 */ name: string; } export interface NERoomRole { name: string; limit: number; /** * @ignore */ rtcRole?: string; hide?: boolean; params?: NERoleParams; } /** * @ignore */ export interface NERoleAudioParams { profile: string; scenario: string; } /** * @ignore */ export interface NERoleScreenParams { videoProfile: string; fps: number; } /** * @ignore */ export interface NERoleVideoParams { fps: number; height: number; width: number; } /** * @ignore */ export interface NERoleParams { audio?: NERoleAudioParams; screen?: NERoleScreenParams; video?: NERoleVideoParams; } export interface NIMChatroomUpdateMemberInfoOptions { /** * 待更新的成员信息 */ member: { /** * 聊天室内的昵称 */ nick?: string; /** * 聊天室内的头像 */ avator?: string; /** * 第三方扩展字段 */ custom?: string; }; /** * 是否需要下发对应的通知消息 */ needNotify: boolean; /** * 对应的通知消息的扩展字段 */ custom?: string; /** * 用户配置的对某些资料内容另外的反垃圾的业务ID */ antiSpamBusinessId?: string; /** * 可选,默认false,是否支持nick,avator和custom字段的持久化(固定成员有效) */ needSave?: boolean; } export declare enum NERoomSipDeviceInviteProtocolType { /** * SIP */ SIP = 1, /** * H.323 */ H323 = 2 } export interface NERoomSystemDevice { protocol: NERoomSipDeviceInviteProtocolType; deviceAddress: string; name?: string; } export interface NIMFile { /** * 文件 url */ url: string; /** * 名字 */ name: string; /** * 大小, 单位byte */ size: number; /** * md5 */ md5: string; /** * 扩展名 */ ext: string; } export interface NIMImage extends NIMFile { /** * 宽, 单位px */ w: string; /** * 高, 单位px */ h: string; } export interface NIMAudio extends NIMFile { /** * 实时转成 mp3 流的 url, 此 url 支持的格式有: mp3, wav, aac, wma, wmv, amr, mp2, flac, vorbis, ac3 */ mp3Url: string; /** * 长度,单位 ms */ dur: number; } export interface NIMVideo extends NIMFile { /** * 视频长度 单位 ms */ dur: number; /** * 宽,分辨率,单位 px */ w: number; /** * 高,分辨率,单位 px */ h: number; } export interface NIMChatroomMsgGEO { /** * 地点名 */ title: string; /** * 纬度坐标 */ lat: number; /** * 经度坐标 */ lng: number; } export interface LoginResult { /** * @Multi_Lang_Tag * @locale cn * 连接id * @locale * * @locale en * connection ID * @locale */ connectionId: string; ip: string; /** * @Multi_Lang_Tag * @locale cn * 端口 * @locale * * @locale en * Port * @locale */ port: string; /** * @Multi_Lang_Tag * @locale cn * 上一次登陆的设备 id * @locale * * @locale en * ID of the device that the user logged onto last time * @locale */ lastLoginDeviceId?: string; country?: string; /** * 应用 appkey */ appkey?: string; /** * @Multi_Lang_Tag * @locale cn * 自定义登陆标签 * @locale * * @locale en * Custom login tag * @locale */ customTag?: string; /** * @Multi_Lang_Tag * @locale cn * AOS 推荐推送配置信息 * @locale * * @locale en * Recommended AOS push notification configurations * @locale */ aosPushInfo?: { pushType?: number; hasTokenPreviously?: boolean; }; } export declare enum EMsgStatus { /** * @Multi_Lang_Tag * @locale cn * 收到对方发送的消息,默认(己方未读) * @locale * * @locale en * Received the message sent by the other party. The message is unread by the receiver by default. * @locale */ unread = 1, /** * @Multi_Lang_Tag * @locale cn * 收到对方发送的消息,己方已读 * @locale * * @locale en * Received the message sent by the other party. The receiver has read it. * @locale */ read = 2, /** * @Multi_Lang_Tag * @locale cn * 已删 * @locale * * @locale en * Deleted * @locale */ deleted = 3, /** * @Multi_Lang_Tag * @locale cn * 发送中 * @locale * * @locale en * Sending… * @locale */ sending = 4, /** * @Multi_Lang_Tag * @locale cn * 发送失败 * 失败的情况可能又很多种,最常见于网络问题。 * @locale * * @locale en * Sending failed. * Multiple situations will lead to failure. The most common causes are network problems. * @locale */ sendFailed = 5, /** * @Multi_Lang_Tag * @locale cn * 已发送完毕 * @locale * * @locale en * Sent * @locale */ sent = 6, /** * @Multi_Lang_Tag * @locale cn * 对方已读发送的内容 * @locale * * @locale en * The other party has read the message. * @locale */ receipt = 7, /** * @Multi_Lang_Tag * @locale cn * 被对方拒绝,比如被对方加入黑名单 * @locale * * @locale en * Rejected by the other party for reasons such as being blocklisted by the other party. * @locale */ refused = 10 } export declare type TMsgStatus = keyof typeof EMsgStatus; export declare type TMsgScene = keyof typeof EMsgScene; export declare enum EClientType { Android = 1, iOS = 2, PC = 4, WindowsPhone = 8, Web = 16, Server = 32, Mac = 64 } export declare type TClientType = keyof typeof EClientType; export declare enum EMsgScene { p2p = 0, team = 1, superTeam = 5 } export declare enum EMsgType { text = 0, image = 1, audio = 2, video = 3, geo = 4, notification = 5, file = 6, tip = 10, robot = 11, g2 = 12, custom = 100 } export interface MultiDeviceInfo { state: number; clientType: NEClientType; deviceId: string; } export interface StrAnyObj { multiDevice?: { [deviceId: string]: MultiDeviceInfo; }; [key: string]: unknown; } export declare enum EMsgFeature { /** * @Multi_Lang_Tag * @locale cn * 默认 * @locale * * @locale en * Default * @locale */ default = 0, /** * @Multi_Lang_Tag * @locale cn * 离线消息 * @locale * * @locale en * Offline messages * @locale */ leave = 1, /** * @Multi_Lang_Tag * @locale cn * 漫游消息 * * @locale * * @locale en * Roaming messages * @locale */ roam = 2 } export declare type TMsgType = keyof typeof EMsgType; export declare type TMsgFeature = keyof typeof EMsgFeature; export interface TMsgPushInfo { /** * @Multi_Lang_Tag * @locale cn * 是否需要推送。p2p会话默认为 true,群会话默认为 false * @locale * * @locale en * Whether push notifications is required 107 * @locale */ needPush?: boolean; /** * @Multi_Lang_Tag * @locale cn * 是否要做消息计数(推送消息后的 app 角标) * @locale * * @locale en * Whether to do message count (app corner mark that appears after messages are pushed) 109 * @locale */ needPushBadge?: boolean; /** * @Multi_Lang_Tag * @locale cn * 需要推送昵称。默认为是 * @locale * * @locale en * Need to push nickname // 110 * @locale */ needPushNick?: boolean; /** * @Multi_Lang_Tag * @locale cn * 第三方自定义的推送属性,长度2048。具体内容请参考文档:[推送payload配置](https://doc.yunxin.163.com/messaging/docs/DQyNjc5NjE?platform=server) * * @example * ```js * nim.sendTextMsg({ * scene: 'p2p', * to: 'test', * body: 'message', * pushInfo: { * pushPayload: JSON.stringify({ * // 小米推送配置;注意,小米的推送字段不需要加 xiaomiField, xmField 前缀 * notify_foreground: 1 * // 华为推送配置 * hwField: { * click_action: {} * } * }) * } * }) * ``` * @locale * * @locale en * Attributes of third-party custom push notifications (length: 2048 bytes) * @locale */ pushPayload?: string; /** * @Multi_Lang_Tag * @locale cn * 推送文本。若不填,则消息的 body 字段会作为默认推送文本 * @locale * * @locale en * Push text * @locale */ pushContent?: string; /** * @Multi_Lang_Tag * @locale cn * 群组消息强推开关,默认 false * * - 当用户设置群消息免打扰 {@link TeamServiceInterface.updateMyMemberInfo | (updateMyMemberInfo#bitConfigMask)} 时,可以通过强推将消息推送给用户 * - 常用使用场景为 at 群成员时,使用强推将消息定向推给群内成员 * @locale * * @locale en * Whether to force push group messages. The default value is false, representing that the group messages will not be force pushed to members. You can set it to true. * @locale */ needForcePush?: boolean; /** * @Multi_Lang_Tag * @locale cn * 强推的成员账号。 * * - 如不设置,则该参数默认为推送群内所有人,即等效于 "#%@all@%#" * - 注意该参数为string,例:'["id1", "id2"]' * @locale * * @locale en * Accounts of group members to whom group messages need to be force pushed. * * Example: '["id1", "id2"]' * Note: If you want group messages to be force pushed to all group members, set this parameter to "#%@all@%#" * @locale */ forcePushIDsList?: string; /** * @Multi_Lang_Tag * @locale cn * 强推文本(可扩展为区别与普通推送的推送文本),长度限制 150 字符 * @locale * * @locale en * Text of the group messages that are force pushed to group members (can be customized to be different from normal push text). The length is limited to 150 characters. * @locale * */ forcePushContent?: string; } export interface TMsgThreadMsgInfo { /** * @Multi_Lang_Tag * @locale cn * 被回复消息的发送者账号 * @locale * * @locale en * Account who sent replyMsg * @locale */ replyMsgFromAccount?: string; /** * @Multi_Lang_Tag * @locale cn * 被回复消息的接受者账号 * @locale * * @locale en * Account who received replyMsg * @locale */ replyMsgToAccount?: string; /** * @Multi_Lang_Tag * @locale cn * 被回复消息的时间 * @locale * * @locale en * Time when replyMsg was sent * @locale */ replyMsgTime?: number; /** * @Multi_Lang_Tag * @locale cn * 被回复消息的idServer * @locale * * @locale en * Message ID (generated by the IM server) of replyMsg * @locale */ replyMsgIdServer?: string; /** * @Multi_Lang_Tag * @locale cn * 被回复消息的idClient * @locale * * @locale en * Message ID (generated by the Client) of replyMsg * @locale */ replyMsgIdClient?: string; /** * @Multi_Lang_Tag * @locale cn * thread 消息的发送者账号 * @locale * * @locale en * Account who sent threadMsg * @locale */ threadMsgFromAccount?: string; /** * @Multi_Lang_Tag * @locale cn * thread消息的接受者账号 * @locale * * @locale en * Account who received threadMsg * @locale */ threadMsgToAccount?: string; /** * @Multi_Lang_Tag * @locale cn * thread消息的时间 * @locale * * @locale en * Time when threadMsg was sent. * @locale */ threadMsgTime?: number; threadMsgIdServer?: string; threadMsgIdClient?: string; } export interface TMsgSetting { /** * @Multi_Lang_Tag * @locale cn * 是否为重发的消息 * @locale * * @locale en * Whether it is resent * @locale */ resendFlag?: boolean; /** * @Multi_Lang_Tag * @locale cn * (可选) 指向自定义抄送的配置 * @locale * * @locale en * (optional) custom data sync configuration * @locale */ envConfig?: string; /** * @Multi_Lang_Tag * @locale cn * 是否存云端消息历史,缺省则 true * @locale * * @locale en * Whether to store historical messages on the cloud (default value: true) * @locale */ needSaveHistory?: boolean; /** * @Multi_Lang_Tag * @locale cn * 该消息是否支持漫游 缺省则 true * @locale * * @locale en * Whether the message supports roaming (default value: true) * @locale */ needRoaming?: boolean; /** * @Multi_Lang_Tag * @locale cn * 是否支持离线消息,缺省则 true * @locale * * @locale en * Whether to support offline messages (default value: true) * @locale */ needOffline?: boolean; /** * @Multi_Lang_Tag * @locale cn * 该消息是否支持发送者多端同步 * @locale * * @locale en * Whether the message supports multi-device synchronization for the sender * @locale */ needSelfSync?: boolean; /** * @Multi_Lang_Tag * @locale cn * 是否要抄送 * @locale * * @locale en * Whether the server’s conversation list needs to be refreshed (0: No, 1: Yes; default value: 1; this parameter will be determined only when offline messages are stored). * @locale */ needRouted?: boolean; /** * @Multi_Lang_Tag * @locale cn * 是否需要刷新服务器会话列表,0:否,1:是;只有消息存离线的情况下,才会判断该参数,缺省:1 * @locale * * @locale en * Whether the message should be muted on the recipient side. This field is returned by the server, and it does not need to be set on the application side. * @locale */ needUpdateSession?: boolean; /** * @Multi_Lang_Tag * @locale cn * 该消息在接收方是否应该被静音。此字段服务器返回,端测不需要自己设置 * @locale * * @locale en * Whether the message should be muted on the recipient side. This field is returned by the server, and it does not need to be set on the application side. * @locale */ isMuted?: boolean; } export interface TMsgAntiSpamInfo { /** * @Multi_Lang_Tag * @locale cn * (功能暂时不开放)是否需要使用自定义反垃圾字段 antiSpamContent, 缺省false * 注:此字段与 antiSpamContent 联合起来使用 * @locale * * @locale en * (The function is temporarily unavailable) Whether you need to use the custom anti-spam field antiSpamContent (default value: false) * Note: If you set the needAntiSpam field, you must set the antiSpamContent field also. * @locale */ needAntiSpam?: boolean; /** * @Multi_Lang_Tag * @locale cn * 开发者自定义的反垃圾字段,长度限制 5000。格式如 '{"type":1,"data":"YOUR_DATA_KEY"}' * @locale * * @locale en * Developer-defined anti-spam field, the length is limited to 5,000 bytes. Format example: '{"type":1,"data":"YOUR_DATA_KEY"}' * @locale */ antiSpamContent?: string; /** * @Multi_Lang_Tag * @locale cn * 用户配置的对某些单条消息另外的反垃圾的业务ID * @locale * * @locale en * User-configured additional anti-spam service IDs for some messages * @locale */ antiSpamBIZID?: string; /** * @Multi_Lang_Tag * @locale cn * 是否命中客户端反垃圾 * @locale * * @locale en * Whether spam is detected * @locale */ clientAntispamHitting?: boolean; /** * @Multi_Lang_Tag * @locale cn * 单条消息是否使用易盾反垃圾。 * 默认 0: (在开通易盾的情况下)不过易盾反垃圾。 * 其他值都是按照原来的规则 * @locale * * @locale en * Whether to use GuardEase anti-spam for a message. * Default 0: Use Client anti-spam in the case of GuardEase having been activated) * Other values follow the original rules * @locale */ antiSpamUsingYidun?: number; /** * @Multi_Lang_Tag * @locale cn * 易盾check的回调URL,目前仅支持Audio类型的消息,最长256个字符,如果不合法则忽略该参数 * @locale * * @locale en * The callback URL that GuardEase checks. Currently, only messages (up to 256 characters) of the “Audio” type are supported. If the field is invalid, it will not take effect. * @locale */ yidunCallbackURL?: string; /** * @Multi_Lang_Tag * @locale cn * 易盾反垃圾增强反作弊专属字段, 限定使用 JSON 序列化字符串,长度限制1024 * @locale * * @locale en * GuardEase’s exclusive field for enhanced anti-cheating (format: JSON serialized string, length limit: 1,024 bytes). * @locale */ yidunAntiCheating?: string; /** * @Multi_Lang_Tag * @locale cn * 易盾反垃圾扩展字段,限制json,长度限制1024 * @locale * * @locale en * GuardEase anti-spam extension field (format: JSON , length limit 1,024 bytes) * @locale */ yidunAntiSpamExtension?: string; /** * @Multi_Lang_Tag * @locale cn * 易盾反垃圾返回的结果字段。 * 若开启了易盾反垃圾,并且针对文本或图片如果被反垃圾策略匹配中,端测会透传此反垃圾结果字段返回。 * 格式为 JSON 序列化的字符串 * @locale * * @locale en * The result field returned by GuardEase Anti-Spam . * When GuardEase anti-spam is enabled and spams on the texts or images are detected, the application side will transparently transmit this anti-spam result field and return it. * formatted as JSON serialized string * @locale */ yidunAntiSpamResult?: string; } export interface TMsgTeamSpecializationInfo { /** * @Multi_Lang_Tag * @locale cn * 群消息是否需要已读业务, 默认 false * * 注: * 1. 发送方在发送消息时这个字段若传 true * 2. 那么接收方可以调用 sendTeamMsgReceipt 来标识消息 receipt 已读。 * 3. 发送方就会接到事件 teamMsgReceipts 代表接收方已读了发送方的消息. * @locale * * @locale en * Whether the group messages need message receipts (message read or unread). * @locale */ needACK?: boolean; /** * @Multi_Lang_Tag * @locale cn * 是否已经发送群消息已读回执。(端测维护此字段) * 若调用 sendTeamMsgReceipt,会对此消息的 teamSpecializationInfo.isACKSent 标记为 true。 * * 注:当 db 开启才能生效 * @locale * * @locale en * Whether the read receipts for group messages have been sent. (the application side maintains this field) * If sendTeamMsgReceipt is called, teamSpecializationInfo.isACKSent of this message will be marked as true. * * Note: Not supported currently. * @locale */ isACKSent: boolean; /** * @Multi_Lang_Tag * @locale cn * 群已读消息快照大小(即消息发送时的群人数-1) * @locale * * @locale en * Snapshot size of group messages that have been read (that is, the result of “the number of group members at the time when the message is sent” minus “1”) * @locale */ ackSnapshot: number; } export interface IMMessage { /** * @Multi_Lang_Tag * @locale cn * 消息的流向 * * in 表示此消息是收到的消息 * out 表示此消息是发出的消息 * @locale * * @locale en * The flow of messages * * in: The message is a received one. * out: The message is an outgoing message. In other words, the message is sent out. * @locale */ flow: 'in' | 'out'; custom: string; content: string; text: string; /** * @Multi_Lang_Tag * @locale cn * 聊天对象, 账号或者群id * @locale * * @locale en * The person that the user chats with, account, or group ID * @locale */ target: string; /** * @Multi_Lang_Tag * @locale cn * 消息所属的会话的ID * @locale * * @locale en * ID of the conversation to which the message belongs * @locale */ sessionId: string; /** * @Multi_Lang_Tag * @locale cn * 消息状态 * * #### 发送消息状态 * - sending: 发送中 * - sent: 发送成功 * - receipt: 发送成功且对方发送了已读回执 * - deleted: 已删除 * - sendFailed: 发送失败 * * #### 接收消息状态 * - unread: 收到对方发送的消息,消息未读 * - read: 收到对方发送的消息,消息已读 * - deleted: 已删除 * * @locale * * @locale en * Message status * * #### send message status * - sending: The message is being sent * - sent: The message has been sent * - receipt: The message has been sent and has been read * - deleted: The message has been deleted * - sendFailed: The message failed to be sent. * * #### receive message status * - unread: Received the message sent by the other party, the message has not been read * - read: Received the message sent by the other party, the message has been read * - deleted: The message has been deleted * * @locale */ status: TMsgStatus; /** * @Multi_Lang_Tag * @locale cn * 场景(会话类型) * @locale * * @locale en * Scenario (conversation type) * @locale */ scene: TMsgScene; /** * @Multi_Lang_Tag * @locale cn * 消息接收方, 帐号或群id * @locale * * @locale en * Message recipient: account, or group ID * @locale */ to: string; /** * @Multi_Lang_Tag * @locale cn * 消息发送方, 帐号 * @locale * * @locale en * Message sender: account * @locale */ from: string; /** * @Multi_Lang_Tag * @locale cn * 发送方的设备类型 * @locale * * @locale en * Sender's device type * @locale */ fromClientType?: TClientType; /** * @Multi_Lang_Tag * @locale cn * 发送端设备id * @locale * * @locale en * Sender device ID * @locale */ fromDeviceId?: string; /** * @Multi_Lang_Tag * @locale cn * 消息发送方的昵称 * @locale * * @locale en * The nickname of the sender of the message * @locale */ fromNick?: string; /** * @Multi_Lang_Tag * @locale cn * 消息发送成功的时间戳(单位毫秒) * @locale * * @locale en * Timestamp when the message was sent successfully (unit: milliseconds) * @locale */ time: number; /** * @Multi_Lang_Tag * @locale cn * 用户最后更新时间 * @locale * * @locale en * User’s last update time * @locale */ userUpdateTime: number; /** * @Multi_Lang_Tag * @locale cn * 消息类型 * @locale * * @locale en * Message type * @locale */ type: TMsgType; /** * @Multi_Lang_Tag * @locale cn * 消息的文本内容 * @locale * * @locale en * Text content of the message * @locale */ body: string; /** * @Multi_Lang_Tag * @locale cn * 附加消息 * * 像是 file,geo 类型的消息,文本内容为空,在附加消息里会存在一个对象代表其内容 * @locale * * @locale en * Additional message * * For file and geolocation messages, the text content is empty. Instead, there will be an object in the additional message to represent its content * @locale */ attach?: StrAnyObj; /** * @Multi_Lang_Tag * @locale cn * sdk 端测唯一标识,可做主键使用 * @locale * * @locale en * Unique identifier of the message on the client side * @locale */ idClient: string; /** * @Multi_Lang_Tag * @locale cn * 消息服务器测的标识 * * 它并不一定存在,故而这条消息的唯一标识请选用 idClient * @locale * * @locale en * Unique identifier of the message on the server side * * Because the identifier might not exist, please use idClient as the unique identifier of the message. * @locale */ idServer?: string; /** * @Multi_Lang_Tag * @locale cn * 扩展字段 * @locale * * @locale en * Extension field * @locale */ ext?: string; /** * @Multi_Lang_Tag * @locale cn * 服务器第三方回调的扩展字段 * @locale * * @locale en * Extension fields for server’s third-party callbacks * @locale */ callbackExt?: string; /** * @Multi_Lang_Tag * @locale cn * 开发者自定义的消息子类型,格式为大于0的整数 * @locale * * @locale en * Developer-defined message subtype (format: integer greater than 0) * @locale */ subType?: number; /** * @Multi_Lang_Tag * @locale cn * 通知属性 * @locale * * @locale en * Notification attributes * @locale */ feature: TMsgFeature; /** * @Multi_Lang_Tag * @locale cn * 消息的杂项设置 * @locale * * @locale en * Miscellaneous settings for messages * @locale */ setting?: TMsgSetting; /** * @Multi_Lang_Tag * @locale cn * 反垃圾相关配置 * @locale * * @locale en * Moderation configurations * @locale */ antiSpamInfo?: TMsgAntiSpamInfo; /** * @Multi_Lang_Tag * @locale cn * 推送相关配置 * @locale * * @locale en * Configurations related to push notifications * @locale */ pushInfo?: TMsgPushInfo; /** * @Multi_Lang_Tag * @locale cn * 群组特化的杂项配置 * @locale * * @locale en * Configuration available only when the “scene” field is set to team or superTeam * @locale */ teamSpecializationInfo?: TMsgTeamSpecializationInfo; /** * @Multi_Lang_Tag * @locale cn * thread 消息的相关字段。假设消息的回复关系如下: * 消息A <- 消息B <- 消息C * * 则:消息C 的 replyMsg 是消息B,消息C 的 threadMsg 是消息A * * @locale * * @locale en * Fields related to threaded messages * Here is an example of a message that has been replied to many times: replyMsg of message C1 is message B1, and threadMsg of message C1 is message A * * message A * | \ * message B1 message B2 * | * message C1 * @locale */ threadMessageInfo?: TMsgThreadMsgInfo; } export interface NIM_StickTopSessionInfo { /** * @Multi_Lang_Tag * @locale cn * 是否置顶? * @locale * * @locale en * Whether a session is pinned * @locale */ isStickOnTop: boolean; /** * @Multi_Lang_Tag * @locale cn * 会话 id * @locale * * @locale en * Session ID * @locale */ id: string; /** * @Multi_Lang_Tag * @locale cn * 云端置顶的扩展信息 * @locale * * @locale en * Extension field * @locale */ ext: string; /** * @Multi_Lang_Tag * @locale cn * 会话置顶的记录创建时间 * @locale * * @locale en * The time when a session is pinned * @locale */ createTime: number; /** * @Multi_Lang_Tag * @locale cn * 会话置顶的记录更新时间 * @locale * * @locale en * The time when a pinned session is updated * @locale */ updateTime: number; } export interface Session { /** * @Multi_Lang_Tag * @locale cn * sessionId * * 例如 p2p-cs1、team-113879441 * @locale * * @locale en * sessionId * * Example: p2p-cs1, team-113879441 * @locale */ id: string; /** * @Multi_Lang_Tag * @locale cn * 会话场景 * * p2p 单聊 * * team 群组 * * superTeam 超大群 * @locale * * @locale en * Conversation scene * * p2p: one-to-one chat * * team : group chat * * superTeam : supergroup chat * @locale */ scene: TMsgScene; /** * @Multi_Lang_Tag * @locale cn * 聊天对象, * * 若 scene 为 p2p 单聊,则 to 为聊天对象的账号 * * 若 scene 为 team 或者 superTeam,则 to 为 群ID * @locale * * @locale en * Chat object, * * If the scene is one-to-one chat, the “to” field represents the account of the person that the user chats with. * * If the scene is group chat or supergroup chat, the “to” field represents the group ID. * @locale */ to: string; /** * @Multi_Lang_Tag * @locale cn * 未读数 * @locale * * @locale en * Unread count * @locale */ unread: number; /** * @Multi_Lang_Tag * @locale cn * 上一条消息. * * 若 lastMsg 为 undefined ,那么代表这个会话从没有过消息,导致会话不完整. sdk 将过滤掉此会话, 不会回调给上层的开发者 * * 若 lastMsg 为 null,lastMsg 为 null 则可能是撤回消息,也可能是清除了这个会话的历史消息 * @locale * * @locale en * Previous message * * If lastMsg is undefined, it may have never received or sent messages and the conversation is incomplete. The sdk will filter out this session and will not call back to the upper developers * * If lastMsg is null, the message is recalled or the historical messages of this conversation are cleared. * @locale */ lastMsg?: IMMessage | null; /** * @Multi_Lang_Tag * @locale cn * 更新时间 * @locale * * @locale en * Update time * @locale */ updateTime: number; /** * @Multi_Lang_Tag * @locale cn * 自己已读过的最近一条消息的时间 * * 用于判别自己已读到哪条消息了 * @locale * * @locale en * The time when you read the last message * * Used to determine which message you have read * @locale */ ack?: number; /** * @Multi_Lang_Tag * @locale cn * 自己还没读过的此会话消息。此字段不希望开发者处理。 * @locale * * @locale en * The conversation message that you haven't read yet * @locale */ unreadMsgs?: IMMessage[]; /** * @Multi_Lang_Tag * @locale cn * 聊天对象所读过的最近一条消息的时间 * * p2p 会话特有,与 msg.time 对比就能得知某条消息是否被对方已读 * * 被 API {@link MsgServiceInterface.sendMsgReceipt | sendMsgReceipt } 和 {@link MsgServiceInterface.sendTeamMsgReceipt | sendTeamMsgReceipt } 所更新 * @locale * * @locale en * Time when the last message read by the user * * p2p chat specific properties,can compare it with msg.time to know whether a message has been read by the other party. * @locale */ msgReceiptTime?: number; /** * @Multi_Lang_Tag * @locale cn * 云端置顶会话信息。若开通了云端置顶会话功能,且这个会话的确被设置为置顶会话,此对象存在。 * @locale * * @locale en * The information about a pinned session. If the pinning session feature is enabled, and the session is pinned * @locale */ stickTopInfo?: NIM_StickTopSessionInfo; } export interface NIMChatroomMessage { /** * 聊天室 ID */ chatroomId: string; /** * SDK生成的消息id, 在发送消息之后会返回给开发者, SDK生成的消息id, 在发送消息之后会返回给开发者, 作为消息的不重复的key值 */ idClient: string; /** * 消息发送方, 帐号 */ from: string; /** * 消息发送方的昵称 */ fromNick: string; /** * 消息发送方的头像 */ fromAvatar: string; /** * 消息发送方的扩展字段 */ fromCustom: string; /** * 发送方的设备类型 */ fromClientType: string; /** * 消息类型 */ type: string; /** * 消息的流向 * - 'in'表示此消息是收到的消息 * _ 'out'表示此消息是发出的消息 */ flow: 'in' | 'out'; /** * 是否跳过存云端历史, false:不跳过,true:跳过存历史,默认false */ skipHistory?: boolean; /** * 文本消息的文本内容 */ text?: string; /** * 文件消息的文件对象 */ file?: NIMImage | NIMAudio | NIMVideo | NIMFile; /** * 地理位置消息 */ geo?: NIMChatroomMsgGEO; /** * 提醒消息的内容 */ tip?: string; /** * 自定义消息的消息内容, 开发者可以自行扩展, 建议封装成JSON格式字符串 */ content?: string; /** * 附加信息,推荐使用 JSON 格式化字符串 */ attach?: string; /** * 扩展字段 * 推荐使用JSON格式构建, 非JSON格式的话, Web端会正常接收, 但是会被其它端丢弃 */ custom?: string; /** * 是否是重发的消息 */ resend: boolean; /** * 时间戳 */ time: number; /** * 服务器第三方回调的扩展字段 */ callbackExt?: string; /** * 开发者自定义的消息子类型,格式为大于0的整数 */ subType?: number; /** * 环境变量,用于指向不同的抄送、第三方回调等配置 */ env?: string; chatroomType?: number; messageUuid?: string; } export interface NERoomLiveBackgroundInfo extends NERoomLiveBackgroundParam { backgroundUpdatedSequence?: number; } export interface NERoomLiveBackgroundParam { /** * 直播背景图Url */ backgroundUrl?: string; /** * 直播背景缩略图图Url */ thumbnailBackgroundUrl?: string; /** * 直播播放器封面图Url */ coverUrl?: string; /** * 直播播放器封缩略图面图Url */ thumbnailCoverUrl?: string; } export type NERoomVideoView = string | HTMLElement; /** * 0 关闭已设置的云代理, 1开启 UDP 协议的云代理 */ export type NERoomRtcTransportType = 0 | 1; export interface NERoomLiveInfo { taskId?: string; pushUrl?: string; chatRoomId?: string; pullHttpUrl?: string; pullRtmpUrl?: string; pullRtsUrl?: string; pullHlsUrl?: string; title?: string; liveLayout?: NERoomLiveLayout; password?: string; userUuidList?: string[]; state: NERoomLiveState; extensionConfig?: string; backgroundUpdateSeq?: number; } export declare enum AudioProfile { speech_low_quality = "speech_low_quality", speech_standard = "speech_standard", music_standard = "music_standard", standard_stereo = "standard_stereo", high_quality = "high_quality", high_quality_stereo = "high_quality_stereo" } export declare enum tagNERoomRtcAudioProfileType { /** * 默认设置。Speech 场景下为 kNEAudioProfileStandardExtend,Music 场景下为 kNEAudioProfileHighQuality */ kNEAudioProfileDefault = 0, /** * 普通质量的音频编码,16000Hz,20Kbps */ kNEAudioProfileStandard = 1, /** * 普通质量的音频编码,16000Hz,32Kbps */ kNEAudioProfileStandardExtend = 2, /** * 中等质量的音频编码,48000Hz,32Kbps */ kNEAudioProfileMiddleQuality = 3, /** * 中等质量的立体声编码,48000Hz * 2,64Kbps */ kNEAudioProfileMiddleQualityStereo = 4, /** * 高质量的音频编码,48000Hz,64Kbps */ kNEAudioProfileHighQuality = 5, /** * 高质量的立体声编码,48000Hz * 2,128Kbps */ kNEAudioProfileHighQualityStereo = 6 } export declare enum tagNERoomRtcAudioScenarioType { /** * 默认设置 * kNEChannelProfileCommunication 下为 kNEAudioScenarioSpeech * kNEChannelProfileLiveBroadcasting 下为 kNEAudioScenarioMusic */ kNEAudioScenarioDefault = 0, /** * 语音场景。NERoomRtcAudioProfileType 推荐使用 kNEAudioProfileMiddleQuality 及以下 */ kNEAudioScenarioSpeech = 1, /** * 音乐场景。NERoomRtcAudioProfileType 推荐使用 kNEAudioProfileMiddleQualityStereo 及以上 */ kNEAudioScenarioMusic = 2 } export type NEEncryptionMode = 'none' | 'sm4-128-ecb'; /** * Electron 共享屏幕配置 */ export interface NERoomRtcScreenCaptureSource { icon: { size: { width: number; height: number; }; length: number; data: Uint8Array; }; id: number; name: string; primaryMonitor: boolean; processPath: string; thumbImage: { size: { width: number; height: number; }; length: number; data: Uint8Array; }; title: string; type: number; } export declare enum NEVideoResolution { kNEVideoProfileUsingTemplate = -1 /**< 使用模板配置 */, kNEVideoProfileLowest = 0 /**< 普清(160x90/120, 15fps) */, kNEVideoProfileLow = 1 /**< 标清(320x180/240, 15fps) */, kNEVideoProfileStandard = 2 /**< 高清(640x360/480, 30fps) */, kNEVideoProfileHD720P = 3 /**< 超清(1280x720, 30fps) */, kNEVideoProfileHD1080P = 4 /**< 1080P(1920x1080, 30fps) */, kNEVideoProfile4KUHD = 5 /**< 4K(3840x2160, 30fps) */, kNEVideoProfile8KUHD = 6 /**< 8K(7680x4320, 30fps) */, kNEVideoProfileNone = 7 /**< 无效果 */, kNEVideoProfileMAX = 6 } /** * 视频分辨率及帧率参数设置 */ export type NERoomVideoConfig = { /** * 分辨率 */ resolution: VideoResolution; /** * 帧率 */ frameRate?: VideoFrameRate; }; export declare enum NEVideoStreamType { HIGH = 0, LOW = 1, MEDIUM = 2 } export interface NEWaitingRoomMember { /** * 用户id */ uuid: string; /** * 用户名 */ name: string; /** * 用户头像 */ avatar?: string; /** * 成员加入等候室的服务端时间戳,可用于计算等待时间或排序 */ joinTime: number; /** * 当前状态:等候中、被准入(正在加入)、已离开 */ status: number; } /** * 等候室配置信息 */ export interface NEWaitingRoomInfo { /** * 当前等候室成员数量 */ memberCount: number; /** * 当前房间是否开启了等候室 */ isEnabledOnEntry: boolean; /** * 等候室背景图 */ backgroundImageUrl: string; } export type VideoResolution = 180 | 480 | 720 | 1080; export type VideoFrameRate = 1 | 5 | 10 | 15 | 20 | 25 | 30; /** * RTC实例包装类,可获取RTC实例,添加/删除RTC回调 */ export interface NERtcWrapper { /** * 获取RTC实例 */ rtcEngine: NERtcEx; } export interface NERtcEx { client: Client; } /** * SDK 全局事件监听器 */ export interface NEGlobalEventListener { /** * RTC engine 初始化之前回调 * @param roomUuid 房间UUID */ beforeRtcEngineInitialize?(roomUuid: string): any; /** * RTC engine 完成初始化后回调 * @param roomUuid 房间UUID * @param rtcWrapper RTC Wrapper 实例 */ afterRtcEngineInitialize?(roomUuid: string, rtcWrapper: NERtcWrapper): any; /** * RTC engine 销毁前回调 * @param roomUuid 房间UUID * @param rtcWrapper RTC Wrapper 实例 */ beforeRtcEngineRelease?(roomUuid: string, rtcWrapper: NERtcWrapper): any; } /** * 呼叫的服务器响应结果 */ export interface NERoomSipCallResponse { userUuid: string; name: string; isRepeatedCall: boolean; } export type MeetingWhiteboardView = { onLogin?: (webScript: string) => void; onLogout?: (webScript: string) => void; onAuth?: (webScript: string) => void; onToolConfigChanged?: (webScript: string) => void; onDrawEnableChanged?: (webScript: string) => void; }; /** * 共享区域参数设置 */ export type NERoomRectShareConfig = { sourceRectangle: NERoomShareRectangle; regionRectangle: NERoomShareRectangle; preferMotion?: boolean; videoProfile?: string; frameRate?: number; limitFrameRate?: number; degradationPreference?: number; bitrate?: number; }; export type NERoomShareRectangle = { x: number; y: number; width: number; height: number; }; /** * 更新共享屏幕参数 */ export type NERoomUpdateScreenSharingOption = { /** * 是否优先运动 */ preferMotion?: boolean; /** * 限制帧率 */ limitFrameRate?: number; /** * 分辨率配置 */ videoProfile?: string; /** * 帧率 */ frameRate?: number; /** * 编码降级偏好 */ degradationPreference?: number; /** * 编码码率 */ bitrate?: number; /** * 排除的窗口列表 */ excludedWindowList?: number[] | unknown[]; }; /** * 共享屏幕分辨率及帧率参数设置 */ export type NERoomScreenConfig = { /** * 是否需要通知会议服务器开启屏幕共享的通知 */ needRequestMeetingServerScreenShare?: boolean; /** * 源ID */ sourceId?: string; /** * 分辨率 */ resolution?: VideoResolution; /** * 帧率 */ frameRate?: number; /** * 限制帧率 */ limitFrameRate?: number; /** * 分辨率配置 */ videoProfile?: string; /** * 编码降级偏好 */ degradationPreference?: number; /** * 编码码率 */ bitrate?: number; /** * 是否是应用共享 */ isApp?: boolean; /** * 强制共享全屏(web端) */ forceDisplaySurface?: 'default' | 'browser' | 'window' | 'monitor'; }; /** * 停止共享屏幕参数设置 */ export type NERoomStopScreenConfig = { /** * 是否需要通知会议服务器关闭屏幕共享的通知 */ needRequestMeetingServerScreenShare?: boolean; }; export declare enum NERoomAudioAINSMode { NERTCAudioAINSModeOff = 0, NERTCAudioAINSModeNormal = 1, NERTCAudioAINSModeEnhanced = 2, NERoomAudioAINSModeVoiceprint = 3 } export declare enum NERoomLiveLayout { /** 无布局 */ NONE = 0, /** 画廊布局 */ GALLERY = 1, /** 焦点布局 */ FOCUS = 2, /** 共享屏幕布局 */ SCREEN_SHARE = 4 } export declare enum NERoomLiveState { /** 无效状态 */ INVALID = 0, /** 初始状态 */ INIT = 1, /** 直播中状态 */ STARTED = 2, /** 直播结束状态 */ ENDED = 3 } export interface NERoomLiveRequest { title: string; liveLayout: NERoomLiveLayout; password?: string; userUuidList: string[]; enableThirdParties?: boolean; extensionConfig?: string; } export interface NERoomLiveStreamTaskInfo { /** 自定义的推流任务ID 字母、数字、下划线组成的 64 位以内的字符串。请保证此ID唯一。 */ taskId?: string; /** 推流地址 例如 **rtmp://test.url**。 此处的推流地址可设置为网易云信直播产品中服务端 API创建房间的返回参数pushUrl。 */ streamUrl?: string; /** 旁路推流是否需要进行音视频录制 默认为关闭状态。 */ serverRecordEnabled: false; /** 直播推流模式 默认为 kNERtcLsModeVideo。详细信息请参考 {@link NERoomLiveStreamMode}。 */ /** 设置互动直播的画面布局 */ layout?: NERoomLiveStreamLayout; /** 音视频流编码参数等设置 */ config?: NERoomLiveConfig; /** 预留参数 用户自定义的发送到旁路推流客户端的信息,用于填充 H264/H265 视频中 SEI 帧内容。长度限制:4096 字节。 */ extraInfo?: string; } export interface NERoomLiveStreamLayout { /** 整体画布的宽度 单位为 **px**。 取值范围为 **0~1920**,若设置为奇数值,会自动向下取偶。 */ width: number; /** 整体画布的高度 单位为 **px**。取值范围为 **0~1920**,若设置为奇数值,会自动向下取偶。 */ height: number; /** 画面背景颜色 格式为 256 ✖ 256 ✖ R + 256 ✖ G + B的和。请将对应 RGB 的值分别带入此公式计算即可。若未设置,则默认为0。 */ backgroundColor: number; /** 成员布局数组 */ userTranscodingList?: NERoomLiveStreamUserTranscoding[]; /** 占位图片 */ images?: NERoomLiveStreamImageInfo[]; } export interface NERoomLiveStreamUserTranscoding { uuid?: string; /** 是否在直播中向观看者播放该用户的对应视频流。 可设置为: - YES:(默认)在直播中播放该用户的视频流。 - NO:在直播中不播放该用户的视频流。 推流模式为kNERtcLsModeAudio时无效。 */ videoPush: boolean; /** 用户图像的横轴坐标值 用于设置用户图像的横轴坐标值。 通过 x 和 y 指定画布坐标中的一个点,该点将作为用户图像的左上角。 取值范围为 **0~1920**,若设置为奇数值,会自动向下取偶。 用户图像范围如果超出超出画布,调用方法时会报错。 */ x: number; /** 用户图像的纵轴坐标值 用于设置用户图像的纵轴坐标值。 通过 x 和 y 指定画布坐标中的一个点,该点将作为用户图像的左上角。 取值范围为 **0~1920**,若设置为奇数值,会自动向下取偶。 用户图像范围如果超出超出画布,调用方法时会报错。 */ y: number; /** 用户图像在画布中的宽度 取值范围为 **0~1920**,默认为**0**。 若设置为奇数值,会自动向下取偶。 用户图像范围如果超出超出画布,调用方法时会报错。 */ width: number; /** 用户图像在画布中的高度 取值范围为 **0~1920**,默认为**0**。 若设置为奇数值,会自动向下取偶。 用户图像范围如果超出超出画布,调用方法时会报错。 */ height: number; /** 是否在直播中混流该用户的对应音频流 可设置为: - YES:(默认)在直播中混流该用户的对应音频流。 - NO:在直播中将该用户设置为静音。 */ audioPush: boolean; /** 图层编号 用来决定渲染层级, 取值 **0-100**, 0位于最底层,100位于最顶层,相同层级的渲染区域按照现有的覆盖逻辑实现(按照数组中顺序进行渲染,index递增依次往上叠加) */ zOrder: number; } export interface NERoomLiveStreamImageInfo { url: string; /** 横轴坐标值 用于设置画布的横轴坐标值。 通过 x 和 y 指定画布坐标中的一个点,该点将作为占位图片的左上角。 取值范围为 **0~1920**,若设置为奇数值,会自动向下取偶。 */ x: number; /** 纵轴坐标值 用于设置画布的纵轴坐标值。 通过 x 和 y 指定画布坐标中的一个点,该点将作为占位图片的左上角。 取值范围为 **0~1920**,若设置为奇数值,会自动向下取偶。 */ y: number; /** 画布中的宽度。 取值范围为 **0~1920**,若设置为奇数值,会自动向下取偶。 */ width: number; /** 画布中的高度。 取值范围为 **0~1920**,若设置为奇数值,会自动向下取偶。 */ height: number; /** * 用于设置占位图片和指定区域的适应属性。可设置为: * * 0:适应图片。即保证视频内容全部显示,未覆盖区域默认填充背景色 * * 1:适应区域。即保证所有区域被填满,视频超出部分会被裁剪。 * * 若未设置,则默认为 1。 */ adaption: 0 | 1; } export interface NERoomLiveConfig { /** 单路视频透传开关 默认为关闭状态。 开启后,如果房间中只有一路视频流输入, 则不对输入视频流进行转码,不遵循转码布局,直接推流 CDN。 如果有多个房间成员视频流混合为一路流,则该设置失效,并在恢复为一个成员画面(单路流)时也不会恢复。 */ singleVideoPassThrough: boolean; /** 音频推流码率 单位为 **kbps**,取值范围为 **10~192**。 语音场景建议设置为 64 及以上码率,音乐场景建议设置为 128 及以上码率。 */ audioBitrate: number; /** 音频推流采样率 单位为**Hz**,可设置为: - 32000:采样率为 32 kHz。 - 44100:采样率为 44.1 kHz。 - (默认)48000:采样率为 48 kHz。 */ sampleRate: NERoomLiveStreamAudioSampleRate; /** 音频推流声道数 - 1:单声道。 - 2:(默认)双声道。 */ channels: number; /** 音频编码规格 - 0:(默认)LC-AAC 规格,表示基本音频编码规格。 - 1:HE-AAC 规格,表示高效音频编码规格。 */ audioCodecProfile: NERoomLiveStreamAudioCodecProfile; } export declare enum NERoomLiveStreamAudioSampleRate { SAMPLE_RATE_32000 = 32000, SAMPLE_RATE_44100 = 44100, SAMPLE_RATE_48000 = 48000 } export declare enum NERoomLiveStreamAudioCodecProfile { 'LC-AAC' = 0, 'HE-AAC' = 1 } /** * IM 服务器配置项 */ export type NEIMServerConfig = { /** * lbs连接地址 */ lbs: string; /** * link连接地址 */ link: string; /** * 是否对link连接进行https处理 */ linkSslWeb: boolean; /** * nos上传地址 */ nosUploader: string; /** * nos是否开启https */ httpsEnabled: boolean; /** * nos下载地址 这个是用来接到消息后,要按一定模式替换掉文件链接的。给予一个安全下载链接。 */ nosDownloader: string; /** * nos lbs连接地址 */ nosLbs: string; /**q * 是否开启云端会话 */ enableV2CloudConversation?: boolean; }; /** * RTC 服务器配置 */ export interface NERtcServerConfig { /** * 通道信息服务器地址 */ channelServer: string; /** * 统计上报服务器地址 */ statisticsServer: string; /** * roomServer服务器地址 */ roomServer: string; /** * mediaServer服务器地址 */ mediaProxyServer?: string; /** * 云代理功能配置的服务器地址 */ cloudProxyServer?: string; /** * 数据上报(e2e数据)和日志上报的地址 */ statisticsWebSocketServer: string; /** * edge信令服务器的配置(web端是wstatisticsServerebsocket协议,native端是quick协议) */ webSocketProxyServer?: string; /** * 是否使用ipv6 */ useIPv6: boolean; /** * AI howling 插件地址 */ AIhowlingSimdUrl?: string; AIhowlingNoSimdUrl?: string; } export interface NEWhiteboardServerConfig { /** * 白板web地址 */ webServer: string; /** * getChannelInfo接口的地址。用于创建加入白板房间 */ roomServer: string; /** * 白板日志上传接口地址. 默认为: https://statistic.live.126.net/sdklog/getToken */ sdkLogNosServer: string; /** * 白板日志上报地址. 默认为: https://statistic.live.126.net/statics/report/common/form */ dataReportServer: string; /** * nos直传地址. 默认为: https://wanproxy-web.127.net */ directNosServer: string; /** * 音视频,图片上传地址. 默认为: https://vcloud.163.com */ mediaUploadServer: string; /** * 文档转码地址 */ docTransServer: string; /** * 白板私有化sdk地址 */ privateSDKUrl?: { WhiteboardUrl?: string; ToolCollectionUrl?: string; PPTRendererUrl?: string; }; } export interface StaticDocParam { /** * 图片高度 */ height: number; /** * 图片宽度 */ width: number; /** * index偏移量 */ offset: number; /** * 文档页数 */ pageCount: number; /** * 图片url的模板。 格式为: "https://??/?{index}.jpg", "https://??/?{index}.png" 如果offset为1,则第5页的图片为: "https://??/?6.jpg", 或者"https://??/?6.png" */ template: string; } export interface DynamicDocParam { /** * 图片高度 */ height: number; /** * 图片宽度 */ width: number; /** * 文档页数 */ pageCount: number; /** * 动态文档URL */ url: string; } export interface MediaDocParam { /** * 动态文档URL */ url: string; object: string; bucket: string; } export interface UrlDocParam { /** * URL页面资源参数 */ url: string; trans: string; } export declare enum AspectRatio { /** * 自适应 */ adaption = 0, /** * 16:9 */ aspectRatio_16_9 = 1 } export interface AddDocConfig { /** * 文档的唯一id */ docId: string; /** * 文档类型,会影响弹窗中文档的图标"pdf" | "ppt" | "doc" | "mp4" */ fileType: string; /** * 文档名称,会影响弹窗中文档名称 */ name: string; /** * 是否在文档弹窗中显示删除按钮 */ showDelete: boolean; /** * 文档具体的数据参数 */ params: StaticDocParam | DynamicDocParam | MediaDocParam | UrlDocParam; } export interface getStreamConfig { /** * 白板推流的 fps. * 请参考该接口的frameRate参数:https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/captureStream * 当该参数设置超过60时,实际采集为 60 fp */ frameRate?: number; /** * 默认为true * 如果设置了width,则该参数无效 如果未设置width,参数为true时,视频流的大小为容器宽度 * DPI */ keepDPI?: boolean; /** * 视频流宽度。高度根据容器宽高比自动计算 * 若不指定,则视频分辨率随容器宽度变化 */ width?: number; } export type ReuseImEvent = 'reuseImWillReconnect' | 'reuseImDisconnect' | 'reuseImError' | 'reuseImMsgs' | 'reuseImProxyMsg'; /** * NERoom Kit API manager. */ export interface Roomkit { /** * 切换语言,组件不会缓存该设置。 * @param language 目标语言。如果为空,则使用当前系统语言。 */ switchLanguage: (language?: NERoomLanguage) => number; /** * 版本信息 */ sdkVersions: NESDKVersions; /** * 切换SDK服务器域名 * @param domain SDK服务器域名 * * @return 0: 成功;否则为失败; */ switchDomain?: (domain: string) => number; /** * 基于 AppKey 获取可用的服务器域名。 * @param appKey 应用 AppKey。 */ getAvailableDomain?: (appKey: string) => NEDomainInfoResult; /** * 写日志 * @param moduleName 模块名称 * @param level 日志级别 * @param content 日志内容 */ writeLog?: (moduleName: string, level: number, content: string) => void; /** * 查询初始化状态 */ isInitialized: boolean; /** * 获取鉴权服务,提供登录、登出能力 */ authService: NEAuthService; /** * 获取房间服务,提供创建、加入房间能力 */ roomService: NERoomService; /** * 获取消息通道服务,提供房间内发送自定义消息能力 */ messageChannelService: NEMessageChannelService; /** * nosService 服务 */ nosService: NENosService; /** * 获取扩展服务,提供扩展加载、启用能力 */ extensionService?: NEExtensionService; /** * 初始化 * @param options roomKit选项 */ initialize: (options: NERoomKitOptions) => Promise>; /** * 添加全局事件监听器 * @param listener 全局事件监听器 */ addGlobalEventListener(listener: NEGlobalEventListener): any; /** * 移除全局事件监听器 * @listener 全局事件监听器 */ removeGlobalEventListener(listener: NEGlobalEventListener): any; /** * 释放资源 */ release: () => NEResult; /** * 上传日志 */ uploadLog?: () => Promise>; /** * 获取当前日志路径 */ getCurrentLogPath?: () => string; getNetworkType?: () => number; reuseIM: (NIM?: any) => StrAnyObj | void; emit: (eventName: ReuseImEvent, data?: any) => void; } /** * 版本信息 * @property imVersion IM版本 * @property rtcVersion Rtc版本 * @property whiteboardVersion 白板版本 * @property roomKitVersion RoomKit版本 */ export interface NESDKVersions { imVersion: string; rtcVersion: string; whiteboardVersion: string; roomKitVersion: string; } /** * 组件当前支持的语言类型 * CHINESE: 简体中文; TRADITIONAL_CHINESE: 繁体中文; ENGLISH: 英文; JAPANESE: 日文; */ export declare enum NERoomLanguage { CHINESE = "CHINESE", TRADITIONAL_CHINESE = "TRADITIONAL_CHINESE", ENGLISH = "ENGLISH", JAPANESE = "JAPANESE" } export type NEServerConfig = { roomKitServerConfig?: { roomServer: string; lbsServer?: string; }; imServerConfig?: NEIMServerConfig; rtcServerConfig?: NERtcServerConfig; whiteboardServerConfig?: NEWhiteboardServerConfig; }; /** * 提供初始化配置 * @property appKey appKey * @property debug 是否开启日志打印,默认为true * @property eventTracking 是否开启埋点上报,默认为true * @property appKey appKey * @property serverConfig NERoom私有化 * @property serverUrl NERoom私有化,服务器配置项 优先级 serverConfig > serverUrl * @property im 复用im的实例,有值则表示复用im * @property extras 预留字段 * @property useInternalVideoRender 是否使用内部视频渲染,默认为false(仅electron支持) * @property logPath 日志路径 */ export type NERoomKitOptions = { appKey: string; debug?: boolean; eventTracking?: boolean; serverConfig?: NEServerConfig; serverUrl?: string; im?: NIM; extras?: StrAnyObj; whiteboardAppConfig?: NERoomWhiteboardAppConfig; useInternalVideoRender?: boolean; logPath?: string; }; export declare enum NERoomMemberState { /** * 未知 */ unknown = 0, /** * 初始化 */ init = 1, /** * 在房间中 */ inRoom = 2, /** * 已离开 */ leave = 3, /** * 邀请中 */ inviting = 4 } /** * 网络类型 */ export declare enum NENetworkType { /** * 存在连接,但其类型未知。未知 */ kConnectionUnknown = 0, /** * 以太网 */ kConnectionEthernet = 1, /** * 无线网络 */ kConnectionWifi = 2, /** * 2G */ kConnection2G = 3, /** * 3G */ kConnection3G = 4, /** * 4G */ kConnection4G = 5, /** * 无网络 */ kConnectionNone = 6 } /** * 设备支持级别。 */ export declare enum NERoomVirtualBackgroundSupportedType { /** * 当前设备支持该功能。 */ kNEVirtualBackgroundSupportFull = 0, /** * 由于设备硬件或系统原因,当前设备不支持该功能。 */ kNEVirtualBackgroundSupportHardwareLimit = 1, /** * 由于设备性能不足,不支持该功能,但可以强制打开。例如,低性能设备可以通过将 `enableVirtualBackground(true, backgroundSource, true)` * 可强制打开虚拟背景功能。 */ kNEVirtualBackgroundSupportPerformanceLimit = 2 } export declare enum NERoomVideoLowlightEnhanceLevel { /** * 低光环境增强级别:优先进行画质增强,暗部增强明显 */ kNERoomVideoLowlightEnhanceLevelQuality = 1, /** * 低光环境增强级别:只增强暗部 */ kNERoomVideoLowlightEnhanceLevelBalance = 2, /** * 低光环境增强级别:根据画面整体亮度决定是否进行增强 */ kNERoomVideoLowlightEnhanceLevelAuto = 3 } export declare enum NERoomLocalRecorderError { kNERoomLocalRecorderErrorNone = 0, kNERoomLocalRecorderFileOpenFailed = 1, kNERoomLocalRecorderWriteFailed = 2, kNERoomLocalRecorderWriteTrailerFailed = 3, kNERoomLocalRecorderFailed = 4, kNERoomLocalRecorderCallbackConflict = 5, kNERoomLocalRecorderTaskAlreadyExist = 6, kNERoomLocalRecorderTaskNotFound = 7, kNERoomLocalRecorderSourceNotFoundForTask = 8, kNERoomLocalRecorderInputOpenFailed = 9, kNERoomLocalRecorderVideoStreamCreateFailed = 10, kNERoomLocalRecorderAudioStreamCreateFailed = 11 } export interface NERoomStartLocalRecordOptions { /** 是否录制音频,生成aac文件 */ recordAudio: boolean; /** 是否开启时间戳水印 */ isShowTimestampCover: boolean; /** 录制文件名称 */ filePath: string; /** 录制文件名称:会议名称_uid_timestamp */ fileName: string; dirNmae?: string; /** 背景占位图地址 */ coverConfigFilePath?: string; /** 视频占位图地址 */ defaultCoverConfigFilePath?: string; /** 封面的会议名称 */ coverTitle?: string; /** 封面的会议号 */ coverMeetingNumber?: string; /** 封面的会议开始时间 */ coverCreateTime?: string; } export declare enum NERoomStreamType { main = 0,//视频流 sub = 1 } export declare enum NERoomStreamLayer { low = 0, meddle = 1, high = 2, higher = 3 } export declare enum NERoomsCalingMode { fullFill = 0,//填满视窗模式。视频尺寸非等比缩放。保证视频内容全部显示,且填满视窗 CropFill = 1 } export interface NERoomLocalRecordLayouts { /** rtc房间的userID */ uid: string; /** 媒体类型 */ streamType: NERoomStreamType; /** 视频占位图地址 */ streamLayer: NERoomStreamLayer; /** 用户图像的横轴坐标值 用于设置用户图像的横轴坐标值。 通过 x 和 y 指定画布坐标中的一个点,该点将作为用户图像的左上角。 取值范围为 **0~720**,若设置为奇数值,会自动向下取偶。 */ offsetX: number; /** 用户图像的纵轴坐标值 用于设置用户图像的纵轴坐标值。 通过 x 和 y 指定画布坐标中的一个点,该点将作为用户图像的左上角。 取值范围为 **0~1280**,若设置为奇数值,会自动向下取偶。 、 */ offsetY: number; /** 用户图像在画布中的宽度 取值范围为 **0~1280**,默认为**0**。 若设置为奇数值,会自动向下取偶。 用户图像范围如果超出超出画布,调用方法时会报错。 */ width: number; /** 用户图像在画布中的高度 取值范围为 **0~720**,默认为**0**。 若设置为奇数值,会自动向下取偶。 用户图像范围如果超出超出画布,调用方法时会报错。 */ height: number; /** 是否是屏幕共享 */ isScreenShare: boolean; /** 图层编号 用来决定渲染层级, 取值 **0-100**, 0位于最底层,100位于最顶层,相同层级的渲染区域按照现有的覆盖逻辑实现(按照数组中顺序进行渲染,index递增依次往上叠加) */ scalingMode: NERoomsCalingMode; /** 背景颜色ARGB格式 */ bgColor?: number; } export interface NERoomUpdateLocalRecordLayoutsOptions { /** rtc房间的userID */ uid: string; /** 媒体类型 */ streamType: NERoomStreamType; /** 视频占位图地址 */ streamLayer: NERoomStreamLayer; /** 用户图像的横轴坐标值 用于设置用户图像的横轴坐标值。 通过 x 和 y 指定画布坐标中的一个点,该点将作为用户图像的左上角。 取值范围为 **0~720**,若设置为奇数值,会自动向下取偶。 */ offsetX: number; /** 用户图像的纵轴坐标值 用于设置用户图像的纵轴坐标值。 通过 x 和 y 指定画布坐标中的一个点,该点将作为用户图像的左上角。 取值范围为 **0~1280**,若设置为奇数值,会自动向下取偶。 、 */ offsetY: number; /** 用户图像在画布中的宽度 取值范围为 **0~1280**,默认为**0**。 若设置为奇数值,会自动向下取偶。 用户图像范围如果超出超出画布,调用方法时会报错。 */ width: number; /** 用户图像在画布中的高度 取值范围为 **0~720**,默认为**0**。 若设置为奇数值,会自动向下取偶。 用户图像范围如果超出超出画布,调用方法时会报错。 */ height: number; /** 是否是屏幕共享 */ isScreenShare: boolean; /** 图层编号 用来决定渲染层级, 取值 **0-100**, 0位于最底层,100位于最顶层,相同层级的渲染区域按照现有的覆盖逻辑实现(按照数组中顺序进行渲染,index递增依次往上叠加) */ scalingMode: NERoomsCalingMode; /** 背景颜色ARGB格式 */ bgColor?: number; /** 是否开启昵称水印 */ isShowNameCover: boolean; /** 是否显示占位图 */ isShowStreamDefaultCover: boolean; } /** * 视频帧旋转角度 */ export declare enum NEVideoRotation { kNEVideoRotation_0 = 0 /**< 0度 */, kNEVideoRotation_90 = 90 /**< 90度 */, kNEVideoRotation_180 = 180 /**< 180度 */, kNEVideoRotation_270 = 270 /**< 270度 */ } /** * 外部输入的视频帧 */ export declare enum NEVideoType { kNEVideoTypeI420 = 0 /**< I420 视频格式 */, kNEVideoTypeNV12 = 1 /**< NV12 视频格式 */, kNEVideoTypeNV21 = 2 /**< NV21 视频格式 */, kNEVideoTypeBGRA = 3 /**< BGRA 视频格式 */, kNEVideoTypeARGB = 4 /**< AGRB 视频格式 */, kNEVideoTypeCVPixelBuffer = 5 /**Capture Native格式 */, kNEVideoTypeRGBA = 6 /**< RGBA 视频格式 */ } export interface NERoomVideoFrame { format: NEVideoType; /**< 视频帧格式,详细信息请参考 */ timestamp: number; /**< 视频时间戳,单位为毫秒 */ width: number; /**< 视频帧宽度 */ height: number; /**< 视频帧宽高 */ rotation: NEVideoRotation; /**< 视频旋转角度 */ buffer: Uint8ClampedArray | number[] | null; /**< 视频桢数据 */ } /** * 可用域名查询结果 */ export interface NEDomainInfoResult { /** 错误码,0表示成功,其他表示失败 */ code: number; /** 错误信息 */ msg?: string; /** 可用域名信息 */ data?: NEDomainInfo; } /** * 可用域名信息 */ export interface NEDomainInfo { /** 缓存生存时间,单位为秒 */ ttl: number; /** 更新时间,单位为毫秒 */ updateTime: number; /** 并发数 */ racingLimit: number; /** 超时时间,单位为毫秒 */ switchTimeout: number; /** 域名列表 */ domainList: { domain: string; }[]; } export declare enum NERoomBeautyEffectType { /** * 美牙。强度默认值为 0.0。 */ NERoomBeautyWhiteTeeth = 0, /** * 亮眼。强度默认值为 0.0。 */ NERoomBeautyLightEye = 1, /** * 美白。强度默认值为 0.0。 */ NERoomBeautyWhiten = 2, /** * 磨皮。强度默认值为 0.0。 */ NERoomBeautySmooth = 3, /** * 小鼻。强度默认值为 0.0。 */ NERoomBeautySmallNose = 4, /** * 眼距调整。强度默认值为 0.5。 */ NERoomBeautyEyeDis = 5, /** * 眼角调整。强度默认值为 0.5。 */ NERoomBeautyEyeAngle = 6, /** * 嘴型调整。强度默认值为 0.5。 */ NERoomBeautyMouth = 7, /** * 大眼。强度默认值为 0.0。 */ NERoomcBeautyBigEye = 8, /** * 小脸。强度默认值为 0.0。 */ NERoomBeautySmallFace = 9, /** * 下巴调整。强度默认值为 0.0。 */ NERoomBeautyJaw = 10, /** * 瘦脸。强度默认值为 0.0。 */ NERoomBeautyThinFace = 11, /** *红润。强度默认值为0.0。 */ NERoomBeautyFaceRuddy = 12, /** * 长鼻。强度默认值为 0.5。 */ NERoomBeautyLongNose = 13, /** * 人中。强度默认值为 0.5。 */ NERoomBeautyRenZhong = 14, /** * 嘴角。强度默认值为 0.5。 */ NERoomBeautyMouthAngle = 15, /** * 圆眼。强度默认值为 0.0。 */ NERoomBeautyRoundEye = 16, /** * 开眼角。强度默认值为 0.0。 */ NERoomBeautyOpenEyeAngle = 17, /** * V脸。强度默认值为 0.0。 */ NERoomBeautyVFace = 18, /** * 瘦下颌。强度默认值为 0.0。 */ NERoomBeautyThinUnderjaw = 19, /** * 窄脸。强度默认值为 0.0。 */ NERoomBeautyNarrowFace = 20, /** * 瘦颧骨。强度默认值为 0.0。 */ NERoomBeautyCheekBone = 21, /** *锐化。强度默认值为0.0。 */ NERoomBeautyFaceSharpen = 22, /** * 嘴宽。强度默认值为 0.0(electron无效)。 */ NERoomBeautyMouthWidth = 23, /** * 缩短脸。强度默认值为 0.0(electron无效)。 */ NERoomBeautyShortenFace = 24, /** * 淡化抬头纹。强度默认值为 0.0(electron无效)。 */ NERoomBeautyFadeHeadWrinkle = 25, /** * 淡化黑眼圈。强度默认值为 0.0(electron无效)。 */ NERoomBeautyFadeEyeRim = 26, /** * 淡化法令纹。强度默认值为 0.0(electron无效)。 */ NERoomBeautyFadeNoseLine = 27 } export declare enum NELeaveRoomType { /** * 所有设备都离开房间 */ ALL = 0, /** * 只有自身离开房间 */ ONLY_SELF = 1 } export interface NEInRoomDeviceListItem { roomUuid: string; isMultiDeviceEnabled: boolean; deviceList: NEConnectedDevice[]; } export type NERoomVoiceprintInfo = { /** * 设备ID */ deviceId: string; /** * 声纹数据 */ voiceprint: string; }; export {};