import { IToken } from './base'; import { IInternals, StreamFrameRate, StreamResolution, StreamResolutionLevel, VideoQuality } from './stream'; import { SupportLocalLanguages } from '../enum/index'; import { ICloudRoomConfig, WatermarkRange, WatermarkStatus } from './meeting'; import { ContentTemplateMode, TemplateMode, ChairManReason } from './layout'; import { ILayout, IRoster, XYAccountConfig } from './index'; import { XYConferencePropertiesMessage } from '../main/meeting/index.type'; /** * 向Client推送流类型 * * @param All - 所有音视频数据 * @param CONTENT - 分享内容视频数据 */ export type IPushType = 'ALL' | 'CONTENT' | 'REMOTE'; /** * 推流类型 * * @param CONTENT CONTENT - 创建发送共享内容管道 * @param PIPE PIPE - 创建推送管道 * @param VIDEO VIDEO - 创建发送视频管道 * @param AUDIO AUDIO - 创建发送音频管道 * @param VIDEO_AUDIO VIDEO_AUDIO - 创建音频/视频发送管道 * @param VIDEO_AUDIO_PIPE VIDEO_AUDIO_PIPE - 创建音频/视频/仅接收内容管道 */ export declare enum PushType { 'CONTENT' = "CONTENT", 'PIPE' = "PIPE", 'VIDEO' = "VIDEO", 'AUDIO' = "AUDIO", 'VIDEO_AUDIO' = "VIDEO_AUDIO", 'VIDEO_AUDIO_PIPE' = "VIDEO_AUDIO_PIPE" } /** * 分享Content内容的状态 * * @param INIT - 未开始 * @param CAPTURE - 采集中 * @param PENDING - 等待信令状态 * @param STARTING - 分享中 * @param SWITCHING - 切换新的分享中 * @param PAUSE - 暂停中 * @param ENDED - 已结束 */ export declare enum ShareContentStatus { 'INIT' = "INIT", 'CAPTURE' = "CAPTURE", 'PENDING' = "PENDING", 'STARTING' = "STARTING", 'SWITCHING' = "SWITCHING", 'PAUSE' = "PAUSE", 'ENDED' = "ENDED" } /** * 客户端状态 * * @param NONE 正常 * @param PUBLISH_ERROR 推流异常 * @param WS_CLOSE wss链接关闭 * @param WS_ERROR wss链接错误 */ export type IClientErrorState = 'NONE' | 'PUBLISH_ERROR' | 'WS_CLOSE' | 'WS_ERROR'; /** * 视频状态 * * @param muteVideo 关闭摄像头 * @param unmuteVideo:开启摄像头 */ export type IVideoType = 'muteVideo' | 'unmuteVideo'; /** * 音频状态 * * @param muteAudio 关闭麦克风 * @param unmuteAudio 开启麦克风 */ export type IAudioType = 'muteAudio' | 'unmuteAudio'; /** * 视频/音频状态 * * @param muteAudio 关闭麦克风 * @param unmuteAudio 开启麦克风 * @param muteVideo 关闭摄像头 * @param unmuteVideo:开启摄像头 */ export type IVideoAudioType = 'muteAudio' | 'muteVideo' | 'unmuteAudio' | 'unmuteVideo'; /** * 视频/音频操作状态 * * @param MUTE_AUDIO: muteAudio - 关闭麦克风 * @param UNMUTE_AUDIO: unmuteAudio - 开启麦克风 * @param MUTE_VIDEO: muteVideo - 关闭摄像头 * @param UNMUTE_VIDEO: unmuteVideo - 开启摄像头 */ export declare enum OperateType { MUTE_AUDIO = "muteAudio", UNMUTE_AUDIO = "unmuteAudio", MUTE_VIDEO = "muteVideo", UNMUTE_VIDEO = "unmuteVideo" } /** * 画面内容类型 * * @param 0 People画面 * @param 1 Content共享内容 */ export type IMediagroupid = 0 | 1; export type IVideoAudioMessageType = 'AUDIO_MUTE' | 'VIDEO_MUTE' | 'AUDIO_UN_MUTE' | 'VIDEO_UN_MUTE'; /** * 分享content类型 * * @param NONE 无 * @param AUDIO 只分享audio * @param VIDEO 只分享video * @param BOTH 分享video + audio */ export declare enum ContentMode { 'NONE' = "NONE", 'AUDIO' = "AUDIO", 'VIDEO' = "VIDEO", 'BOTH' = "BOTH" } /** * 媒体轮询多画面状态 * * @param 0 开始 * @param 1 停止 * @param 2 暂停 * @param 3 恢复 */ export type TCommand = 0 | 1 | 2 | 3; /** * 是否禁止收听 * * @param keep - 保持上次的状态 * @param on - 禁止收听 * @param off - 取消禁止收听 */ export type IMuteSpeaker = 'keep' | 'on' | 'off'; /** * 全局会议状态 * * @param UNKNOWN - 初始状态 * @param CONNECTING - 连接中状态 * @param ENDED - 结束状态 * @param CONNECTED - 连接成功状态 */ export declare enum MeetingState { UNKNOWN = "UNKNOWN", CONNECTING = "CONNECTING", ENDED = "ENDED", CONNECTED = "CONNECTED" } /** * 画面布局模式 * * @param AUTO - 自动布局,按照宫格/演讲者布局模式返回画面数据 * @param CUSTOM - 自定义布局,上报基础数据,业务自行处理参会者请流,位置和尺寸计算 */ export declare enum LayoutMode { AUTO = "AUTO", CUSTOM = "CUSTOM" } /** * 录制状态 * * @param RECORD_STATE_IDLE - 停止录制成功 * @param RECORD_STATE_STARTING - 开启录制 * @param RECORD_STATE_STARTED - 开启录制成功 * @param RECORD_STATE_STOPING - 停止录制进行中 */ export declare enum RecordingState { RECORD_STATE_IDLE = "RECORD_STATE_IDLE", RECORD_STATE_STARTING = "RECORD_STATE_STARTING", RECORD_STATE_STARTED = "RECORD_STATE_STARTED", RECORD_STATE_STOPING = "RECORD_STATE_STOPING" } /** * 录制状态 * * @param NONE 0 - 未开启录制 * @param LOCAL_START 1 - 本地开启录制 * @param REMOTE_STAR 2 - 远端开启录制 * @param REMOTE_PAUSED 3 - 远端录制暂停中 */ export declare enum RecordStatus { NONE = 0, LOCAL_START = 1, REMOTE_STAR = 2, REMOTE_PAUSED = 3 } /** * 摄像头方向 * * @param FRONT - 前置摄像头 * @param BACK - 后置摄像头 */ export declare enum FacingMode { FRONT = "FRONT", BACK = "BACK" } /** * 更多画面流的最大数量 * * @property { number } NINE - 9路画面流 * @property { number } EIGHTEEN - 18路画面流 * @property { number } THIRTY_TWO - 32路画面流 * @property { number } FORTY_NINE - 49路画面流 * @property { number } SIXTY_FOUR - 64路画面流 * @property { number } EIGHTY_ONE - 81路画面流 * @property { number } ONE_HUNDRED - 100路画面流 */ export declare enum XYMoreStreamsMaxCount { NINE = 9, EIGHTEEN = 18, THIRTY_TWO = 32, FORTY_NINE = 49, SIXTY_FOUR = 64, EIGHTY_ONE = 81, ONE_HUNDRED = 100 } /** * 摄像头方向 * * @property 'FRONT' - 前置摄像头 * @property 'BACK' - 后置摄像头 */ export type IFacingMode = keyof typeof FacingMode; /** * 布局容器节点和偏移量 * * @property { string } elementId - 可选,容器节点,布局需要包裹在此容器节点元素里面显示,并使用此元素的信息计算布局的尺寸和位置 * @property { number[] } offset - 可选,自动布局容器偏移量, [上 下 左 右],单位:px */ export interface XYClientContainer { elementId?: string; offset?: number[]; } /** * 客户端平台 * * @property { boolean } isElectron - 是否是Electron端 */ export interface XYClientPlatform { isElectron: boolean; } /** * client配置参数 * * @property { string } clientId - 必填,网关校验id * @property { string } clientSecret - 必填,网关密钥 * @property { string } extId - 必填,企业ID * @property { string } server - 可选,服务器地址, IP/域名 + 端口(可选),如: cloudapi.xylink.com:443 * @property { LayoutMode } layout - 可选,布局模式,默认值是:AUTO * @property { XYClientContainer } container - 可选,配置布局容器节点和偏移量 * @property { boolean } isSupportHybridCloud - 可选,标识是否是混合云环境,默认值是false,代表不是混合云环境 * @property { boolean } debug - 可选,是否接收所有参会者音视频状态数据,默认值是false,代表关闭调试模式 * @property { boolean } checkSSL - 可选,是否需要检测SSL,默认值是true,代表启用检测SSL协议 * @property { any[] } plugin - 可选,注册AI视频流插件,支持管道流方式多次接入 * @property { IRecallConfig } reCall - 可选,重呼配置 * @property { string? } customizedKey - 可选, 定制化参数 * @property { XYClientPlatform } platform - 可选,标识客户端平台 */ export interface IClientConfig { clientId: string; clientSecret: string; extId: string; server?: string; layout?: LayoutMode; container?: XYClientContainer; isSupportHybridCloud?: boolean; debug?: boolean; checkSSL?: boolean; plugin?: any[]; reCall?: IRecallConfig; customizedKey?: string; platform?: XYClientPlatform; } /** * 重呼配置 * * @property { number } interval - 重呼间隔时间,单位:毫秒,默认 5000 ms * @property { number } maxCount - 重呼最大次数,默认 3 * @property { number } wssMaxCount - wss最大重连次数,默认 5 */ export interface IRecallConfig { interval?: number; maxCount?: number; wssMaxCount?: number; } export interface ILayoutParams { rosters: IRoster[]; speakerInfo: ISpeakerInfo; layout: ILayout[]; templateMode: TemplateMode | ContentTemplateMode; invite: IInvite; contentSenderPid: number; localHide: boolean; } /** * 本地麦克风或摄像头实时状态 * * @param { OperateType } status - 设备状态 */ export interface XYMeetingDeviceStatus { status: OperateType; } /** * @enum 默认常量列表 */ export interface IDefault { CLIENT_TYPE: string; MOBILE_CLIENT_TYPE: string; INIT_INTERNALS: IInternals; RESOLUTION: number; ROSTER: IRoster; SELF_MOCK_PID: number; HOR_CONTAINER_RATIO: number; VER_CONTAINER_RATIO: number; RATIO_MAP: { [id: number]: number; }; MAP_RESOLUTION_INDEX: { [resolution: string]: StreamResolutionLevel; }; RESOLUTION_MAP: { [index: number]: number; }; VIDE_BANDWIDTH_BIT: number; VIDE_FRAMERATE_BIT: number; LOGIN_INFO: { callUri: string; securityKey: string; id: number; displayName: string; token: IToken; }; LAYOUT: ILayout; MAP_RESOLUTION_STRING: { [resolution: string]: { width: number; height: number; }; }; CONF_INFO: IConfInfo; CLOUD_ROOOM_INFO: ICloudRoomConfig; CONFERENCE_INFO: IConferenceInfo; } /** * SDK登录用户信息 * * @property { string? } callUri - 用户类型ID * @property { string } securityKey - 安全码 * @property { IToken } token - Token * @property { number } id - 用户ID * @property { string } displayName - 登录用户名 * @property { string } cellPhone - 呼叫号码 * @property { string } extUserId - 第三方用户ID * @property { string } enterpriseId - 企业ID * @property { string } profilePicture - 账号头像 * @property { boolean } initPassword - 是否初始化密码 * @property { XYAccountConfig } accountConfig - 账号配置 */ export interface ILoginInfo { callUri?: string; securityKey: string; token: IToken; id: number; displayName?: string; cellPhone?: string; extUserId?: string; enterpriseId?: string; profilePicture?: string; initPassword?: boolean; accountConfig?: XYAccountConfig; } export interface ICodeList { version: string; zh_CN: { [key: string]: string; }; zh_TW: { [key: string]: string; }; en_US: { [key: string]: string; }; } export type OPERATE_MAP_VALUE = { type: IVideoAudioMessageType; reportEventType: string; enabled: boolean; }; export type IOPERATE_MAP = { [key in OperateType]: OPERATE_MAP_VALUE; }; /** * 配置画面数据 * * @property { string } calluri - 必填,默认给""值,设备URI字段​​​​,如果未指定则按照优先级自动填充画面 * @property { StreamResolutionLevel } resolution - 必填,指定画面分辨率 * @property { VideoQuality } quality - 必填,指定视频质量,建议people画面使用0或者1,content画面使用2 * @property { number } mediagroupid - 必填,指定设备的类型,可选:0|1,0代表people画面,1代表content共享画面 * @property { string } avcLayout - 可选,AVC布局信息,用于多画面/轮询AVC请流,默认情况不需要填写此内容 */ export type IReqInfo = { calluri: string; resolution: StreamResolutionLevel; quality: VideoQuality; mediagroupid: number; avcLayout?: string; }; /** * 会议相关信息, 用于接口请求参数 * * @property { string } meetingId - 会议ID * @property { string } callUri - 会议号 * @property { string } callNumber - 会议号 * @property { string } remoteUri - 会议号 */ export interface IMeetingInfo { meetingId: string; callUri: string; callNumber: string; remoteUri: string; } /** * 调度uri列表项目 * * @property { string } uri - 设备calluri * @property { string } status - 状态 * @property { string } message - 消息 */ export interface IFailUriItem { uri: string; status: string; message: string; } /** * 调度画面结果数据 */ export interface IMonitorReportMessage { callIndex: number; callerUri: string; code: string; monitorInfo: IMonitorReport; type: 'MONITOR_STATE_REPORT'; } /** * 调度成功和失败的设备列表数据 * * @param { IFailUriItem[] } uriList - 调度成功的设备列表 * @param { IFailUriItem[] } failUriList - 调度失败的设备列表 */ export interface IMonitorReport { uriList: IFailUriItem[]; failUriList: IFailUriItem[]; } /** * 调度事件结果数据 * * @param { IMonitorReport } monitorInfo - 调度结果数据 */ export interface XYMonitorEvent { monitorInfo: IMonitorReport; } /** * 出入会通知 * * @property { string } e 呼叫者的callerUri * @property { string } a 呼叫者的userId * @property { string } c 呼叫者的displayName * @property { 'in' | 'out' } t 呼叫者的动作:退会/入会 */ export interface IOriginalReminder { e: string; a: string; c: string; t: 'in' | 'out'; } /** * 对外出入会通知消息 * * @property { string } displayName - 参会者名称 * @property { 'in' | 'out' } action - 参会者动作,可选:'in' | 'out',in代表加入会议,out代表离开会议 * @property { string } userId - 参会者userId */ export interface IReminder { displayName: string; action: 'in' | 'out'; userId?: string; } export interface IMediaSupportedConstraints { audio?: MediaTrackConstraints | false; video?: MediaTrackConstraints | false; } export interface ICandidate extends RTCIceCandidateInit { type?: string; } export interface IHttpConfig { baseUrl: string; } /** * 用户在非登录时,配置登录用户信息 * * 此信息是由业务层提供网关配置 */ export interface LoginTokenInfo extends IToken, Partial { } /** * 呼叫号码的云会议室属性配置 * * @property { WatermarkStatus } watermark - 是否开启水印 * @property { WatermarkRange } watermarkRange - 水印配置范围,无值,则默认共享内容叠加水印 * @property { string } displayConfNo - 显示的会议号 * @property { string } inoutReminder - 是否设置了出入会提醒 * @property { string } shareChatContentPermission - 聊天内容分享权限配置 * @property { string } watermarkContent 共享时叠加水印内容 */ export interface IConfAuxProperties { watermark?: WatermarkStatus; watermarkRange?: WatermarkRange; displayConfNo?: string; inoutReminder?: string; shareChatContentPermission?: string; watermarkContent?: string; } /** * 会控相关信息 * * @param { boolean } isHost - 是否是主持人 * @param { boolean } noCtrPwd - 是否无会控密码 * @param { boolean } isBigConf - 是否是分级会议 */ export interface XYMeetingControl { isHost?: boolean; isBigConf?: boolean; noCtrPwd?: boolean; } /** * 会议号信息 * * @property { string } callNumber - 最终进入的真实会议号 * @property { string } callUrl - 呼叫号码真实url * @property { string } deviceId - 号码id * @property { string } deviceType - 号码类型 * @property { string } displayName - 云会议号名称 * @property { string } number - 呼叫的号码 * @property { string } numberType - 会议号类型 * @property { IConfAuxProperties } confAuxProperties - 会议配置 * @property { string } avatar - 头像 * @property { InviteInfo } inviteInfo - 会议分享信息,包含会议邀请链接、电话,WebRTC、终端等端的入会方式; * @property { string } meetingId - 当前会议ID * @property { string } config - 会议室配置 * @property { string } displayConfig - 可见性配置 * @property { string } mpvc - 点对点和多点的临时会议室号(多点是几个终端呼起来的,没有真正的会议室号),有些场景会控需要。 * @property { XYMeetingControl } meetingControl - 会控信息 */ export interface IConferenceInfo extends XYConferencePropertiesMessage { callNumber?: string; callUrl?: string; deviceId?: string; deviceType?: string; displayName?: string; number?: string; numberType?: string; confAuxProperties?: IConfAuxProperties; avatar?: string; inviteInfo?: InviteInfo; meetingId?: string; displayNum?: string; config?: IConferenceConfig; displayConfig?: IConferenceDisplayConfig; mpvc?: string; meetingControl?: XYMeetingControl; } /** * 会议室配置 * * @param { boolean } displayConfNo - 是否显示会议号 * @param { string } subtitle - 是否显示字幕 'true' | 'false' */ export interface IConferenceConfig { displayConfNo?: boolean; subtitle?: string; } /** * 会议室可见性配置 * * @param { boolean } subtitle - 是否显示字幕 */ export interface IConferenceDisplayConfig { subtitle?: boolean; } /** * 会议邀请信息 * * @property { string } displayName - 会议室名称 * @property { boolean } inEnterprise - 所属会议号是否在企业中 * @property { string } inviteAppUrl - 微信邀请链接 * @property { string } inviteUrl - 云会议室邀请链接 * @property { string } invokSchema - 小鱼客户端Scheme获取地址 * @property { string } linkNumber - 电话入会号码 * @property { string } mobileWebrtcVisibleSetting - 移动端是否显示WebRTC入会 * @property { string } number - 会议号 * @property { string } password - 入会密码 * @property { string } pstnNumber - 电话呼叫号码 * @property { string } shareUrl - 邀请链接详情页地址 * @property { string } userAvatar - 管理员头像 * @property { string } userName - 管理员名称 * @property { string } userProfileId - 用户ID * @property { string } voiceNumber - 电话呼叫时的会议号 * @property { string } webrtcSetting - PC端是否显示WebRTC入会 * @property { string } webrtcUrl - WebRTC入会地址 * */ export interface InviteInfo { displayName: string; inEnterprise: boolean; inviteAppUrl: string; inviteUrl: string; invokSchema: string; linkNumber: string; mobileWebrtcVisibleSetting: boolean; number: string; password: string; pstnNumber: string; shareUrl: string; userAvatar: string; userName: string; userProfileId: string; voiceNumber: string; webrtcSetting: boolean; webrtcUrl: string; } /** * 加入会议配置参数 * * @property { string } confNumber - 必填,云会议号/终端号/手机号 * @property { string? } password - 可选,入会密码,没有则为空 * @property { string? } displayName - 可选,入会昵称,默认使用登录账号的用户名 * @property { boolean } muteAudio - 可选,是否开启/关闭麦克风入会,默认值是false,开启麦克风 * @property { boolean } muteVideo - 可选,是否开启/关闭摄像头入会,默认值是false,开启摄像头 * @property { number | string } __hideId - 可选,是否是隐身入会模式,默认值是空值,代表正常非隐身模式,需要开通权限后才能使用隐身模式 * @property { string } __monitorMode - 可选,是否是巡课模式,默认值是空字符,MONITOR代表巡课模式 */ export interface IMakeCall { confNumber: string; password?: string; displayName?: string; muteAudio?: boolean; muteVideo?: boolean; __hideId?: number | string; __monitorMode?: string; } /** * 呼叫的会议信息 * * @extends IMakeCall * @property { IConferenceInfo } meeting 会议号信息 */ export interface ICall extends IMakeCall { meeting?: IConferenceInfo; } /** * 入会成功之后的会议信息 * * @property { string } callerUri 呼叫者calluri * @property { number } callIndex 会议消息索引值 * @property { string } automute 是否是自动mute * @property { string } meetingId 会议hash id * @property { string } vcNumber 最终的会议号 * @property { "true" | "false" } inoutReminder 是否设置了出入会提醒 * @property { string } commonJson 其他会议室配置 * @property { string } remoteUri 云会议室URI */ export interface IInvite { callerUri: string; callIndex: number; automute: string; meetingId: string; vcNumber?: string; inoutReminder?: 'true' | 'false'; commonJson?: string; remoteUri?: string; } /** * 分组会议信息 * * @property { boolean } groupLeader - 是否设置本终端为管理员 true:设置, false:取消 * @property { string } groupName - 此名称显示至用户界面 * @property { number } groupType - 是否进入讨论组 1:进入,0:退出 */ export interface IGroupInfo { groupLeader: boolean; groupName: string; groupType: number; } /** * 会议模式 * * @param DIALOG - 对话模式 * @param NORMAL - 非对话模式 */ export declare enum ConferenceMode { DIALOG = "dialog", NORMAL = "normal" } /** * 会控回调信息 * * @property { number } callIndex - 会议消息索引值 * @property { string } callerUri - 呼叫者calluri * @property { string } chairmanUri - 主会场calluri * @property { boolean } contentIsDisabled - 是否禁用分享content * @property { boolean } disableMute - 是否强制静音 * @property { string } muteOperation - 音频状态 * @property { string } role - 未知 * @property { string } type - 未知 * @property { string } commonJson - 会控修改名称等 * @property { IMuteSpeaker } isMuteSpeaker - 禁止收听 * @property { boolean } recordIsDisabled - 录制权限 * @property { IGroupInfo[] } groupInfoList - 分组会议信息 * @property { ConferenceMode } conferenceMode - 会议模式 * @property { string } customizedLayout - 轮询多画面控制Json字符串 * @property { boolean } whiteboardIsDisabled - 白板权限 * @property { boolean } annotationIsDisabled - 批注权限 */ export interface IMeetingControl { callIndex: number; callUri: string; chairmanUri: string; contentIsDisabled: boolean; disableMute: boolean; muteOperation: string; role: string; type: string; commonJson: string; isMuteSpeaker: IMuteSpeaker; recordIsDisabled: boolean; groupInfoList: IGroupInfo[]; conferenceMode: ConferenceMode; customizedLayout: string; whiteboardIsDisabled?: boolean; annotationIsDisabled?: boolean; } /** * 会议变动消息 * * @property { number } participantCount - 当前会议参会者总人数,不包含共享内容设备数量,包含local * @property { number } totalEpCount - 当前会议参会者总人数,包含共享内容、指挥调度客户端等设备数量, 包含local * @property { string } chairManUrl - 当前主画面设备的callUrl,没有为'' * @property { string } contentUri - 当前会议共享内容设别的callUrl,没有为'' * @property { string } actSpkUri - 当前会议语音激励者的callUrl,没有为'' * @property { IMediaGroupInfo[] } mediaGroupInfo - 多分组通人数信息,默认上报0和1分组,分别代表People通道和Content通道 * @property { ChairManReason } ChairManReason - 主画面对应的模式,默认是主会场模式 * @property { number } onHoldCount - 等候室人数 * @property { number } audioTxUnMuteEpCount - 未静音人数 * @property { number } videoTxUnMuteEpCount - 未关闭摄像头人数 */ export interface IConfInfo { participantCount: number; totalEpCount: number; chairManUrl: string; contentUri: string; actSpkUri: string; mediaGroupInfo: IMediaGroupInfo[]; onHoldCount?: number; audioTxUnMuteEpCount?: number; videoTxUnMuteEpCount?: number; chairManReason: ChairManReason; } /** * 缓存Conf Change消息 */ export interface IPreConfInfo extends IConfInfo { isChairmanMode?: boolean; } /** * 多分组通道数据 * * @param { number } endpointCount - 多分组通道人数 * @param { number } mediagroupid - 多分组通道ID */ export interface IMediaGroupInfo { endpointCount: number; mediagroupid: number; } /** * 自动布局,分页数据 * * @property { number } pageSize - 每页显示多少人,最多可配置9画面 * @property { number } currentPage - 当前页码 * @property { number } totalPage - 总页数 */ export interface IPageInfo { pageSize: number; currentPage: number; totalPage: number; } /** * 语音激励消息 * * @property { string } endpointId - 语音激励者的callUrl信息,类似:"xxx@BRUCE" * @property { number } pid - 语音激励者的用户id */ export interface ISpeakerInfo { endpointId: string; pid: number; } /** * Local布局对象 * * @implements ILayout * @property { boolean } isLocal 是否是当前设备 */ export interface ILocalLayout extends ILayout { isLocal: true; } /** * 自动布局模式下,Layout Container的容器信息 * 计算得到的宽高能给铺满当前参会者的布局 * * @property { number } width - 减掉偏移左右值的Container容器宽 * @property { number } height - 减掉偏移上下值的Container容器高 * @property { number } rateWidth - 基于width配合 Layout Rate 计算得到的Layout Container容器宽 * @property { number } rateHeight - 基于height配合 Layout Rate 计算得到的Layout Container容器高 */ export interface IScreenInfo { width: number; height: number; rateWidth: number; rateHeight: number; } /** * 自定义布局请流对象数据 * * @property { number } pid - 用户id,从roster中获取 * @property { StreamResolutionLevel } resolution - 当前请求画面分辨率 * @value 0 90P * @value 1 180P * @value 2 360P * @value 3 720P * @value 4 1080P * @property { VideoQuality } quality - 画面质量 * @value 0 100 * @value 1 200 * @value 3 300 * @property { number } mediagroupid - 当前流的类型:people/content * @param 0 people * @param 1 content */ export interface ICustomLayout { pid: number; resolution: StreamResolutionLevel; quality: VideoQuality; mediagroupid: number; } /** * 封装MediaStream */ export interface ICustomMediaStream { streams: MediaStream[]; track: MediaStreamTrack; } /** * 自定义Track轨道对象 * * @property { string } status - Track的类型,local或者remote * @property { RTCTrackEvent } data - MediaStreamTrack数据 * @property { IRest } rest - 从data中获取streamId、trackId和track数据,方便后续使用 * @property { string } rest.streamId - MediaStream id * @property { string } rest.trackId - MediaStreamTrack id * @property { MediaStreamTrack } rest.track - MediaStreamTrack */ export interface ICustomStreamTrack { status: string; data: RTCTrackEvent | ICustomMediaStream; rest: { streamId: string; trackId: string; track: MediaStreamTrack; }; } /** * 通话字幕-本地支持的语言 */ export type TLocalLanguage = (typeof SupportLocalLanguages)[number]; export interface IOutputCustomLayout { [pid: string]: { resolution: number; quality: number; }; } /** * 巡课云会议室 * * @property { string } callUrl - 云会议室callUri * @property { number } conferenceNumberType - 云会议室类型 * @property { string } deviceId - 设备ID * @property { string } displayName - 云会议室名称 * @property { string } number - 云会议室号 */ export interface IConference { callUrl: string; conferenceNumberType: number; deviceId: string; displayName: string; number: string; } /** * 参会者信息 * * @property { 0 | 1 } bulkRosterType - 全量roster类型,0表示全量数据,1表示增量数据 * @property { IRoster[] } addRosterInfo - 新增的roster信息 当bulkRosterType是0的时候,此参数表示全量数据 * @property { IRoster[] } changeRosterInfo - 变化的roster信息 * @property { { participantId: number }[] } deleteRosterInfo - 被删除的roster信息 */ export interface IBulkRoster { bulkRosterType: 0 | 1; addRosterInfo: IRoster[]; changeRosterInfo: IRoster[]; deleteRosterInfo: { participantId: number; }[]; } /** * conf 会议属性 * * @property { 'contentOnhold' } type - 类型 * @property { string } audioTrackId - content audio track id * @property { string } contentUrl - content uri */ export interface IConfProperty { type: 'contentOnhold'; audioTrackId?: string; contentUrl?: string; } /** * track 信息 * * @property { string } streamId - stream id * @property { MediaStreamTrack } track - 媒体流Track轨道 * @property { string } trackId - track id */ export interface ITrackInfo { streamId: string; track: MediaStreamTrack; trackId: string; } /** * ws close reason */ export type TErrorReason

= P & { code?: number; }; /** * 录制相关信息 * * @property { string } recordSessionId - sessionId */ export interface IRecordInfo { recordSessionId: string; } /** * 本地录制结果上报 * * @property { string } reason - 成功STATE:200 * @property { RecordingState } state - 录制状态 * @property { IRecordInfo } recordInfo - 录制相关信息 * @property { boolean } isRecorded - 忽略 * @property { string } controlUri - 忽略 * @property { string } reasonText - 忽略 */ export interface IRecordingStateChanged { reason: string; state: RecordingState; recordInfo: IRecordInfo; isRecorded: boolean; controlUri: string; reasonText: string; } /** * 远端录制状态上报 * * @property { boolean } isStart - 是否已经存在录制 true:存在录制;false:不存在录制 * @property { string } uri - 录制的displayName,即callUri的名称,当是" "时,取会议室名称 * @property { string } callUri - 录制终端callUri * @property { string } callerUri - ignore * @property { string } status - 录制状态 RECORDING_STATE_PAUSED(录制暂停),RECORDING_STATE_ACTING(录制恢复) * @property { boolean } isLocal - 是否是local开启的录制 * @property { IRecordInfo } recordInfo - 录制相关信息 */ export interface IRecordStatusNotification { isStart: boolean; uri: string; callUri: string; callerUri: string; status: string; isLocal: boolean; recordInfo: IRecordInfo; } /** * 录制权限 * * @property { boolean } authorize - 权限 * @property { string } recordingUrl - 云会议室URI * @property { string? } developerMessage - 云会议室的所属用户名称 * @property { number? } errorCode - 错误码 * @property { string? } userMessage - 错误信息 */ export interface IRecordPermission { authorize: boolean; recordingUrl: string; developerMessage?: string; errorCode?: number; userMessage?: string; } /** * 通话字幕内容 * * @property { number } pid - 当前说话的终端 * @property { string } src - 原文 * @property { string } target - 译文 * @property { number } seTime - 发送时间 * @property { number } startTime - 开始时间 * @property { number } endTime - 结束时间 * @property { boolean } isEnd - 一句话是否结束 * @property { boolean } isActive - 活跃标志,收三路,同时只有一路active * @property { string } url - 终端calluri * @property { string } dn - 显示名称 * @property { string } meetingId - 会议号 * @property { string } srcLang - 原语言,zh表示中文,en表示英文 * @property { string } targetLang - 译文语言,zh表示中文,en表示英文 */ export interface ITranslationContent { pid: number; src: string; target: string; seTime: number; startTime: number; endTime: number; isEnd: boolean; isActive: boolean; url: string; dn: string; meetingId: string; srcLang: string; targetLang: string; } /** * 用户自定义消息 * * @property { number } toPid - 消息的接收方pid,0表示广播消息、非0表示单点消息; * @property { string } data - 消息内容,可以被JSON序列化的字符串;因业务数据可能会传输图片,需要进行base64编码,消息最大长度限制:1MB */ export interface ICustomMessageConfig { toPid: number; data: string; } /** * 接收到自定义消息 * * @property { string } type - 消息Type,0表示广播消息、非0表示单点消息 * @property { number } fromPid - 消息的发送方pid * @property { number } toPid - 消息的接收方pid * @property { string } data - 消息内容,可以被JSON序列化的字符串 */ export interface IReceiveCustomMessage { type: string; fromPid: number; toPid: number; data: string; } /** * SDK功能控制开关,是否启用某些功能的运行 * 默认配置:src/enum/index.ts DEFAULT_FEATURE_CONFIG * * @property { boolean } enableMeetingShout - 是否启用会控喊话场景,会控喊话场景需要指定mediaGroupId分组通道信息才可以正常接收远端声音 * @property { boolean } enableV2States - 是否启用小鱼数据上报功能,默认启用,设置为true * @property { boolean } enableCheckRecordPermission - 是否启用录制权限查询功能,默认不启用,设置为false * @property { boolean } enableBandwidthSetting - 是否启用管理平台带宽控制(双向),是否可以请1080P的视频流,默认不启用,设置为false * @property { boolean } enableMeetingInvite - 是否启用查询小鱼会议邀请链接信息,默认不启用,设置为false * @property { boolean } enableMeetingOwner - 是否启用查询会议Owner信息,默认不启用,设置为false * @property { boolean } enableAutoResizeLayout - 是否启用自动布局下,当屏幕大小变化后计算最新的Layout数据,默认启用,设置为true * @property { boolean } enableLowResolution - 是否启用低性能模式,降低发送和接收端的分辨率和质量,默认不启用,设置为false * @property { boolean } enableSpeakerInfo - 是否启用推送实时讲话人信息,每秒2条消息推送,默认不启用,设置为false * @property { boolean } enableLayoutAvatar - 是否启用获取参会者头像,默认不启用,设置为false * @property { boolean } enableMobileNotAuth - 移动端是否支持无授权入会, 默认设置为false * @property { boolean } enableWatermarkContent - 是否启用获取content水印内容, 默认启用, 设置为true * @property { boolean } enableHideLocalView - 是否启用隐藏本地画面模式,默认不启用,设置为false * @property { boolean } enableAudioPCM - 是否启用音频PCM,默认不启用,设置为false * @property { boolean } enableReCall - 是否支持重新呼叫, 默认启用, 设置为true * @property { boolean } enableMoreStreams - 是否支持更多画面流,默认不启用,设置为false,后续仅配置moreStreamsMaxCount即可;如配置为true,则自动转为18路画面流 * @property { boolean } moreStreamsMaxCount - 配置更多画面流的最大数量,默认是9,支持9/18/32路画面流,如配置为其他枚举/数值,则自动转为9画面 */ export interface IFeatureConfig { enableMeetingShout?: boolean; enableV2States?: boolean; enableCheckRecordPermission?: boolean; enableBandwidthSetting?: boolean; enableMeetingInvite?: boolean; enableMeetingOwner?: boolean; enableAutoResizeLayout?: boolean; enableLowResolution?: boolean; enableSpeakerInfo?: boolean; enableLayoutAvatar?: boolean; enableMobileNotAuth?: boolean; enableWatermarkContent?: boolean; enableHideLocalView?: boolean; enableAudioPCM?: boolean; enableReCall?: boolean; enableMoreStreams?: boolean; moreStreamsMaxCount?: XYMoreStreamsMaxCount; } /** * SDK功能控制开关的key */ export type IFeatureConfigKey = keyof IFeatureConfig; /** * SDK功能控制开关的key List */ export type IFeatureConfigKeys = Array; /** * SDK功能控制开关的Value */ export type IFeatureConfigValue = IFeatureConfig[K]; export interface IConfMgmtUrl { pc: string; member: string; side: string; mobile: string; professional: string; } /** * 上报会控控制开启/关闭摄像头结果 * * @property { boolean } agree - 是否同意开启/关闭摄像头 * no.camera.permission:终端未授权App摄像头权限 * reject.unmute.video:参会人拒绝开启摄像头 * voice.mode:终端在语音模式 * driving.mode:终端在驾驶模式 * '':同意为空即可 * @property { string } reason - 操作解释 * @property { string } requestId - 终端收到的muteVideoQuery/unMuteVideoQuery消息中的requestId */ export interface IVideoControlResult { agree: boolean; reason: string; requestId: string; } /** * 信令下发会控开关摄像头消息内容 * * @property { string } body - 消息体,JSON字符串需要解析 * @property { number } callIndex - 消息索引值 * @property { string } callerUri - caller uri * @property { string } type - 消息类型 */ export interface IEPMessage { body: string; callIndex: number; callerUri: string; type: string; } /** * 会控开启/关闭摄像头消息、Toast提示消息 */ export type IMCVideoEvent = XYControlVideoQuery | XYUnMuteVideoQueryToast; /** * 会控开关摄像头三个事件类型 * @param unMuteVideoQuery - 会控请求打开摄像头 * @param muteVideoQuery - 会控请求关闭摄像头 * @param toast - 主持会议的客户端收到的成功和失败提醒 */ export type XYVideoQueryType = 'unMuteVideoQuery' | 'muteVideoQuery' | 'toast'; /** * 会控开关摄像头事件基础消息体 * * @property { string } confUri - 会议号 * @property { string } encryption - 加密信息 * @property { boolean } force - 是否强制开启摄像头 * @property { string } meetingId - 会议ID * @property { string } requestId - 事件ID * @property { string } uri - 事件接收侧用户ID * */ export interface XYVideoQueryBase { confUri: string; encryption: string; force: boolean; meetingId: string; requestId: string; uri: string; } /** * 主持端得到远端开启摄像头结果的提示消息体 * * @property { string } message - 消息体,需要解析,详细内容如下: * no.camera.permission: 终端未授权App摄像头权限 * reject.unmute.video: 参会人拒绝开启摄像头 * voice.mode: 终端在语音模式 * driving.mode: 终端在驾驶模式 * unmute.video.timeout: 超时 * @property { string } di - 终端的deviceUri * @property { string } dn - 终端的名称 */ export interface XYUnMuteVideoQueryToastValue extends XYVideoQueryBase { message: string; di: string; dn: string; } /** * 会控推送开启/关闭摄像头消息体 * * @property { XYVideoQueryType } key - 消息key,值为:'unMuteVideoQuery' | 'muteVideoQuery' * @property { XYVideoQueryBase } value - 消息详细内容 * */ export interface XYControlVideoQuery { key: XYVideoQueryType; value: XYVideoQueryBase; } /** * 主持会议端收到远端开启摄像头结果的提示消息体 * * @property { string } key - 消息key,值为:toast * @property { XYUnMuteVideoQueryToastValue } value - 消息详细内容 */ export interface XYUnMuteVideoQueryToast { key: XYVideoQueryType; value: XYUnMuteVideoQueryToastValue; } /** * 讲话者信息 * * @property { string } alias - 别名ID * @property { string } name - 讲话者名称 * @property { number } pid - 用户ID * @property { string } endpointId - 用户标识ID * @property { string } trackId - 媒体网关分配的轨道ID(对应的是将-ad-转化为-st-之后的stream数据) * @property { boolean } isLocal - 是否是Local设备 * @property { number } level - 音量等级 * @property { string } id - 参会者Roster ID,通过roster数据获取 */ export interface SpeakersInfoItem { alias: string; name: string; pid: number; id: string; endpointId?: string; trackId?: string; isLocal?: boolean; level?: number; } /** * 实时讲话人消息体 * * @property { speakersInfoObj[] } speakersInfo - 讲话者信息 */ export interface XYSpeakersInfo { speakersInfo: SpeakersInfoItem[]; } /** * 等候室状态 * * @property { number } waitingState 等候室状态 0: 未在等候室; 1:在等候室 * @property { string } automute 是否静音 */ export interface IWaitingState { waitingState: number; automute: string; } /** * 通知媒体网关:流能力集配置 */ export interface IStreamCapability { streamId: string; resolution: StreamResolutionLevel; } /** * 焦点画面动作 * * @param START - 指定焦点画面 * @param STOP - 取消焦点画面 */ export declare enum FocusViewAction { START = "start", STOP = "stop" } /** * 上报终端状态-事件类型 */ export declare enum StateCategory { STA_CONFSTATUS = "sta-confStatus", OPER_CONFOPERATION = "oper-confOperation", STA_MSGCALLBACK = "sta-msgCallback", OPER_SETTING = "oper-setting" } /** * 上报终端状态-事件名称 */ export declare enum StateEventName { CALL_IN = "callIn", LAYOUT = "layout", CONTENT = "content", AUDIO_MUTE = "audioMute", AUDIO_UNMUTE = "audioUnmute", VIDEO_MUTE = "videoMute", VIDEO_UNMUTE = "videoUnmute", SUBTITLE = "subtitle", COMPLEX_CAPABILITIES = "complexCapabilities", MMS_CAPABILITIES = "mmsCapabilities" } /** * 上报终端状态参数 * * @property { StateCategory } category - 事件类型 * @property { StateEventName } eventName - 事件名称 * @property { Object } params - 事件详细数据 */ export interface IStateParams { category: StateCategory; eventName: StateEventName; params?: Object; } /** * 本地视频渲染参数 * * @property { boolean} isMirror - 是否镜像显示 */ export interface LocalViewParams { isMirror: boolean; } /** * 视频配置 * * @property { StreamResolution } maxResolution - 视频最大分辨率 * @property { StreamFrameRate } maxFrameRate - 视频最大帧率 */ export interface IVideoProfile { maxResolution?: StreamResolution; maxFrameRate?: StreamFrameRate; } /** * 是否接收会议中的远端音频 * * @property { boolean } contentAudioMute - 可选,是否禁止接收共享内容的声音, 默认false * @property { boolean } peopleAudioMute - 可选,是否禁止接收people的声音,默认false */ export interface XYWebRxAudioStatus { contentAudioMute?: boolean; peopleAudioMute?: boolean; } /** * Client相关信息 * * @property { string } clientId - 网关校验 * @property { string } clientSecret - 网关密钥 * @property { string } extId - 企业ID */ export interface ClientInfoConfig { clientId: string; clientSecret: string; extId: string; }