@xylink/xy-rtc-sdk 3.9.11-private.6 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.MD +36 -13
- package/lib/action/index.d.ts +106 -36
- package/lib/enum/analyser.d.ts +7 -0
- package/lib/enum/client.d.ts +8 -2
- package/lib/enum/constraints.d.ts +51 -0
- package/lib/enum/device.d.ts +28 -0
- package/lib/enum/errorCode.d.ts +8 -2
- package/lib/enum/i18n.d.ts +6 -0
- package/lib/enum/index.d.ts +90 -7
- package/lib/enum/meeting.d.ts +4 -0
- package/lib/enum/polling.d.ts +2 -11
- package/lib/feature/customMessage/index.d.ts +29 -0
- package/lib/feature/edu/index.d.ts +34 -0
- package/lib/feature/edu/index.type.d.ts +29 -0
- package/lib/feature/index.d.ts +3 -0
- package/lib/feature/speaker/index.d.ts +81 -0
- package/lib/feature/speaker/index.type.d.ts +17 -0
- package/lib/index.d.ts +84 -31
- package/lib/interface/baseModule.type.d.ts +9 -0
- package/lib/interface/clientInterface.type.d.ts +128 -0
- package/lib/interface/contentTrackInterface.type.d.ts +15 -0
- package/lib/interface/event.type.d.ts +444 -0
- package/lib/interface/videoAudioTrackInterface.type.d.ts +17 -0
- package/lib/main/ability/const.d.ts +5 -0
- package/lib/main/ability/index.d.ts +37 -0
- package/lib/main/{iauth.d.ts → auth/index.d.ts} +34 -26
- package/lib/main/client.d.ts +643 -637
- package/lib/main/clientBase.d.ts +40 -0
- package/lib/main/clientState.d.ts +56 -0
- package/lib/main/device/index.d.ts +272 -0
- package/lib/main/device/index.type.d.ts +204 -0
- package/lib/main/helper/index.d.ts +118 -0
- package/lib/main/helper/index.type.d.ts +12 -0
- package/lib/main/layout/index.d.ts +74 -108
- package/lib/main/layout/index.type.d.ts +282 -0
- package/lib/main/layout/polling.d.ts +17 -13
- package/lib/main/layout/state.d.ts +163 -0
- package/lib/main/layout/template.d.ts +3 -3
- package/lib/main/media/index.d.ts +177 -0
- package/lib/main/media/index.type.d.ts +29 -0
- package/lib/main/meeting/control.d.ts +107 -0
- package/lib/main/meeting/control.type.d.ts +24 -0
- package/lib/main/{meeting.d.ts → meeting/index.d.ts} +58 -28
- package/lib/main/meeting/verify.d.ts +70 -0
- package/lib/main/meeting/verify.type.d.ts +12 -0
- package/lib/main/peer.d.ts +67 -19
- package/lib/main/plugin/index.d.ts +28 -0
- package/lib/{tools/quality.d.ts → main/quality/index.d.ts} +2 -2
- package/lib/{tools → main/quality}/quality.worker.d.ts +1 -1
- package/lib/main/{qualityManager.d.ts → quality/report.d.ts} +11 -5
- package/lib/main/render/index.d.ts +116 -0
- package/lib/main/render/index.type.d.ts +36 -0
- package/lib/main/render/videoManager.d.ts +190 -0
- package/lib/main/render/videoManager.type.d.ts +66 -0
- package/lib/main/roster/index.d.ts +39 -0
- package/lib/main/server/index.d.ts +79 -0
- package/lib/main/server/index.type.d.ts +21 -0
- package/lib/main/signal/index.d.ts +15 -0
- package/lib/main/socket/index.d.ts +95 -0
- package/lib/main/stream/index.d.ts +182 -0
- package/lib/main/track/baseTrack.d.ts +178 -0
- package/lib/main/track/contentTrack.d.ts +168 -0
- package/lib/main/track/customContentTrack.d.ts +18 -0
- package/lib/main/track/customVideoAudioTrack.d.ts +18 -0
- package/lib/main/track/helper.d.ts +53 -0
- package/lib/main/track/videoAudioCapture.d.ts +90 -0
- package/lib/main/track/videoAudioTrack.d.ts +273 -0
- package/lib/main/vom/index.d.ts +44 -0
- package/lib/main/vom/index.type.d.ts +1 -0
- package/lib/tools/analyser.d.ts +53 -0
- package/lib/tools/analyserManager.d.ts +55 -0
- package/lib/tools/dbManager.d.ts +12 -1
- package/lib/tools/{browser.d.ts → detectBrowser/index.d.ts} +53 -5
- package/lib/tools/detectStream/index.d.ts +84 -0
- package/lib/tools/detectStream/index.type.d.ts +56 -0
- package/lib/tools/detectTool/index.d.ts +191 -0
- package/lib/tools/detectTool/index.type.d.ts +51 -0
- package/lib/tools/emitter.d.ts +27 -6
- package/lib/tools/enum.d.ts +1 -1
- package/lib/tools/httpClient.d.ts +23 -6
- package/lib/tools/i18n.d.ts +1 -1
- package/lib/tools/index.d.ts +5 -5
- package/lib/tools/{logger.d.ts → log/logger.d.ts} +59 -29
- package/lib/tools/{logger.worker.d.ts → log/logger.worker.d.ts} +1 -1
- package/lib/tools/log/loggerManager.d.ts +70 -0
- package/lib/tools/pressure/index.d.ts +33 -0
- package/lib/tools/pressure/index.type.d.ts +22 -0
- package/lib/tools/promiseQueue.d.ts +51 -0
- package/lib/tools/queue.d.ts +12 -15
- package/lib/tools/resize.d.ts +65 -0
- package/lib/tools/snapshot.d.ts +31 -0
- package/lib/tools/socket.d.ts +109 -32
- package/lib/tools/template/index.d.ts +3 -3
- package/lib/tools/template/mobile.d.ts +1 -1
- package/lib/tools/template/polling.d.ts +1 -1
- package/lib/tools/utils.d.ts +22 -19
- package/lib/tools/verify.d.ts +7 -0
- package/lib/type/ability.d.ts +25 -0
- package/lib/type/analyser.d.ts +43 -0
- package/lib/type/{iauth.d.ts → auth.d.ts} +22 -29
- package/lib/type/base.d.ts +41 -33
- package/lib/type/capture.d.ts +9 -0
- package/lib/type/client.d.ts +404 -498
- package/lib/type/index.d.ts +26 -2
- package/lib/type/layout.d.ts +25 -49
- package/lib/type/logger.d.ts +37 -12
- package/lib/type/meeting.d.ts +266 -27
- package/lib/type/peer.d.ts +24 -1
- package/lib/type/polling.d.ts +1 -49
- package/lib/type/quality.d.ts +16 -6
- package/lib/type/socket.d.ts +42 -0
- package/lib/type/stream.d.ts +154 -116
- package/lib/type/track.d.ts +139 -0
- package/lib/xyrtc.cjs.js +1 -1
- package/lib/xyrtc.umd.js +1 -1
- package/package.json +11 -3
- package/lib/enum/contraints.d.ts +0 -50
- package/lib/main/deviceManager.d.ts +0 -185
- package/lib/main/helper.d.ts +0 -79
- package/lib/main/stream.d.ts +0 -396
- package/lib/main/videoManager.d.ts +0 -57
- package/lib/tools/audioLevel.d.ts +0 -23
- package/lib/tools/detect.d.ts +0 -43
- package/lib/type/device.d.ts +0 -83
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import XYRTCClient from '../../main/client';
|
|
2
|
+
import { IConference, IGetConferenceParams, IReqInfo, TCommand, XYBaseModule } from '../../type/index';
|
|
3
|
+
export declare class XYEDU implements XYBaseModule {
|
|
4
|
+
private client;
|
|
5
|
+
private logger;
|
|
6
|
+
constructor(client: XYRTCClient);
|
|
7
|
+
destroy(): void;
|
|
8
|
+
/**
|
|
9
|
+
* 更新设备的声音状态
|
|
10
|
+
* 使用场景:教育平台-巡课
|
|
11
|
+
*
|
|
12
|
+
* @param { 'mute' | 'unmute' } type - mute: 静音;unmute: 取消静音;
|
|
13
|
+
* @param { string | string[] } callUriList - 操作的设备的 callUri 或者 callUri 列表
|
|
14
|
+
* @returns { IReturnResult } - 操作结果
|
|
15
|
+
*/
|
|
16
|
+
setPollingAudioStatus(type: 'mute' | 'unmute', callUriList: string | string[]): Promise<any>;
|
|
17
|
+
/**
|
|
18
|
+
* 获取随机云会议室
|
|
19
|
+
* 使用场景:目前用于教育
|
|
20
|
+
*
|
|
21
|
+
* @param { IGetConferenceParams } param - 会议室参数
|
|
22
|
+
* @returns { Promise<IConference> } 云会议室信息
|
|
23
|
+
*/
|
|
24
|
+
getConference(params: IGetConferenceParams): Promise<IConference>;
|
|
25
|
+
/**
|
|
26
|
+
* 开始轮询请求 Layout 画面数据
|
|
27
|
+
*
|
|
28
|
+
* @param { TCommand } command - 轮询状态,0-开始 1-停止 2-暂停 3-恢复
|
|
29
|
+
* @param { number } interval - 轮询间隔时长,单位秒
|
|
30
|
+
* @param { IReqInfo[] } reqList - 请求 Layout 画面流内容
|
|
31
|
+
* @returns { Promise<boolean> } - 是否请求成功
|
|
32
|
+
*/
|
|
33
|
+
requestAutoPollingLayout(command: TCommand, interval: number | undefined, reqList: IReqInfo[]): Promise<boolean>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IToken } from '../../type/base';
|
|
2
|
+
/**
|
|
3
|
+
* 会议室麦克风状态
|
|
4
|
+
*
|
|
5
|
+
* @param SMART 0 - 智能静音
|
|
6
|
+
* @param ALL 1 - 全部静音
|
|
7
|
+
* @param NOT 2 - 不静音
|
|
8
|
+
* @param FORCE 3 - 强制静音
|
|
9
|
+
*/
|
|
10
|
+
export declare enum AutoMute {
|
|
11
|
+
SMART = 0,
|
|
12
|
+
ALL = 1,
|
|
13
|
+
NOT = 2,
|
|
14
|
+
FORCE = 3
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 随机会议室参数
|
|
18
|
+
*
|
|
19
|
+
* @param { string } id - userProfileId,默认是0
|
|
20
|
+
* @param { string } sk - SK,默认是空字符串
|
|
21
|
+
* @param { IToken } token - Token,默认是空字符串
|
|
22
|
+
* @param { AutoMute } autoMute - 是否静音,0:智能静音 1:全部静音 2:不静音 3:强制静音
|
|
23
|
+
*/
|
|
24
|
+
export interface IGetConferenceParams {
|
|
25
|
+
id: number;
|
|
26
|
+
sk: string;
|
|
27
|
+
token: IToken;
|
|
28
|
+
autoMute: AutoMute;
|
|
29
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature:实时讲话人功能
|
|
3
|
+
*
|
|
4
|
+
* Created at : 2023-09-26 15:12:40
|
|
5
|
+
* Last modified : 2024-06-28 18:28:26
|
|
6
|
+
*/
|
|
7
|
+
import { SpeakersInfoItem, XYBaseModule } from '../../type/index';
|
|
8
|
+
import Client from '../../main/client';
|
|
9
|
+
import Logger from '../../tools/log/logger';
|
|
10
|
+
export declare class Speaker implements XYBaseModule {
|
|
11
|
+
logger: Logger;
|
|
12
|
+
private client;
|
|
13
|
+
private cacheSpeakerList;
|
|
14
|
+
private cacheRemoteSpeakerList;
|
|
15
|
+
private speakerListJson;
|
|
16
|
+
private speakerListTimer;
|
|
17
|
+
private speakerInterval;
|
|
18
|
+
private speakerTimestamp;
|
|
19
|
+
private analyserMap;
|
|
20
|
+
constructor(client: Client);
|
|
21
|
+
/**
|
|
22
|
+
* 获取实时讲话人列表数据
|
|
23
|
+
*/
|
|
24
|
+
getRemoteSpeakerList(): SpeakersInfoItem[];
|
|
25
|
+
/**
|
|
26
|
+
* 获取SpeakerList的对象数据
|
|
27
|
+
*
|
|
28
|
+
* @returns { { [key: string]: SpeakersInfoItem } }
|
|
29
|
+
*/
|
|
30
|
+
getRemoteSpeakerMap(): {
|
|
31
|
+
[key: string]: SpeakersInfoItem;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* 处理实时讲话人信息
|
|
35
|
+
*
|
|
36
|
+
* @param { SpeakersInfoObj[] } data - 接收到的远端speakers消息内容
|
|
37
|
+
*/
|
|
38
|
+
onSpeakerListMessage(data?: SpeakersInfoItem[]): void;
|
|
39
|
+
/**
|
|
40
|
+
* 删除无效的讲话人信息
|
|
41
|
+
*/
|
|
42
|
+
private deleteInvalidSpeakerMap;
|
|
43
|
+
/**
|
|
44
|
+
* 启动定时器针对SpeakerList做处理
|
|
45
|
+
*/
|
|
46
|
+
private startSpeakerListTimer;
|
|
47
|
+
/**
|
|
48
|
+
* 创建Analyser分析器,计算所有通道音量大小
|
|
49
|
+
*
|
|
50
|
+
* 1、缓存对应每个人的MediaStream数据
|
|
51
|
+
* 2、获取每个人的实时音量大小
|
|
52
|
+
* 3、排序、推送排序的数据
|
|
53
|
+
*/
|
|
54
|
+
private updateSpeakerAudioLevel;
|
|
55
|
+
/**
|
|
56
|
+
* 创建或更新Analyser分析器
|
|
57
|
+
*
|
|
58
|
+
* @param { string } id - Roster Id
|
|
59
|
+
* @param { string } trackId - 媒体网关分配的Track Id
|
|
60
|
+
* @param { string } timestamp - 时间戳
|
|
61
|
+
*/
|
|
62
|
+
private createAndUpdateAnalyser;
|
|
63
|
+
/**
|
|
64
|
+
* 基于合并后的SpeakerList做过滤和声量排序操作
|
|
65
|
+
*/
|
|
66
|
+
private sortSpeakerAudioLevel;
|
|
67
|
+
/**
|
|
68
|
+
* 推送实时讲话人信息
|
|
69
|
+
*
|
|
70
|
+
* @param { SpeakersInfoObj[] } speakerList - 说话人信息
|
|
71
|
+
*/
|
|
72
|
+
private emitSpeakerList;
|
|
73
|
+
/**
|
|
74
|
+
* 销毁所有Analyser分析器
|
|
75
|
+
*/
|
|
76
|
+
private destroyAnalyserMap;
|
|
77
|
+
/**
|
|
78
|
+
* 清除Speaker Timer和其他缓存数据
|
|
79
|
+
*/
|
|
80
|
+
destroy(): void;
|
|
81
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AnalyserNode } from '../../type/index';
|
|
2
|
+
/**
|
|
3
|
+
* 实时讲话人内部数据
|
|
4
|
+
*/
|
|
5
|
+
export interface SpeakerMapItem {
|
|
6
|
+
stream: MediaStream | null;
|
|
7
|
+
analyserNode: AnalyserNode | null;
|
|
8
|
+
timestamp: number;
|
|
9
|
+
mediaTrackId: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 音频分析器Map
|
|
13
|
+
*
|
|
14
|
+
* @param { string } rosterId - RosterId
|
|
15
|
+
* @param { SpeakerMapItem } value - 基于LayoutId封装的数据结构
|
|
16
|
+
*/
|
|
17
|
+
export type XYAnalyserMap = Map<string, SpeakerMapItem>;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,41 +1,94 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* XYLink WebRTC SDK Lib
|
|
3
3
|
*
|
|
4
|
-
* 主入口文件,提供 createClient、createStream、版本等基本信息和方法;
|
|
5
|
-
*
|
|
6
4
|
* @authors Luo-jinghui (luojinghui424@gmail.com)
|
|
7
5
|
* @date 2019-10-14 18:20:28
|
|
8
6
|
*/
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
7
|
+
import XYRTCClient from './main/client';
|
|
8
|
+
import Logger from './tools/log/logger';
|
|
9
|
+
import LogManager from './tools/log/loggerManager';
|
|
10
|
+
import ContentTrack from './main/track/contentTrack';
|
|
11
|
+
import VideoAudioTrack from './main/track/videoAudioTrack';
|
|
12
|
+
import { IClientConfig, TLocale } from './type/index';
|
|
13
|
+
import { ICheckSystemRequirements } from './tools/detectTool/index.type';
|
|
14
|
+
import { XYDetector } from './tools/detectTool';
|
|
15
|
+
export { AudioAnalyser } from './tools/analyser';
|
|
16
|
+
export { XYStreamDetector } from './tools/detectStream';
|
|
17
|
+
export * from './main/helper/index';
|
|
16
18
|
/**
|
|
17
|
-
* XYLink WebRTC SDK
|
|
19
|
+
* XYLink WebRTC SDK 入口
|
|
18
20
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
export default class XYRTC {
|
|
22
|
+
/**
|
|
23
|
+
* 小鱼易连Web SDK的版本和构建时间
|
|
24
|
+
*/
|
|
25
|
+
static version: string;
|
|
26
|
+
/**
|
|
27
|
+
* SDK内部的日志模块
|
|
28
|
+
*/
|
|
29
|
+
static logger: Logger;
|
|
30
|
+
/**
|
|
31
|
+
* 日志管理器,可以同时获取多个日志实例内容
|
|
32
|
+
*/
|
|
33
|
+
static logManager: LogManager;
|
|
34
|
+
/**
|
|
35
|
+
* 创建会议客户端XYRTCClient模,提供实时音视频通话框架能力,一次会议创建一次即可
|
|
36
|
+
* 使用场景:1、创建多人会议客户端;2、实现会中和会外设备设置、会前预览画面等功能
|
|
37
|
+
* 调用时机:初始化SDK时
|
|
38
|
+
*
|
|
39
|
+
* @since 1.0.0
|
|
40
|
+
* @param { IClientConfig } config - XYRTCClient配置参数
|
|
41
|
+
* @param { Logger? } logger - 可选配置 | Logger模块,默认内部会创建,如果是多实例,需要外部通过createLogger创建Logger并传递给XYRTC
|
|
42
|
+
* @returns { XYRTCClient } - 返回 XYRTCClient 实例 XYClient模块
|
|
43
|
+
*/
|
|
44
|
+
static createClient(config: IClientConfig, logger?: Logger): XYRTCClient;
|
|
45
|
+
/**
|
|
46
|
+
* 创建自定义日志Logger实例
|
|
47
|
+
* 使用场景:1、SDK内部日志模块;2、会前设置功能、会前预览功能等写入独立日志
|
|
48
|
+
* 调用时机:初始化SDK之前
|
|
49
|
+
* 关联内容:Logger模块
|
|
50
|
+
*
|
|
51
|
+
* @since 4.0.0
|
|
52
|
+
* @param { ILoggerConfig } config - 日志模块配置
|
|
53
|
+
* @returns { Logger } - 日志库
|
|
54
|
+
*/
|
|
55
|
+
static createLogger: (config: import("./type/index").ILoggerConfig) => Logger;
|
|
56
|
+
/**
|
|
57
|
+
* 设置Web SDK国际化语言
|
|
58
|
+
* 使用场景:如果项目支持国际化,可在语言变化时,调用此方法
|
|
59
|
+
* 调用时机:任意时刻
|
|
60
|
+
*
|
|
61
|
+
* @param { TLocale } language - 国际化语言
|
|
62
|
+
*/
|
|
63
|
+
static setLocale(language: TLocale): void;
|
|
64
|
+
/**
|
|
65
|
+
* 检测浏览器是否支持WebRTC能力
|
|
66
|
+
* 使用场景:会前检查浏览器是否支持WebRTC能力,针对不支持的浏览器限制入会操作
|
|
67
|
+
* 调用时机:初始化SDK之前
|
|
68
|
+
* 关联内容:浏览器平台支持
|
|
69
|
+
*
|
|
70
|
+
* @returns { Promise<ICheckSystemRequirements> } - 检测结果
|
|
71
|
+
*/
|
|
72
|
+
static checkSupportWebRTC(): Promise<ICheckSystemRequirements>;
|
|
73
|
+
/**
|
|
74
|
+
* 检测浏览器是否支持共享内容能力
|
|
75
|
+
* 使用场景:检查浏览器是否支持共享内容,针对不支持的浏览器限制共享内容操作
|
|
76
|
+
* 调用时机:初始化SDK之前或共享操作之前
|
|
77
|
+
*
|
|
78
|
+
* @returns { boolean } - 是否支持
|
|
79
|
+
*/
|
|
80
|
+
static checkSupportShareContent(): Promise<boolean>;
|
|
81
|
+
static render: void;
|
|
35
82
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export
|
|
83
|
+
/**
|
|
84
|
+
* 导出 MODULES
|
|
85
|
+
*/
|
|
86
|
+
export { XYRTCClient, VideoAudioTrack, ContentTrack, Logger, LogManager, XYDetector };
|
|
87
|
+
/**
|
|
88
|
+
* 导出 TYPE 类型定义
|
|
89
|
+
*/
|
|
90
|
+
export * from './type/index';
|
|
91
|
+
/**
|
|
92
|
+
* 导出错误码
|
|
93
|
+
*/
|
|
40
94
|
export { ERROR_CODE } from './enum/errorCode';
|
|
41
|
-
export { BrowserDetector };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XYLink WebRTC SDK Interface
|
|
3
|
+
*
|
|
4
|
+
* Created at : 2024-04-22 16:01:57
|
|
5
|
+
* Last modified : 2024-07-10 11:34:03
|
|
6
|
+
*/
|
|
7
|
+
import VideoAudioTrack from '../main/track/videoAudioTrack';
|
|
8
|
+
import ContentTrack from '../main/track/contentTrack';
|
|
9
|
+
import { AnalyserConfig, IConference, IConfMgmtUrl, ICustomMessageConfig, IFeatureConfig, IFeatureConfigKey, IFeatureConfigValue, IGetConferenceParams, ILoginExtAccount, ILoginWidthAuthCode, IMakeCall, IMode, InviteInfo, IReqInfo, IReturnResult, IRoster, IVideoAudioType, IVideoControlResult, IVideoProfile, Key, LayoutConfig, LayoutOrientationType, LocalViewParams, LoginExtTokenParams, LoginTokenInfo, LoginXYAccountParams, MEETING_DIRECTION, SnapshotParams, SnapshotResult, TCommand, TLocalLanguage, XYCheckNumberParams, XYClientEventKey, XYServerInfo } from '../type/index';
|
|
10
|
+
import { AudioAnalyser } from '../tools/analyser';
|
|
11
|
+
export interface XYClientIF {
|
|
12
|
+
/**
|
|
13
|
+
* 初始化
|
|
14
|
+
*/
|
|
15
|
+
on(key: XYClientEventKey | string, listener: Function, total?: number): void;
|
|
16
|
+
setFeatureConfig(config: IFeatureConfig): Promise<IReturnResult>;
|
|
17
|
+
/**
|
|
18
|
+
* 登录
|
|
19
|
+
*/
|
|
20
|
+
loginXYlinkAccount(userName: string, password: string): Promise<IReturnResult>;
|
|
21
|
+
loginExternalAccount(params: ILoginExtAccount): Promise<IReturnResult>;
|
|
22
|
+
loginXYAccount(params: LoginXYAccountParams): Promise<IReturnResult>;
|
|
23
|
+
loginExtToken(params: LoginExtTokenParams): Promise<IReturnResult>;
|
|
24
|
+
loginWithAuthCode(params: ILoginWidthAuthCode): Promise<IReturnResult>;
|
|
25
|
+
setLoginTokenInfo(info: LoginTokenInfo): Promise<IReturnResult>;
|
|
26
|
+
/**
|
|
27
|
+
* 呼叫
|
|
28
|
+
*/
|
|
29
|
+
makeCall(params: IMakeCall): Promise<IReturnResult>;
|
|
30
|
+
/**
|
|
31
|
+
* 轨道管理
|
|
32
|
+
*/
|
|
33
|
+
createVideoAudioTrack(): Promise<VideoAudioTrack>;
|
|
34
|
+
createContentTrack(): Promise<ContentTrack>;
|
|
35
|
+
/**
|
|
36
|
+
* 媒体管理
|
|
37
|
+
*/
|
|
38
|
+
getAudioStream(rosterId?: string): MediaStream | null;
|
|
39
|
+
getAudioAnalyser(id?: string, config?: AnalyserConfig): IReturnResult | AudioAnalyser | null;
|
|
40
|
+
getVideoStream(rosterId?: string): MediaStream | null;
|
|
41
|
+
getSnapshot(params: SnapshotParams): Promise<SnapshotResult>;
|
|
42
|
+
muteAudio(): Promise<IVideoAudioType>;
|
|
43
|
+
muteVideo(): Promise<IVideoAudioType>;
|
|
44
|
+
unmuteAudio(): Promise<IVideoAudioType>;
|
|
45
|
+
unmuteVideo(): Promise<IVideoAudioType>;
|
|
46
|
+
publish(track: VideoAudioTrack | ContentTrack): void;
|
|
47
|
+
removeAudioAnalyser(id?: string): void | IReturnResult;
|
|
48
|
+
setTranslationLanguage(language: TLocalLanguage): Promise<IReturnResult>;
|
|
49
|
+
setVideoProfile(direction: MEETING_DIRECTION, profile: IVideoProfile): Promise<void>;
|
|
50
|
+
startTranslation(): Promise<IReturnResult>;
|
|
51
|
+
stopTranslation(): Promise<IReturnResult>;
|
|
52
|
+
subscribeBulkRoster(): Promise<IReturnResult>;
|
|
53
|
+
/**
|
|
54
|
+
* 拉流/布局
|
|
55
|
+
*/
|
|
56
|
+
forceFullScreen(id?: string): Promise<string>;
|
|
57
|
+
playAudio(): Promise<void>;
|
|
58
|
+
playLocalVideo(): Promise<void>;
|
|
59
|
+
playVideo(idList?: string[]): Promise<void>;
|
|
60
|
+
requestNewLayout(reqList: IReqInfo[], maxViewCountPerPage: number, pageIndex: number, extReqList?: IReqInfo[], extParams?: {}): Promise<boolean>;
|
|
61
|
+
requestAutoPollingLayout(command: TCommand, interval: number | undefined, reqList: IReqInfo[]): Promise<boolean>;
|
|
62
|
+
removeAudioRender(key: string): void;
|
|
63
|
+
removeVideoRenderer(id: string): void;
|
|
64
|
+
removeSlaveVideoRenderer(rosterId?: string, viewId?: string): void;
|
|
65
|
+
setFocusView(id: string): Promise<string>;
|
|
66
|
+
setPageInfo(currentPage?: number): Promise<IReturnResult>;
|
|
67
|
+
setVideoRenderer(id: string, wrapEleId: string): void;
|
|
68
|
+
setLocalViewParams(params: LocalViewParams): Promise<IReturnResult>;
|
|
69
|
+
setSlaveVideoRenderer(id: string, wrapEleId: string): void;
|
|
70
|
+
setAudioRenderer(streamId: string, ele: HTMLAudioElement): Promise<void>;
|
|
71
|
+
switchLayout(templateMode?: IMode): Promise<IMode>;
|
|
72
|
+
setLayoutConfig(config: LayoutConfig): void;
|
|
73
|
+
setLayoutOrientation(orientation: LayoutOrientationType): Promise<IReturnResult>;
|
|
74
|
+
setHideLocalView(state: boolean): Promise<{
|
|
75
|
+
status: boolean;
|
|
76
|
+
}>;
|
|
77
|
+
updateLayoutSize(): void;
|
|
78
|
+
/**
|
|
79
|
+
* 会议操作/获取信息
|
|
80
|
+
*/
|
|
81
|
+
checkMeetingNumber(params: XYCheckNumberParams): Promise<IReturnResult>;
|
|
82
|
+
checkMeetingPassword(params: XYCheckNumberParams): Promise<IReturnResult>;
|
|
83
|
+
getMeetingInviteInfo(): Promise<InviteInfo>;
|
|
84
|
+
getSelfRoster(): IRoster;
|
|
85
|
+
toggleHideId(hideId: number | string): Promise<string>;
|
|
86
|
+
/**
|
|
87
|
+
* 调度
|
|
88
|
+
*/
|
|
89
|
+
bindTrackGroup(trackType: 'audio' | 'video', mediagroupId: number): true | IReturnResult;
|
|
90
|
+
getConference(params: IGetConferenceParams): Promise<IConference>;
|
|
91
|
+
setPollingAudioStatus(type: 'mute' | 'unmute', callUriList: string | string[]): Promise<any>;
|
|
92
|
+
startMonitor(uriList?: string[]): void;
|
|
93
|
+
startMonitorGroup(mediagroupIds: Key[]): IReturnResult;
|
|
94
|
+
stopMonitor(uriList?: string[]): void;
|
|
95
|
+
stopMonitorGroup(mediagroupIds: Key[]): IReturnResult;
|
|
96
|
+
/**
|
|
97
|
+
* 录制
|
|
98
|
+
*/
|
|
99
|
+
startCloudRecord(): Promise<IReturnResult>;
|
|
100
|
+
stopCloudRecord(): Promise<IReturnResult>;
|
|
101
|
+
/**
|
|
102
|
+
* 会控操作
|
|
103
|
+
*/
|
|
104
|
+
endAllMeeting(): Promise<IReturnResult>;
|
|
105
|
+
getConfMgmtUrl(): Promise<IConfMgmtUrl | null>;
|
|
106
|
+
nextPollingPage(): void;
|
|
107
|
+
onHandDown(): Promise<boolean>;
|
|
108
|
+
onHandUp(): Promise<boolean>;
|
|
109
|
+
onMute(): Promise<boolean>;
|
|
110
|
+
rename(newName: string): Promise<IReturnResult | undefined>;
|
|
111
|
+
sendVideoControlResult(type: 'muteVideo' | 'unMuteVideo', data: IVideoControlResult): Promise<IReturnResult>;
|
|
112
|
+
signIn(questionnaireId: string): Promise<IReturnResult>;
|
|
113
|
+
startMeetingFocusView(id: string): Promise<IReturnResult>;
|
|
114
|
+
stopMeetingFocusView(id: string): Promise<IReturnResult>;
|
|
115
|
+
verifyControlPassword(pwd: string): Promise<IReturnResult>;
|
|
116
|
+
/**
|
|
117
|
+
* 挂断会议
|
|
118
|
+
*/
|
|
119
|
+
destroy(reason?: string, blockSendSocket?: boolean): Promise<boolean>;
|
|
120
|
+
off(key: string): void;
|
|
121
|
+
/**
|
|
122
|
+
* 其他
|
|
123
|
+
*/
|
|
124
|
+
sendCustomMessage(config: ICustomMessageConfig): IReturnResult;
|
|
125
|
+
setServerAddress(serverInfo: XYServerInfo): void;
|
|
126
|
+
switchDebug(status: boolean): Promise<boolean>;
|
|
127
|
+
switchFeatureConfig(key: IFeatureConfigKey, value: IFeatureConfigValue<IFeatureConfigKey>): Promise<IReturnResult>;
|
|
128
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XYLink WebRTC SDK Custom Track Interface
|
|
3
|
+
*
|
|
4
|
+
* Created at : 2024-04-22 16:01:57
|
|
5
|
+
* Last modified : 2024-06-20 16:31:52
|
|
6
|
+
*/
|
|
7
|
+
import { ContentTrackConfig, IReturnResult, XYElectronSource } from '../type/index';
|
|
8
|
+
export interface XYContentTrackIF {
|
|
9
|
+
capture(config?: ContentTrackConfig): Promise<IReturnResult>;
|
|
10
|
+
close(): void;
|
|
11
|
+
createElectronContentStream(selectedSourceId: string): Promise<IReturnResult>;
|
|
12
|
+
getElectronContentSources(desktopCapturer: any, types?: any): Promise<XYElectronSource[] | any>;
|
|
13
|
+
pause(): Promise<IReturnResult>;
|
|
14
|
+
resume(): Promise<IReturnResult>;
|
|
15
|
+
}
|